]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: crc: Enable/disable PWM output on enable/disable
authorHans de Goede <hdegoede@redhat.com>
Thu, 3 Sep 2020 11:23:31 +0000 (13:23 +0200)
committerHans de Goede <hdegoede@redhat.com>
Sun, 6 Sep 2020 13:38:04 +0000 (15:38 +0200)
commit6fdefe60898ad4506456d8117c7f81cbc5d13468
treed95f36d66f98cea54d837f48c9c718f47ad07562
parent6158231a84224ed0d826bbf62c992ce9c73101c1
pwm: crc: Enable/disable PWM output on enable/disable

The pwm-crc code is using 2 different enable bits:
1. bit 7 of the PWM0_CLK_DIV (PWM_OUTPUT_ENABLE)
2. bit 0 of the BACKLIGHT_EN register

So far we've kept the PWM_OUTPUT_ENABLE bit set when disabling the PWM,
this commit makes crc_pwm_disable() clear it on disable and makes
crc_pwm_enable() set it again on re-enable.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-12-hdegoede@redhat.com
drivers/pwm/pwm-crc.c