Re: [PATCH AUTOSEL 4.19 066/167] iio: adc: exynos-adc: Add S5PV210 variant

2019-09-07 Thread Jonathan Cameron
On Tue, 3 Sep 2019 15:46:54 -0400
Sasha Levin  wrote:

> On Tue, Sep 03, 2019 at 06:53:28PM +0100, Jonathan Cameron wrote:
> >On Tue,  3 Sep 2019 12:23:38 -0400
> >Sasha Levin  wrote:
> >  
> >> From: Jonathan Bakker 
> >>
> >> [ Upstream commit 882bf52fdeab47dbe991cc0e564b0b51c571d0a3 ]
> >>
> >> S5PV210's ADC variant is almost the same as v1 except that it has 10
> >> channels and doesn't require the pmu register
> >>
> >> Signed-off-by: Jonathan Bakker 
> >> Signed-off-by: Paweł Chmiel 
> >> Signed-off-by: Jonathan Cameron 
> >> Signed-off-by: Sasha Levin   
> >
> >I have no particular objection to adding new IDs (which is more
> >or less what this patch is), but I didn't know autosel was
> >picking them up.  So a bit of surprise... If intentional
> >then fine to apply to stable.  
> 
> I dragged it in because 103cda6a3b8d2 ("iio: adc: exynos-adc: Use proper
> number of channels for Exynos4x12") which is tagged for stable depended
> on this patch, and given it just adds new IDs which is part of what we
> take for stable I just took it in as is.
Ah fair enough!  Thanks for the explanation.

Jonathan

> 
> --
> Thanks,
> Sasha



Re: [PATCH AUTOSEL 4.19 066/167] iio: adc: exynos-adc: Add S5PV210 variant

2019-09-03 Thread Sasha Levin

On Tue, Sep 03, 2019 at 06:53:28PM +0100, Jonathan Cameron wrote:

On Tue,  3 Sep 2019 12:23:38 -0400
Sasha Levin  wrote:


From: Jonathan Bakker 

[ Upstream commit 882bf52fdeab47dbe991cc0e564b0b51c571d0a3 ]

S5PV210's ADC variant is almost the same as v1 except that it has 10
channels and doesn't require the pmu register

Signed-off-by: Jonathan Bakker 
Signed-off-by: Paweł Chmiel 
Signed-off-by: Jonathan Cameron 
Signed-off-by: Sasha Levin 


I have no particular objection to adding new IDs (which is more
or less what this patch is), but I didn't know autosel was
picking them up.  So a bit of surprise... If intentional
then fine to apply to stable.


I dragged it in because 103cda6a3b8d2 ("iio: adc: exynos-adc: Use proper
number of channels for Exynos4x12") which is tagged for stable depended
on this patch, and given it just adds new IDs which is part of what we
take for stable I just took it in as is.

--
Thanks,
Sasha


Re: [PATCH AUTOSEL 4.19 066/167] iio: adc: exynos-adc: Add S5PV210 variant

2019-09-03 Thread Jonathan Cameron
On Tue,  3 Sep 2019 12:23:38 -0400
Sasha Levin  wrote:

> From: Jonathan Bakker 
> 
> [ Upstream commit 882bf52fdeab47dbe991cc0e564b0b51c571d0a3 ]
> 
> S5PV210's ADC variant is almost the same as v1 except that it has 10
> channels and doesn't require the pmu register
> 
> Signed-off-by: Jonathan Bakker 
> Signed-off-by: Paweł Chmiel 
> Signed-off-by: Jonathan Cameron 
> Signed-off-by: Sasha Levin 

I have no particular objection to adding new IDs (which is more
or less what this patch is), but I didn't know autosel was
picking them up.  So a bit of surprise... If intentional
then fine to apply to stable.

> ---
>  drivers/iio/adc/exynos_adc.c | 14 ++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
> index 4be29ed447559..41da522fc6735 100644
> --- a/drivers/iio/adc/exynos_adc.c
> +++ b/drivers/iio/adc/exynos_adc.c
> @@ -115,6 +115,7 @@
>  #define MAX_ADC_V2_CHANNELS  10
>  #define MAX_ADC_V1_CHANNELS  8
>  #define MAX_EXYNOS3250_ADC_CHANNELS  2
> +#define MAX_S5PV210_ADC_CHANNELS 10
>  
>  /* Bit definitions common for ADC_V1 and ADC_V2 */
>  #define ADC_CON_EN_START (1u << 0)
> @@ -282,6 +283,16 @@ static const struct exynos_adc_data exynos_adc_v1_data = 
> {
>   .start_conv = exynos_adc_v1_start_conv,
>  };
>  
> +static const struct exynos_adc_data exynos_adc_s5pv210_data = {
> + .num_channels   = MAX_S5PV210_ADC_CHANNELS,
> + .mask   = ADC_DATX_MASK,/* 12 bit ADC resolution */
> +
> + .init_hw= exynos_adc_v1_init_hw,
> + .exit_hw= exynos_adc_v1_exit_hw,
> + .clear_irq  = exynos_adc_v1_clear_irq,
> + .start_conv = exynos_adc_v1_start_conv,
> +};
> +
>  static void exynos_adc_s3c2416_start_conv(struct exynos_adc *info,
> unsigned long addr)
>  {
> @@ -478,6 +489,9 @@ static const struct of_device_id exynos_adc_match[] = {
>   }, {
>   .compatible = "samsung,s3c6410-adc",
>   .data = _adc_s3c64xx_data,
> + }, {
> + .compatible = "samsung,s5pv210-adc",
> + .data = _adc_s5pv210_data,
>   }, {
>   .compatible = "samsung,exynos-adc-v1",
>   .data = _adc_v1_data,