diff options
author | Michal Vokáč <michal.vokac@ysoft.com> | 2018-10-01 16:19:48 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2018-12-12 11:52:47 +0100 |
commit | bf9b0b1b0b6cd51797ce79b6fa5fc2d1baa2719e (patch) | |
tree | f8d92ab5fc082aea2e73d695902a2dc033c4478a /mm/mempool.c | |
parent | 9f617ada9f823dff1944ebcf92ef4a05f5f322b7 (diff) | |
download | linux-bf9b0b1b0b6cd51797ce79b6fa5fc2d1baa2719e.tar.bz2 |
pwm: imx: Implement get_state() function for hardware readout
Implement the get_state() function and set the initial state to reflect
real state of the hardware. This allows to keep the PWM running if it was
enabled in bootloader. It is very similar to the GPIO behavior. GPIO pin
set as output in bootloader keep the same setting in Linux unless it is
reconfigured.
If we find the PWM block enabled we need to prepare and enable its source
clock otherwise the clock will be disabled late in the boot as unused.
That will leave the PWM in enabled state but with disabled clock. That has
a side effect that the PWM output is left at its current level at which
the clock was disabled. It is totally non-deterministic and it may be LOW
or HIGH.
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'mm/mempool.c')
0 files changed, 0 insertions, 0 deletions