* pwm-led turns on during suspend
@ 2017-11-17 12:31 Fabio Estevam
2017-11-17 12:45 ` Russell King - ARM Linux
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2017-11-17 12:31 UTC (permalink / raw)
To: jacek.anaszewski, Richard Purdie, Russell King - ARM Linux
Cc: Linux LED Subsystem
Hi,
On a imx6q-cubox-i board there is an LED controlled via pwm-leds and
it works as expected:
# cd /sys/class/leds/imx6\:red\:front/
# echo 248 > brightness (LED is turned on with its maximum brightness)
# echo 0 > brightness (LED is turned off)
However after entering in suspend mode:
# echo enabled > /sys/class/tty/ttymxc0/power/wakeup
# echo mem > /sys/power/state
The LED is turned on with its maximum brightness.
Press a key in the console, system resumes and LED is turned off.
I would expect that the LED gets turned off in suspend, but this is
not happening.
Any ideas?
Thanks,
Fabio Estevam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pwm-led turns on during suspend
2017-11-17 12:31 pwm-led turns on during suspend Fabio Estevam
@ 2017-11-17 12:45 ` Russell King - ARM Linux
2017-11-17 13:27 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2017-11-17 12:45 UTC (permalink / raw)
To: Fabio Estevam; +Cc: jacek.anaszewski, Richard Purdie, Linux LED Subsystem
On Fri, Nov 17, 2017 at 10:31:23AM -0200, Fabio Estevam wrote:
> Hi,
>
> On a imx6q-cubox-i board there is an LED controlled via pwm-leds and
> it works as expected:
>
> # cd /sys/class/leds/imx6\:red\:front/
> # echo 248 > brightness (LED is turned on with its maximum brightness)
> # echo 0 > brightness (LED is turned off)
>
> However after entering in suspend mode:
>
> # echo enabled > /sys/class/tty/ttymxc0/power/wakeup
> # echo mem > /sys/power/state
>
> The LED is turned on with its maximum brightness.
>
> Press a key in the console, system resumes and LED is turned off.
>
> I would expect that the LED gets turned off in suspend, but this is
> not happening.
>
> Any ideas?
The LED is wired to the 3.3V supply, and most likely the PWM output goes
low when the SoC suspends. As SolidRun boards don't have support for
powering down the board supplies, the 3.3V supply does not collapse on
suspend.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pwm-led turns on during suspend
2017-11-17 12:45 ` Russell King - ARM Linux
@ 2017-11-17 13:27 ` Fabio Estevam
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2017-11-17 13:27 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: jacek.anaszewski, Richard Purdie, Linux LED Subsystem
Hi Russell,
On Fri, Nov 17, 2017 at 10:45 AM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> The LED is wired to the 3.3V supply, and most likely the PWM output goes
> low when the SoC suspends. As SolidRun boards don't have support for
> powering down the board supplies, the 3.3V supply does not collapse on
> suspend.
I managed to fix this by introducing pinctrl_pm_select_sleep_state()
support into drivers/leds/leds-pwm.c.
Here is the complete change:
https://pastebin.com/FCsLMuW1
Now I can get the LED to be turned off during suspend.
I will separate the changes and submit the patches.
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-17 13:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 12:31 pwm-led turns on during suspend Fabio Estevam
2017-11-17 12:45 ` Russell King - ARM Linux
2017-11-17 13:27 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).