Re: [PATCH 1/6] iio: adc: ad7887: fix on-chip reference enable logic

From: Joshua Crofts

Date: Thu Nov 26 2026 - 05:41:44 EST


On 25-Nov-26 11:19, Nuno Sá wrote:
> The REF bit in the control register disables the on-chip 2.5 V
> reference when set. Before commit 5483b8d5015b ("iio: adc: ad7887:
> invert/rework external ref logic"), the driver set it when an external
> reference was used. That commit replaced the use_onchip_ref platform
> data flag with the presence of the vref regulator, but kept the
> condition as is. As a result, the bit is now set when there is no
> external reference, so the on-chip reference gets disabled exactly
> when the driver relies on it, and is left enabled when an external
> reference is supplied.
>
> Only disable the on-chip reference when a vref regulator is present.
>
Brilliant :) A stable tag is probably needed.

Reviewed-by: Joshua Crofts <crofts@xxxxxxxxxx>

--
Kind regards,
Joshua Crofts