Re: [PATCH v2 4/7] iio: addac: ad74115: Use devm_regulator_get_enable_read_voltage()

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

 



On Mon, 29 Apr 2024 18:40:12 -0500
David Lechner <dlechner@xxxxxxxxxxxx> wrote:

> We can reduce boilerplate code by using
> devm_regulator_get_enable_read_voltage().
> 
> To maintain backwards compatibility in the case a DT does not provide
> an avdd-supply, we fall back to calling devm_regulator_get_enable()
> so that there is no change in user-facing behavior (e.g. dummy regulator
> will still be in sysfs).
> 
> Also add an informative error message when we failed to get the voltage
> and knowing the voltage is required while we are touching this.
> 
> Signed-off-by: David Lechner <dlechner@xxxxxxxxxxxx>
A somewhat fiddly case.  I think you've done it the best way possible though.

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




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux