Re: [PATCH] pwm: rcar: fix a condition to prevent mismatch value setting to duty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 09, 2018 at 08:24:21PM +0900, Yoshihiro Shimoda wrote:
> From: Ryo Kodama <ryo.kodama.vz@xxxxxxxxxxx>
> 
> This patch fixes an issue that is possible to set mismatch value
> to duty for R-Car PWM if we input the following commands:
> 
>  # cd /sys/class/pwm/<pwmchip>/
>  # echo 0 > export
>  # cd pwm0
>  # echo 30 > period
>  # echo 30 > duty_cycle
>  # echo 0 > duty_cycle
>  # cat duty_cycle
>  0
>  # echo 1 > enable
>  --> Then, the actual duty_cycle is 30, not 0.
> 
> So, this patch adds a condition into rcar_pwm_config() to fix
> this issue.
> 
> Signed-off-by: Ryo Kodama <ryo.kodama.vz@xxxxxxxxxxx>
> [shimoda: revise the commit log and add Fixes and Cc tags]
> Fixes: ed6c1476bf7f ("pwm: Add support for R-Car PWM Timer")
> Cc: Cc: <stable@xxxxxxxxxxxxxxx> # v4.4+
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> ---
>  drivers/pwm/pwm-rcar.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Applied, thanks.

Thierry

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux