mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
iio: adc: ad7606: add enabling of optional Vrefin voltage
Add optional refin voltage enabling. The property "refin-supply" is already available and optional in the current fdt dt_schema. Note that the driver does not need to take any actions if the supply is not present because a pin strap is used to change the behavior of the device if an external reference is connected. Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> Link: https://patch.msgid.link/20250530-wip-bl-ad7606-reference-voltages-v2-2-d5e1ad7e6f14@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
82f4ed3a01
commit
3125a5ca45
|
|
@ -1335,6 +1335,11 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
|
|||
return dev_err_probe(dev, ret,
|
||||
"Failed to enable Vdrive supply\n");
|
||||
|
||||
ret = devm_regulator_get_enable_optional(dev, "refin");
|
||||
if (ret && ret != -ENODEV)
|
||||
return dev_err_probe(dev, ret,
|
||||
"Failed to enable REFIN supply\n");
|
||||
|
||||
st->chip_info = chip_info;
|
||||
|
||||
if (st->chip_info->oversampling_num) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user