]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: cpcap-adc: add support for Mot ADC
authorSvyatoslav Ryhel <clamor95@gmail.com>
Fri, 6 Feb 2026 17:28:39 +0000 (19:28 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 3 Mar 2026 21:20:03 +0000 (21:20 +0000)
Add support for ADC found in Motorola Mot board, used as a base for
Atrix 4G and Droid X2 smartphones.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/cpcap-adc.c

index d9ee2ea116a78b46e6490aeb43144eed3fc1790d..f6f72efcc6edaf94fd98e55594cb6754473985d3 100644 (file)
@@ -934,6 +934,17 @@ static const struct cpcap_adc_ato mapphone_adc = {
        .atox_ps_factor_out = 0,
 };
 
+static const struct cpcap_adc_ato mot_adc = {
+       .ato_in = 0x0300,
+       .atox_in = 0,
+       .adc_ps_factor_in = 0x0200,
+       .atox_ps_factor_in = 0,
+       .ato_out = 0x0780,
+       .atox_out = 0,
+       .adc_ps_factor_out = 0x0600,
+       .atox_ps_factor_out = 0,
+};
+
 static const struct of_device_id cpcap_adc_id_table[] = {
        {
                .compatible = "motorola,cpcap-adc",
@@ -942,6 +953,10 @@ static const struct of_device_id cpcap_adc_id_table[] = {
                .compatible = "motorola,mapphone-cpcap-adc",
                .data = &mapphone_adc,
        },
+       {
+               .compatible = "motorola,mot-cpcap-adc",
+               .data = &mot_adc,
+       },
        { }
 };
 MODULE_DEVICE_TABLE(of, cpcap_adc_id_table);