]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: exynos_adc: Drop S3C2410 support
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 30 Aug 2025 16:48:30 +0000 (18:48 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 10 Sep 2025 18:47:04 +0000 (19:47 +0100)
Samsung S3C24xx family of SoCs was removed from the Linux kernel in the
commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support"), in January
2023.  There are no in-kernel users of its compatibles.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250830-s3c-cleanup-adc-v2-1-4f8299343d32@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/exynos_adc.c

index 32cfc4002b1bce06d875c5fc645b0da2a85e6916..6b35ea17c72c29957acebe729a55d44c9ad8ae9f 100644 (file)
@@ -44,9 +44,6 @@
 #define ADC_V1_MUX(x)          ((x) + 0x1c)
 #define ADC_V1_CLRINTPNDNUP(x) ((x) + 0x20)
 
-/* S3C2410 ADC registers definitions */
-#define ADC_S3C2410_MUX(x)     ((x) + 0x18)
-
 /* Future ADC_V2 registers definitions */
 #define ADC_V2_CON1(x)         ((x) + 0x00)
 #define ADC_V2_CON2(x)         ((x) + 0x04)
 #define ADC_V1_CON_PRSCLV(x)   (((x) & 0xFF) << 6)
 #define ADC_V1_CON_STANDBY     (1u << 2)
 
-/* Bit definitions for S3C2410 ADC */
+/* Bit definitions for S3C2410 / S3C6410 ADC */
 #define ADC_S3C2410_CON_SELMUX(x) (((x) & 7) << 3)
-#define ADC_S3C2410_DATX_MASK  0x3FF
-#define ADC_S3C2416_CON_RES_SEL        (1u << 3)
 
 /* touch screen always uses channel 0 */
 #define ADC_S3C2410_MUX_TS     0
@@ -307,53 +302,6 @@ static const struct exynos_adc_data exynos_adc_s5pv210_data = {
        .start_conv     = exynos_adc_v1_start_conv,
 };
 
-static void exynos_adc_s3c2416_start_conv(struct exynos_adc *info,
-                                         unsigned long addr)
-{
-       u32 con1;
-
-       /* Enable 12 bit ADC resolution */
-       con1 = readl(ADC_V1_CON(info->regs));
-       con1 |= ADC_S3C2416_CON_RES_SEL;
-       writel(con1, ADC_V1_CON(info->regs));
-
-       /* Select channel for S3C2416 */
-       writel(addr, ADC_S3C2410_MUX(info->regs));
-
-       con1 = readl(ADC_V1_CON(info->regs));
-       writel(con1 | ADC_CON_EN_START, ADC_V1_CON(info->regs));
-}
-
-static struct exynos_adc_data const exynos_adc_s3c2416_data = {
-       .num_channels   = MAX_ADC_V1_CHANNELS,
-       .mask           = ADC_DATX_MASK,        /* 12 bit ADC resolution */
-
-       .init_hw        = exynos_adc_v1_init_hw,
-       .exit_hw        = exynos_adc_v1_exit_hw,
-       .start_conv     = exynos_adc_s3c2416_start_conv,
-};
-
-static void exynos_adc_s3c2443_start_conv(struct exynos_adc *info,
-                                         unsigned long addr)
-{
-       u32 con1;
-
-       /* Select channel for S3C2433 */
-       writel(addr, ADC_S3C2410_MUX(info->regs));
-
-       con1 = readl(ADC_V1_CON(info->regs));
-       writel(con1 | ADC_CON_EN_START, ADC_V1_CON(info->regs));
-}
-
-static struct exynos_adc_data const exynos_adc_s3c2443_data = {
-       .num_channels   = MAX_ADC_V1_CHANNELS,
-       .mask           = ADC_S3C2410_DATX_MASK, /* 10 bit ADC resolution */
-
-       .init_hw        = exynos_adc_v1_init_hw,
-       .exit_hw        = exynos_adc_v1_exit_hw,
-       .start_conv     = exynos_adc_s3c2443_start_conv,
-};
-
 static void exynos_adc_s3c64xx_start_conv(struct exynos_adc *info,
                                          unsigned long addr)
 {
@@ -365,15 +313,6 @@ static void exynos_adc_s3c64xx_start_conv(struct exynos_adc *info,
        writel(con1 | ADC_CON_EN_START, ADC_V1_CON(info->regs));
 }
 
-static struct exynos_adc_data const exynos_adc_s3c24xx_data = {
-       .num_channels   = MAX_ADC_V1_CHANNELS,
-       .mask           = ADC_S3C2410_DATX_MASK, /* 10 bit ADC resolution */
-
-       .init_hw        = exynos_adc_v1_init_hw,
-       .exit_hw        = exynos_adc_v1_exit_hw,
-       .start_conv     = exynos_adc_s3c64xx_start_conv,
-};
-
 static struct exynos_adc_data const exynos_adc_s3c64xx_data = {
        .num_channels   = MAX_ADC_V1_CHANNELS,
        .mask           = ADC_DATX_MASK,        /* 12 bit ADC resolution */
@@ -486,18 +425,6 @@ static const struct exynos_adc_data exynos7_adc_data = {
 
 static const struct of_device_id exynos_adc_match[] = {
        {
-               .compatible = "samsung,s3c2410-adc",
-               .data = &exynos_adc_s3c24xx_data,
-       }, {
-               .compatible = "samsung,s3c2416-adc",
-               .data = &exynos_adc_s3c2416_data,
-       }, {
-               .compatible = "samsung,s3c2440-adc",
-               .data = &exynos_adc_s3c24xx_data,
-       }, {
-               .compatible = "samsung,s3c2443-adc",
-               .data = &exynos_adc_s3c2443_data,
-       }, {
                .compatible = "samsung,s3c6410-adc",
                .data = &exynos_adc_s3c64xx_data,
        }, {