Re: [PATCH 34/40] iio: adc: ti_am335x_adc: Add a unit to the timeout delay

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

 



On Wed, 25 Aug 2021 17:25:12 +0200
Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:

> The lack of unit in the macro name kind of tricked me when I was
> troubleshooting an issue. Physical constants should always get a unit.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

Acked-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>

> ---
>  drivers/iio/adc/ti_am335x_adc.c      | 2 +-
>  include/linux/mfd/ti_am335x_tscadc.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index 4eaf5b031707..ebf6326af60d 100644
> --- a/drivers/iio/adc/ti_am335x_adc.c
> +++ b/drivers/iio/adc/ti_am335x_adc.c
> @@ -441,7 +441,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,
>  	am335x_tsc_se_set_once(adc_dev->mfd_tscadc, step_en);
>  
>  	/* Wait for Fifo threshold interrupt */
> -	timeout = jiffies + msecs_to_jiffies(IDLE_TIMEOUT * adc_dev->channels);
> +	timeout = jiffies + msecs_to_jiffies(IDLE_TIMEOUT_MS * adc_dev->channels);
>  	while (1) {
>  		fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
>  		if (fifo1count)
> diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
> index 31b22ec567e7..177ab2499200 100644
> --- a/include/linux/mfd/ti_am335x_tscadc.h
> +++ b/include/linux/mfd/ti_am335x_tscadc.h
> @@ -164,7 +164,7 @@
>   *
>   * max processing time: 266431 * 308ns = 83ms(approx)
>   */
> -#define IDLE_TIMEOUT 83 /* milliseconds */
> +#define IDLE_TIMEOUT_MS 83 /* milliseconds */
>  
>  #define TSCADC_CELLS		2
>  




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux