Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pwm: samsung: Remove redundant checks from pwm_samsung_config()

If the requested period_ns and duty_ns values are identical to the last
programmed ones pwm_samsung_config() returns early and skips the
hardware configuration. The same checks are now done by the PWM core so
the driver specific ones can be removed.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Bartlomiej Zolnierkiewicz and committed by
Thierry Reding
23aa19a2 8bdb65dc

-3
-3
drivers/pwm/pwm-samsung.c
··· 312 312 if (period_ns > NSEC_PER_SEC) 313 313 return -ERANGE; 314 314 315 - if (period_ns == chan->period_ns && duty_ns == chan->duty_ns) 316 - return 0; 317 - 318 315 tcnt = readl(our_chip->base + REG_TCNTB(pwm->hwpwm)); 319 316 oldtcmp = readl(our_chip->base + REG_TCMPB(pwm->hwpwm)); 320 317