[v4,3/3] ARM: dts: use syscon in cygnus touchscreen dt node
diff mbox

Message ID 1456556396-4759-4-git-send-email-raveendra.padasalagi@broadcom.com
State Under Review
Headers show

Commit Message

Raveendra Padasalagi Feb. 27, 2016, 6:59 a.m. UTC
In Cygnus SOC touch screen controller registers are shared
with ADC and flex timer. Using readl/writel could lead to
race condition. So touchscreen driver is enhanced to support
syscon based register access to take care of mutually exclusive
access.

This patch enables syscon support in touchscreen driver
by adding necessary properties in touchscreen dt node and
in addition to this renamed existing "tsc" touchscreen node
name to "touchscreen".

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
---
 arch/arm/boot/dts/bcm-cygnus.dtsi | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Dmitry Torokhov April 6, 2016, 5:31 p.m. UTC | #1
On Sat, Feb 27, 2016 at 12:29:56PM +0530, Raveendra Padasalagi wrote:
> In Cygnus SOC touch screen controller registers are shared
> with ADC and flex timer. Using readl/writel could lead to
> race condition. So touchscreen driver is enhanced to support
> syscon based register access to take care of mutually exclusive
> access.
> 
> This patch enables syscon support in touchscreen driver
> by adding necessary properties in touchscreen dt node and
> in addition to this renamed existing "tsc" touchscreen node
> name to "touchscreen".
> 
> Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
> Reviewed-by: Scott Branden <scott.branden@broadcom.com>

OK, since the new dts is really needed for the driver I'll be folding
this into the touchscreen driver patch unless I hear someone yelling at
me.

Thanks!

> ---
>  arch/arm/boot/dts/bcm-cygnus.dtsi | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
> index 3878793..b42fe55 100644
> --- a/arch/arm/boot/dts/bcm-cygnus.dtsi
> +++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
> @@ -351,9 +351,16 @@
>  					<&pinctrl 142 10 1>;
>  		};
>  
> -		touchscreen: tsc@180a6000 {
> +		ts_adc_syscon: ts_adc_syscon@180a6000 {
> +			compatible = "brcm,iproc-ts-adc-syscon", "syscon";
> +			reg = <0x180a6000 0xc30>;
> +		};
> +
> +		touchscreen: touchscreen@180a6000 {
>  			compatible = "brcm,iproc-touchscreen";
> -			reg = <0x180a6000 0x40>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ts_syscon = <&ts_adc_syscon>;
>  			clocks = <&asiu_clks BCM_CYGNUS_ASIU_ADC_CLK>;
>  			clock-names = "tsc_clk";
>  			interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
> -- 
> 1.9.1
>
Florian Fainelli April 6, 2016, 8:25 p.m. UTC | #2
2016-04-06 10:31 GMT-07:00 Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> On Sat, Feb 27, 2016 at 12:29:56PM +0530, Raveendra Padasalagi wrote:
>> In Cygnus SOC touch screen controller registers are shared
>> with ADC and flex timer. Using readl/writel could lead to
>> race condition. So touchscreen driver is enhanced to support
>> syscon based register access to take care of mutually exclusive
>> access.
>>
>> This patch enables syscon support in touchscreen driver
>> by adding necessary properties in touchscreen dt node and
>> in addition to this renamed existing "tsc" touchscreen node
>> name to "touchscreen".
>>
>> Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
>> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
>> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
>
> OK, since the new dts is really needed for the driver I'll be folding
> this into the touchscreen driver patch unless I hear someone yelling at
> me.

Works for me:

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Raveendra Padasalagi May 5, 2016, 5:47 a.m. UTC | #3
Thanks Dmitry and Florian.

Hi Dmitry,

I understand the dts changes are really needed for the touch screen
driver changes made in this patch. But currently there are no deployed
systems/customer's using this driver. So please pull the driver changes
and I will follow up to make sure dts changes also goes in.

Below is the latest patch set pushed.

https://lkml.org/lkml/2016/3/24/45


Thanks ,
Raveendra

On Thu, Apr 7, 2016 at 1:55 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> 2016-04-06 10:31 GMT-07:00 Dmitry Torokhov <dmitry.torokhov@gmail.com>:
>> On Sat, Feb 27, 2016 at 12:29:56PM +0530, Raveendra Padasalagi wrote:
>>> In Cygnus SOC touch screen controller registers are shared
>>> with ADC and flex timer. Using readl/writel could lead to
>>> race condition. So touchscreen driver is enhanced to support
>>> syscon based register access to take care of mutually exclusive
>>> access.
>>>
>>> This patch enables syscon support in touchscreen driver
>>> by adding necessary properties in touchscreen dt node and
>>> in addition to this renamed existing "tsc" touchscreen node
>>> name to "touchscreen".
>>>
>>> Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
>>> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
>>> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
>>
>> OK, since the new dts is really needed for the driver I'll be folding
>> this into the touchscreen driver patch unless I hear someone yelling at
>> me.
>
> Works for me:
>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> --
> Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov May 5, 2016, 6:44 p.m. UTC | #4
Hi Raveendra,

On Thu, May 05, 2016 at 11:17:00AM +0530, Raveendra Padasalagi wrote:
> Thanks Dmitry and Florian.
> 
> Hi Dmitry,
> 
> I understand the dts changes are really needed for the touch screen
> driver changes made in this patch. But currently there are no deployed
> systems/customer's using this driver. So please pull the driver changes
> and I will follow up to make sure dts changes also goes in.
> 
> Below is the latest patch set pushed.
> 
> https://lkml.org/lkml/2016/3/24/45

I have the driver, binding doc changes, and changes to
arch/arm/boot/dts/bcm-cygnus.dtsi as
74813cebd678dd471b4fcd7d3019aecab9dbcedd in my 'next' branch, so it will
be merged in the next merge window.

Thanks.

Patch
diff mbox

diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
index 3878793..b42fe55 100644
--- a/arch/arm/boot/dts/bcm-cygnus.dtsi
+++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
@@ -351,9 +351,16 @@ 
 					<&pinctrl 142 10 1>;
 		};
 
-		touchscreen: tsc@180a6000 {
+		ts_adc_syscon: ts_adc_syscon@180a6000 {
+			compatible = "brcm,iproc-ts-adc-syscon", "syscon";
+			reg = <0x180a6000 0xc30>;
+		};
+
+		touchscreen: touchscreen@180a6000 {
 			compatible = "brcm,iproc-touchscreen";
-			reg = <0x180a6000 0x40>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ts_syscon = <&ts_adc_syscon>;
 			clocks = <&asiu_clks BCM_CYGNUS_ASIU_ADC_CLK>;
 			clock-names = "tsc_clk";
 			interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;