diff mbox

[v3,3/5] ARM: at91/dt: sama5d2: add adc device

Message ID 1452785897-16270-4-git-send-email-ludovic.desroches@atmel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ludovic Desroches Jan. 14, 2016, 3:38 p.m. UTC
Add the ADC device, and remove the adc_op_clk which is useless since the
adc sampling frequency is configured with sysfs.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
 arch/arm/boot/dts/sama5d2.dtsi | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Comments

Jonathan Cameron Jan. 16, 2016, 11:38 a.m. UTC | #1
On 14/01/16 15:38, Ludovic Desroches wrote:
> Add the ADC device, and remove the adc_op_clk which is useless since the
> adc sampling frequency is configured with sysfs.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
I've now applied the driver to the togreg branch of iio.git.
Should get a pull request out to Greg in about 2 weeks time and it'll
probably be in linux-next a week after that.  I'm assuming all the device
tree changes will got through the at91 tree and arm-soc etc. 
Shout if you want me to take them through IIO.

Thanks,

Jonathan
> ---
>  arch/arm/boot/dts/sama5d2.dtsi | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
> index 3f750f6..46dd430 100644
> --- a/arch/arm/boot/dts/sama5d2.dtsi
> +++ b/arch/arm/boot/dts/sama5d2.dtsi
> @@ -88,12 +88,6 @@
>  			#clock-cells = <0>;
>  			clock-frequency = <0>;
>  		};
> -
> -		adc_op_clk: adc_op_clk{
> -			compatible = "fixed-clock";
> -			#clock-cells = <0>;
> -			clock-frequency = <1000000>;
> -		};
>  	};
>  
>  	ns_sram: sram@00200000 {
> @@ -1085,6 +1079,18 @@
>  				status = "disabled";
>  			};
>  
> +			adc: adc@fc030000 {
> +				compatible = "atmel,sama5d2-adc";
> +				reg = <0xfc030000 0x100>;
> +				interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>;
> +				clocks = <&adc_clk>;
> +				clock-names = "adc_clk";
> +				atmel,min-sample-rate-hz = <200000>;
> +				atmel,max-sample-rate-hz = <20000000>;
> +				atmel,startup-time-ms = <4>;
> +				status = "disabled";
> +			};
> +
>  			pioA: pinctrl@fc038000 {
>  				compatible = "atmel,sama5d2-pinctrl";
>  				reg = <0xfc038000 0x600>;
>
Ludovic Desroches Jan. 18, 2016, 7:59 a.m. UTC | #2
On Sat, Jan 16, 2016 at 11:38:30AM +0000, Jonathan Cameron wrote:
> On 14/01/16 15:38, Ludovic Desroches wrote:
> > Add the ADC device, and remove the adc_op_clk which is useless since the
> > adc sampling frequency is configured with sysfs.
> > 
> > Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> I've now applied the driver to the togreg branch of iio.git.
> Should get a pull request out to Greg in about 2 weeks time and it'll
> probably be in linux-next a week after that.  I'm assuming all the device
> tree changes will got through the at91 tree and arm-soc etc. 
> Shout if you want me to take them through IIO.
> 

Ok, I think Nicolas would take this patch.

Regards

Ludovic

> Thanks,
> 
> Jonathan
> > ---
> >  arch/arm/boot/dts/sama5d2.dtsi | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
> > index 3f750f6..46dd430 100644
> > --- a/arch/arm/boot/dts/sama5d2.dtsi
> > +++ b/arch/arm/boot/dts/sama5d2.dtsi
> > @@ -88,12 +88,6 @@
> >  			#clock-cells = <0>;
> >  			clock-frequency = <0>;
> >  		};
> > -
> > -		adc_op_clk: adc_op_clk{
> > -			compatible = "fixed-clock";
> > -			#clock-cells = <0>;
> > -			clock-frequency = <1000000>;
> > -		};
> >  	};
> >  
> >  	ns_sram: sram@00200000 {
> > @@ -1085,6 +1079,18 @@
> >  				status = "disabled";
> >  			};
> >  
> > +			adc: adc@fc030000 {
> > +				compatible = "atmel,sama5d2-adc";
> > +				reg = <0xfc030000 0x100>;
> > +				interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>;
> > +				clocks = <&adc_clk>;
> > +				clock-names = "adc_clk";
> > +				atmel,min-sample-rate-hz = <200000>;
> > +				atmel,max-sample-rate-hz = <20000000>;
> > +				atmel,startup-time-ms = <4>;
> > +				status = "disabled";
> > +			};
> > +
> >  			pioA: pinctrl@fc038000 {
> >  				compatible = "atmel,sama5d2-pinctrl";
> >  				reg = <0xfc038000 0x600>;
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nicolas Ferre Jan. 18, 2016, 8:09 a.m. UTC | #3
Le 18/01/2016 08:59, Ludovic Desroches a écrit :
> On Sat, Jan 16, 2016 at 11:38:30AM +0000, Jonathan Cameron wrote:
>> On 14/01/16 15:38, Ludovic Desroches wrote:
>>> Add the ADC device, and remove the adc_op_clk which is useless since the
>>> adc sampling frequency is configured with sysfs.
>>>
>>> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
>> I've now applied the driver to the togreg branch of iio.git.
>> Should get a pull request out to Greg in about 2 weeks time and it'll
>> probably be in linux-next a week after that.  I'm assuming all the device
>> tree changes will got through the at91 tree and arm-soc etc. 
>> Shout if you want me to take them through IIO.
>>
> 
> Ok, I think Nicolas would take this patch.

Sure, we'll take them through AT91 then arm-soc trees.

Thanks, bye.


>>> ---
>>>  arch/arm/boot/dts/sama5d2.dtsi | 18 ++++++++++++------
>>>  1 file changed, 12 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
>>> index 3f750f6..46dd430 100644
>>> --- a/arch/arm/boot/dts/sama5d2.dtsi
>>> +++ b/arch/arm/boot/dts/sama5d2.dtsi
>>> @@ -88,12 +88,6 @@
>>>  			#clock-cells = <0>;
>>>  			clock-frequency = <0>;
>>>  		};
>>> -
>>> -		adc_op_clk: adc_op_clk{
>>> -			compatible = "fixed-clock";
>>> -			#clock-cells = <0>;
>>> -			clock-frequency = <1000000>;
>>> -		};
>>>  	};
>>>  
>>>  	ns_sram: sram@00200000 {
>>> @@ -1085,6 +1079,18 @@
>>>  				status = "disabled";
>>>  			};
>>>  
>>> +			adc: adc@fc030000 {
>>> +				compatible = "atmel,sama5d2-adc";
>>> +				reg = <0xfc030000 0x100>;
>>> +				interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>;
>>> +				clocks = <&adc_clk>;
>>> +				clock-names = "adc_clk";
>>> +				atmel,min-sample-rate-hz = <200000>;
>>> +				atmel,max-sample-rate-hz = <20000000>;
>>> +				atmel,startup-time-ms = <4>;
>>> +				status = "disabled";
>>> +			};
>>> +
>>>  			pioA: pinctrl@fc038000 {
>>>  				compatible = "atmel,sama5d2-pinctrl";
>>>  				reg = <0xfc038000 0x600>;
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
index 3f750f6..46dd430 100644
--- a/arch/arm/boot/dts/sama5d2.dtsi
+++ b/arch/arm/boot/dts/sama5d2.dtsi
@@ -88,12 +88,6 @@ 
 			#clock-cells = <0>;
 			clock-frequency = <0>;
 		};
-
-		adc_op_clk: adc_op_clk{
-			compatible = "fixed-clock";
-			#clock-cells = <0>;
-			clock-frequency = <1000000>;
-		};
 	};
 
 	ns_sram: sram@00200000 {
@@ -1085,6 +1079,18 @@ 
 				status = "disabled";
 			};
 
+			adc: adc@fc030000 {
+				compatible = "atmel,sama5d2-adc";
+				reg = <0xfc030000 0x100>;
+				interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>;
+				clocks = <&adc_clk>;
+				clock-names = "adc_clk";
+				atmel,min-sample-rate-hz = <200000>;
+				atmel,max-sample-rate-hz = <20000000>;
+				atmel,startup-time-ms = <4>;
+				status = "disabled";
+			};
+
 			pioA: pinctrl@fc038000 {
 				compatible = "atmel,sama5d2-pinctrl";
 				reg = <0xfc038000 0x600>;