[no subject]

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

 



Jonathan

> ---
> Hello,
> 
> while looking at traces I spotted this unnecessary register read. On my
> machine (de10nano) this register read takes ~23 µs when doing
> 
> 	cat /sys/bus/iio/devices/iio:device0/in_temp_raw
> 
> . Compared to the time the chip needs for the actual conversion (~400
> ms) this is little gain, but still. And more relevant for me: It
> simplifies trace studies.
> 
> To state the obvious: This is totally not urgent and merge window
> material.
> 
> Best regards
> Uwe
> 
>  drivers/iio/adc/ad7124.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
> index 6ae27cdd3250..73c831626bf3 100644
> --- a/drivers/iio/adc/ad7124.c
> +++ b/drivers/iio/adc/ad7124.c
> @@ -559,7 +559,8 @@ static int ad7124_disable_one(struct ad_sigma_delta *sd, unsigned int chan)
>  {
>  	struct ad7124_state *st = container_of(sd, struct ad7124_state, sd);
>  
> -	return ad7124_spi_write_mask(st, AD7124_CHANNEL(chan), AD7124_CHANNEL_EN_MSK, 0, 2);
> +	/* The relevant thing here is that AD7124_CHANNEL_EN_MSK is cleared. */
> +	return ad_sd_write_reg(&st->sd, AD7124_CHANNEL(chan), 2, 0);
>  }
>  
>  static const struct ad_sigma_delta_info ad7124_sigma_delta_info = {
> 
> base-commit: b323d8e7bc03d27dec646bfdccb7d1a92411f189






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux