OSDN Git Service

pwm: img: Impose upper and lower timebase steps value
authorNaidu Tellapati <naidu.tellapati@imgtec.com>
Fri, 8 May 2015 21:47:31 +0000 (18:47 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 15:21:09 +0000 (08:21 -0700)
commit9ac144beb909307828a779745d8189bfa52a45f9
tree31ee50a2d5603581bd52e5cb06ebd8ae8799ce3f
parenteb20e69ac83a1e4d764a49bf671e1e2e5dc4c15c
pwm: img: Impose upper and lower timebase steps value

commit 1e70897d0e20f988abedcf73b33684ecd2be9511 upstream.

The PWM hardware on Pistachio platform has a maximum timebase steps
value to 255. To fix it, let's introduce a compatible-specific
data structure to contain the SoC-specific details and use it to
specify a maximum timebase.

Also, let's limit the minimum timebase to 16 steps, to allow a sane
range of duty cycle steps.

Fixes: 277bb6a29e00 ("pwm: Imagination Technologies PWM DAC driver")
Signed-off-by: Naidu Tellapati <naidu.tellapati@imgtec.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pwm/pwm-img.c