Re: [PATCH v3 8/9] iio: adc: ti-ads1262: support REFOUT and VBIAS regulators
"Kurt Borja" <[email protected]>
| Newsgroups | org.kernel.vger.linux-gpio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Sat Aug 8, 2026 at 1:40 PM -05, David Lechner wrote: > On 8/7/26 10:58 PM, Kurt Borja wrote: >> Register the "refout" and "vbias" regulators to be able to use them as >> common mode supplies. >> >> Signed-off-by: Kurt Borja <[email protected]> >> --- >> drivers/iio/adc/Kconfig | 1 + >> drivers/iio/adc/ti-ads1262.c | 90 ++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 91 insertions(+) [...] >> diff --git a/drivers/iio/adc/ti-ads1262.c b/drivers/iio/adc/ti-ads1262.c >> index 24a7ecb9fbd4..533574169b04 100644 >> --- a/drivers/iio/adc/ti-ads1262.c >> +++ b/drivers/iio/adc/ti-ads1262.c [...] >> +static const struct regulator_ops ads1262_vbias_regulator_ops = { >> + .enable = ads1262_regulator_enable, >> + .disable = ads1262_regulator_disable, >> + .is_enabled = ads1262_regulator_is_enabled, > > This should also have a get_voltage() op that returns > (VAVDD + VAVSS) / 2. Otherwise it won't be usable as a > common mode voltage. I'll add this. > >> +}; >> + >> +static const struct regulator_ops ads1262_refout_regulator_ops = { }; >> + >> +static const struct regulator_desc ads1262_vbias_regulator_desc = { >> + .name = "vbias", >> + .of_match = "vbias", >> + .regulators_node = "regulators", >> + .supply_name = "avdd", > > What does supply_name do? Make "avdd-supply" the parent supply? I haven't looked at the code, but it seems like it (sysfs verfies it). I'll check how is supply_name handled before the next version. -- Thanks, ~ Kurt