Re: [PATCH] iio: sx9310: Fix write_.._debounce()

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

 



Quoting Gwendal Grignou (2021-03-31 11:22:22)
> Check input to be sure it matches Semtech sx9310 specification and
> can fit into debounce register.
> Compare argument writen to thresh_.._period with read from same
> sysfs attribute:
> 
> Before:                   Afer:
> write   |  read           write   |  read
> -1      |     8           -1 fails: -EINVAL
> 0       |     8           0       |     0
> 1       |     0           1       |     0
> 2..15   |  2^log2(N)      2..15   |  2^log2(N)
> 16      |     0           >= 16 fails: -EINVAL
> 
> Fixes: 1b6872015f0b ("iio: sx9310: Support setting debounce values")
> Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> ---

Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux