Re: [PATCH 3/5] iio: adc: ad9467: don't allow reading vref if not available

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

 



On Thu, 4 Jul 2024 11:25:23 +0200
Nuno Sa <nuno.sa@xxxxxxxxxx> wrote:

> If there's only one possible scale, there's no way to change the Vref
> select in the device so avoid reading the register in ad9467_get_scale().
> In this case, it makes no sense to provide the .read_available()
> callback nor allowing for writing the scale attribute.
> 
> Note this is in preparation for supporting a new device that only has
> one possible scale.
> 
> Signed-off-by: Nuno Sa <nuno.sa@xxxxxxxxxx>

Trivial comment inline. If nothing else comes up I might just tweak it
whilst applying.
>  
>  static const struct ad9467_chip_info ad9467_chip_tbl = {
> @@ -301,9 +301,13 @@ static const struct ad9467_chip_info ad9265_chip_tbl = {
>  static int ad9467_get_scale(struct ad9467_state *st, int *val, int *val2)
>  {
>  	const struct ad9467_chip_info *info = st->info;
> -	unsigned int i, vref_val;
> +	unsigned int i = 0, vref_val;
This time it's in new code.
	unsigned int vref_val;
	unsigned int i = 0;

preferred so the assignment isn't burried.

>  	int ret;
>  





[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