Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

card regulator is not turned off if iface is down #82

Open
akemnade opened this issue Aug 22, 2022 · 2 comments
Open

card regulator is not turned off if iface is down #82

akemnade opened this issue Aug 22, 2022 · 2 comments

Comments

@akemnade
Copy link

The sdio card is not properly unpowered when device is down. Expectation would be that regulator is powered down when iface isis down. Removing the module helps.

pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# ifconfig wlan0 up
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# cat supplier/state 
enabled
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# ifconfig wlan0 down
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# cat supplier/state 
enabled
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# rmmod 8189fs
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# cat supplier/state 
disabled

Seen on Kobo Clara HD, dtb: imx6sll-kobo-clarahd.dtb (relevant parts are in mainline)
module information: commit:
71500c2

It was compiled using

        make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
                KBUILD_BUILD_VERSION="$(( pkgrel + 1 ))-postmarketOS" \
                CONFIG_RTW_SDIO_PM_KEEP_POWER=n \
                -C "$_rtl8189fs_dir" KSRC="$builddir"
@Icenowy
Copy link
Collaborator

Icenowy commented Aug 23, 2022

Sorry but this is never an intended behavior to power down the full card when interface is down, because this state means the card is ready to work at any time.

@akemnade
Copy link
Author

well, other sdio wifi drivers have that behavior. They power down the card completely, in such cases.
Also the card does not power down completely if I do some rfkill block.
Do you really think the only option the userspace should have to power down the card completely is to remove the driver?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants