[PATCH] iio: adc: aspeed: Reserve battery sensing channel for on-demand use
Andy Shevchenko
andriy.shevchenko at intel.com
Fri Mar 13 21:08:36 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?
> This ensures optimal power efficiency for normal ADC operations while
> maintaining full functionality when battery sensing is needed.
--
With Best Regards,
Andy Shevchenko
More information about the Linux-aspeed
mailing list