Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The `refout` regulator is registered with empty operations, causing `regulator_enable()` to fail with `-EINVAL` and leaving the internal reference disabled.
- [Medium] The `vbias` regulator lacks a `.get_voltage` callback, causing it to incorrectly report its parent's full voltage instead of the mid-supply voltage.
--
--- Patch [8]: [PATCH v3 8/9] iio: adc: ti-ads1262: support REFOUT and VBIAS regulators ---
commit 8d51db315e9b593705eb805bce9b112c942e4ee3
Author: Kurt Borja <[email protected]>
iio: adc: ti-ads1262: support REFOUT and VBIAS regulators
Register the "refout" and "vbias" regulators to be able to use them as
common mode supplies.
> diff --git a/drivers/iio/adc/ti-ads1262.c b/drivers/iio/adc/ti-ads1262.c
> index 24a7ecb9fbd40..533574169b044 100644
> --- a/drivers/iio/adc/ti-ads1262.c
> +++ b/drivers/iio/adc/ti-ads1262.c
[ ... ]
> @@ -961,6 +962,91 @@ static irqreturn_t ads1262_irq_handler(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
[ ... ]
> +static const struct regulator_ops ads1262_vbias_regulator_ops = {
> + .enable = ads1262_regulator_enable,
> + .disable = ads1262_regulator_disable,
> + .is_enabled = ads1262_regulator_is_enabled,
> +};
[Severity: Medium]
Since this operations structure lacks a .get_voltage callback, won't calls
to regulator_get_voltage() fall back to returning the parent's full voltage
(AVDD) instead of the expected mid-supply voltage?
> +
> +static const struct regulator_ops ads1262_refout_regulator_ops = { };
[Severity: High]
Since this operations structure is empty and lacks an .enable callback, won't
regulator_enable() fail with -EINVAL?
This also means there is no callback to configure the hardware by setting the
ADS1262_POWER_INTREF_MASK bit, leaving the internal reference disabled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.