[PATCH] iio: adc: aspeed: Reserve battery sensing channel for on-demand use
Billy Tsai
billy_tsai at aspeedtech.com
Mon Mar 16 13:41:42 AEDT 2026
On Fri, Mar 13, 2026 at 06:02:16PM +0800, Billy Tsai wrote:
> > For controllers with battery sensing capability (AST2600/AST2700), the last
> > channel uses a different circuit design optimized for battery voltage
> > measurement. This channel should not be enabled by default along with other
> > channels to avoid potential interference and power efficiency issues.
> >
> > Changes made:
> > - Introduce aspeed_adc_get_active_channels() to return the number of
> > channels that should be enabled by default
> > - For battery sensing capable controllers, exclude the last channel
> > from the default channel enable mask
> > - Enable the battery sensing channel only when explicitly accessed
> > via read_raw()
> > - Replace hardcoded channel numbers with ASPEED_ADC_BATTERY_CHANNEL macro
> > - Add helper functions for cleaner channel management
> Why not series of patches each for the change made?
Okay, I will split the changes into a series of patches for better clarity and
review for V2.
Thanks
Billy Tsai
> This ensures optimal power efficiency for normal ADC operations while
> maintaining full functionality when battery sensing is needed.
More information about the Linux-aspeed
mailing list