mbox series

[0/2] pwm: atmel-hlcdc: Two improvements

Message ID cover.1706269232.git.u.kleine-koenig@pengutronix.de
Headers show
Series pwm: atmel-hlcdc: Two improvements | expand

Message

Uwe Kleine-König Jan. 26, 2024, 11:59 a.m. UTC
Hello,

while looking through various pwm drivers I found these two
improvements.

The conditional clk_disable_unprepare() in .suspend() makes me wonder if
the PWM continues to operate during suspend. Can someone with the
hardware confirm that? If so, is it really necessary to restore the
registers (by calling atmel_hlcdc_pwm_apply())?

Other drivers have a logic in .suspend() that makes them return -EBUSY
if the pwm is still enabled. So I further wonder if there is an
application for the atmel-hlcdc driver to handle the pwm being enabled
there. Any hints are welcome. I already wondered if it's safe to let the
pwm core return -EBUSY for a suspend request if the hardware is enabled.
So the answer to my question is relevant to this plan, too.

Best regards
Uwe

Uwe Kleine-König (2):
  pwm: atmel-hlcdc: Fix clock imbalance related to suspend support
  pwm: atmel-hlcdc: Don't use pwm consumer API

 drivers/pwm/pwm-atmel-hlcdc.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

base-commit: 7be3ba1e5644170feb2cb587860015de97fc7d8a