arm: exynos: Use proper ADC device name
diff mbox series

Message ID 20200114140420.12542-1-m.szyprowski@samsung.com
State Accepted
Commit fa06669d0181b2c92ba86fb6c40a4cb0c196b13c
Delegated to: Minkyu Kang
Headers show
Series
  • arm: exynos: Use proper ADC device name
Related show

Commit Message

Marek Szyprowski Jan. 14, 2020, 2:04 p.m. UTC
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>
---
 board/samsung/common/exynos5-dt-types.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Anand Moon Jan. 15, 2020, 4:25 p.m. UTC | #1
Hi Marek,

On Tue, 14 Jan 2020 at 19:34, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> 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>
> ---
>  board/samsung/common/exynos5-dt-types.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c
> index 516c32923e..d51cc4eedc 100644
> --- a/board/samsung/common/exynos5-dt-types.c
> +++ b/board/samsung/common/exynos5-dt-types.c
> @@ -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;
>
> --
> 2.17.1
>

Please add my
Reviewed-by: Anand Moon <linux.amoon@gmail.com>

-Anand
Minkyu Kang Jan. 28, 2020, 9:14 a.m. UTC | #2
On 14/01/2020 23:04, Marek Szyprowski wrote:
> 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>
> ---
>  board/samsung/common/exynos5-dt-types.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c
> index 516c32923e..d51cc4eedc 100644
> --- a/board/samsung/common/exynos5-dt-types.c
> +++ b/board/samsung/common/exynos5-dt-types.c
> @@ -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;
>  
> 

applied to u-boot-samsung.

Thanks,
Minkyu Kang.

Patch
diff mbox series

diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c
index 516c32923e..d51cc4eedc 100644
--- a/board/samsung/common/exynos5-dt-types.c
+++ b/board/samsung/common/exynos5-dt-types.c
@@ -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;