pwm: tegra: Read PWM clock source rate in driver init
authorLaxman Dewangan <ldewangan@nvidia.com>
Thu, 13 Apr 2017 14:10:27 +0000 (19:40 +0530)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 13 Apr 2017 15:35:40 +0000 (17:35 +0200)
commit46fa8bc08744c373d405a87430e0b3e13ae94b4c
tree3936ba632d247f98ce59baa31fef009c7faa28d9
parentc40c461e1944b9cfb520e04184ec1e5c80fb210b
pwm: tegra: Read PWM clock source rate in driver init

It is required to know the PWM clock source frequency to calculate the
PWM period.

In driver, the clock source frequency of the PWM does not get change
and, hence, get the clock source frequency in driver init. Get this
values later for period calculation from pwm_config().

This will help in avoiding the clock call for getting clock rate in the
pwm_config() each time.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-tegra.c