[Letux-kernel] GPIOs and driver removal

Andreas Kemnade andreas at kemnade.info
Mon Nov 19 07:04:53 CET 2018


I found out something interesting about GPIOs and driver removal.
If I rmmod the gps driver, then exporting gpio145 (on/off), it shows up as an
*input*. The value is read as 1. That causes an interesting behavior of the gps
Enabling pulldown via pinctrl (for testing via devmem2) seems to solve that
problem. GPS stays off after rmmod.
A similiar behavior I have seen for the reset gpio of the usb3322 phy.
Unbinding the driver seems to enable that phy. manually setting the pin
to low via OFFENABLE setting in padconf via devmem2 then disables it again.

So that are things we should have in mind when rmmod something causes
unexpected behavior in current consumption. Remember, I had that drop in
suspend current on the a5 when I did rmmod hci_uart.

I was not aware of this.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20181119/045ebbdd/attachment.asc>

More information about the Letux-kernel mailing list