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)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 19 May 2015 14:07:40 +0000 (16:07 +0200)
commit1e70897d0e20f988abedcf73b33684ecd2be9511
tree36e3625bf964d0a435c84165b1571ac3da669199
parentb787f68c36d49bb1d9236f403813641efa74a031
pwm: img: Impose upper and lower timebase steps value

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>
drivers/pwm/pwm-img.c