I2C1 uses GPIO2 & GPIO3, so using GPIO4 for gpio-poweroff is fine.
How are you hoping to use the input? The "export" option makes the GPIO available via sysfs, but that mechanism is deprecated now.
Most OSs on Pi (those that are Linux-based) will support overlays because they inherit the Device Tree from the firmware, and its the firmware that applies the overlays.Does this work on other OS besides Raspberry Pi OS or is this YMMV?
That's an unusual choice - it's normally best to work with the power-up default of the pins to avoid glitches; GPIOs 0-8 pull up by default, and 9-27 pull down.set up GPIO 4 as an input with pulldown
How are you hoping to use the input? The "export" option makes the GPIO available via sysfs, but that mechanism is deprecated now.
You can merge overlays, but is it necessary? All you should need is something like:Can I either merge this with another overlay or load it with another overlay?
Code:
dtparam=i2c_arm=ondtoverlay=gpio-poweroff,gpiopin=4,input,export
Statistics: Posted by PhilE — Tue Apr 23, 2024 7:53 am