Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: meson-saradc: add support for Meson S4

Add support for the SARADC found on the Amlogic Meson S4 SoC.
According to the documentation and current testing, it is fully
compatible with the G12A parameter set, so we reuse
`meson_sar_adc_g12a_data` for this new compatible string.

Although the device tree fallback mechanism could handle the match,
a dedicated entry is added to ensure the userspace ABI correctly
reports the specific part name ("meson-s4-saradc"). This allows
userspace to accurately identify the exact device and maintains
consistency across different firmware types where automatic fallback
parsing might be problematic.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Nick Xie <nick@khadas.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nick Xie and committed by
Jonathan Cameron
8175ffc9 ab8293ca

+8
+8
drivers/iio/adc/meson_saradc.c
··· 1314 1314 .name = "meson-g12a-saradc", 1315 1315 }; 1316 1316 1317 + static const struct meson_sar_adc_data meson_sar_adc_s4_data = { 1318 + .param = &meson_sar_adc_g12a_param, 1319 + .name = "meson-s4-saradc", 1320 + }; 1321 + 1317 1322 static const struct of_device_id meson_sar_adc_of_match[] = { 1318 1323 { 1319 1324 .compatible = "amlogic,meson8-saradc", ··· 1347 1342 }, { 1348 1343 .compatible = "amlogic,meson-g12a-saradc", 1349 1344 .data = &meson_sar_adc_g12a_data, 1345 + }, { 1346 + .compatible = "amlogic,meson-s4-saradc", 1347 + .data = &meson_sar_adc_s4_data, 1350 1348 }, 1351 1349 { } 1352 1350 };