[PATCH v2 02/13] pwm: rockchip: Fix period and duty_cycle approximation

2016-06-08 Thread Boris Brezillon
The current implementation always round down the duty and period values, while it would be better to round them to the closest integer. These changes are needed in preparation of atomic update support to prevent a period/duty cycle drift when executing several time the 'pwm_get_state() / modify /

[PATCH v2 02/13] pwm: rockchip: Fix period and duty_cycle approximation

2016-06-08 Thread Boris Brezillon
The current implementation always round down the duty and period values, while it would be better to round them to the closest integer. These changes are needed in preparation of atomic update support to prevent a period/duty cycle drift when executing several time the 'pwm_get_state() / modify /