arm: exynos: Use proper ADC device name
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 14 Jan 2020 14:04:20 +0000 (15:04 +0100)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 23 Jan 2020 02:41:49 +0000 (11:41 +0900)
Since commit 4213609cc7 ("drivers: core: use strcmp when find device by
name") one has to provide full name to get requested object. Fix the code
used to detect Odroid board revision to use proper ADC device name then.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/common/exynos5-dt-types.c

index 516c32923e44df5f78d5cb165234569364ae7397..d51cc4eedcbc431ae49128e5abbb666df6d7f895 100644 (file)
@@ -67,7 +67,7 @@ static int odroid_get_adc_val(unsigned int *adcval)
        unsigned int adcval_prev = 0;
        int ret, retries = 20;
 
-       ret = adc_channel_single_shot("adc", CONFIG_ODROID_REV_AIN,
+       ret = adc_channel_single_shot("adc@12D10000", CONFIG_ODROID_REV_AIN,
                                      &adcval_prev);
        if (ret)
                return ret;
@@ -75,8 +75,8 @@ static int odroid_get_adc_val(unsigned int *adcval)
        while (retries--) {
                mdelay(5);
 
-               ret = adc_channel_single_shot("adc", CONFIG_ODROID_REV_AIN,
-                                             adcval);
+               ret = adc_channel_single_shot("adc@12D10000",
+                                             CONFIG_ODROID_REV_AIN, adcval);
                if (ret)
                        return ret;