[PATCH v2 0/3] iio: adc: xilinx-ams: refactor alarm handling to table-driven design
Andy Shevchenko
andriy.shevchenko at intel.com
Tue Apr 14 04:33:02 PDT 2026
On Tue, Apr 14, 2026 at 07:29:16AM -0300, Guilherme Ivo Bozi wrote:
> This series addresses significant code duplication in alarm handling
> logic across the Xilinx AMS IIO driver.
>
> To address this, the series introduces a centralized table-driven
> mapping (alarm_map) that replaces multiple switch statements spread
> across the driver.
>
> This improves:
> - maintainability (single source of truth for mappings)
> - readability (removes repeated switch logic)
> - extensibility (new alarms require only table updates)
>
> No functional changes are intended.
Please, do not send a new version in the same email thread!
> Series overview:
> - Patch 1: fix out-of-bounds channel lookup
> - Patch 2: convert mutex handling to guard(mutex)
> - Patch 3: introduce table-driven alarm mapping
I will look into them later on.
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list