]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: pwm-tiehrpwm: Fix conflicting channel period setting
authorPhilip, Avinash <avinashphilip@ti.com>
Thu, 6 Sep 2012 05:14:25 +0000 (10:44 +0530)
committerThierry Reding <thierry.reding@avionic-design.de>
Mon, 10 Sep 2012 15:04:38 +0000 (17:04 +0200)
commitf0ac0e9c61dbb47bfb7f4206863b548eb1c398c9
treef0cf06b9c3aaa834a578e0eeda01e72ba51c2653
parent61145ac386f974d372d42f4a72b3c7ea3655f769
pwm: pwm-tiehrpwm: Fix conflicting channel period setting

EHRPWM hardware supports 2 independent PWM channels. However the device
uses only one register to handle period setting for both channels. So
both channels should be configured for same period (in nsec).

Fix the same by returning error for conflicting period values.

However, allow
1. Configuration of period settings if not conflicting with other
channels
2. Re-configuring of period settings if no other channels being
configured

Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/pwm/pwm-tiehrpwm.c