Re: [PATCH v7 3/6] iio: adc: ad7192: Add aincom supply

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

 



On Tue, Apr 30, 2024 at 7:30 PM Alisa-Dariana Roman
<alisadariana@xxxxxxxxx> wrote:
>
> AINCOM should actually be a supply. AINx inputs are referenced to AINCOM
> in pseudo-differential operation mode. AINCOM voltage represents the
> offset of corresponding channels.

...

> +               ret = regulator_enable(aincom);
> +               if (ret)
> +                       return dev_err_probe(&spi->dev, ret,
> +                                            "Failed to enable specified AINCOM supply\n");
> +
> +               ret = devm_add_action_or_reset(&spi->dev, ad7192_reg_disable, aincom);
> +               if (ret)
> +                       return ret;
> +
> +               ret = regulator_get_voltage(aincom);
> +               if (ret < 0)
> +                       return dev_err_probe(&spi->dev, ret,
> +                                            "Device tree error, AINCOM voltage undefined\n");
> +               st->aincom_mv = ret / 1000;

MILLI ?

-- 
With Best Regards,
Andy Shevchenko





[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