diff mbox

[v3,3/3] ARM: dts: use syscon in cygnus touchscreen dt node

Message ID 1456127379-25866-4-git-send-email-raveendra.padasalagi@broadcom.com (mailing list archive)
State New, archived
Headers show

Commit Message

Raveendra Padasalagi Feb. 22, 2016, 7:49 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 in such case register access is handled
through syscon framework API's in the touch screen driver.
This feature is enabled if "brcm,iproc-touchscreen-syscon"
compatible string is selected in touchscreen dt node.

So this patch enables syscon support in touchscreen driver
by adding necessary properties in touchscreen dt node.

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

Raveendra Padasalagi Feb. 22, 2016, 8:10 a.m. UTC | #1
On Mon, Feb 22, 2016 at 1:19 PM, Raveendra Padasalagi
<raveendra.padasalagi@broadcom.com> wrote:
> In Cygnus SOC touch screen controller registers are shared
> with ADC and flex timer. Using readl/writel could lead to
> race condition. So in such case register access is handled
> through syscon framework API's in the touch screen driver.
> This feature is enabled if "brcm,iproc-touchscreen-syscon"
> compatible string is selected in touchscreen dt node.
>
> So this patch enables syscon support in touchscreen driver
> by adding necessary properties in touchscreen dt node.
>
> 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(-)
>
> diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
> index 3878793..1704dc0 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>;
>                 };
>
> +               ts_adc_syscon: ts_adc_syscon@180a6000 {
> +                       compatible = "brcm,iproc-ts-adc-syscon","syscon";
> +                       reg = <0x180a6000 0xc30>;
> +               };
> +
>                 touchscreen: tsc@180a6000 {
> -                       compatible = "brcm,iproc-touchscreen";
> -                       reg = <0x180a6000 0x40>;
> +                       compatible = "brcm,iproc-touchscreen-syscon";

Hi Rob,
In patchset V2 you had a comment as to have only "syscon" support,
Since having "syscon" only support breaks the dt backward compatibility
as the existing driver has support for "reg".  So in patchset V3 I have
not addressed this comment yet. Waiting for your opinion on whether
to proceed with "syscon" only support.

-Raveendra
> +                       #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
>
--
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
diff mbox

Patch

diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
index 3878793..1704dc0 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>;
 		};
 
+		ts_adc_syscon: ts_adc_syscon@180a6000 {
+			compatible = "brcm,iproc-ts-adc-syscon","syscon";
+			reg = <0x180a6000 0xc30>;
+		};
+
 		touchscreen: tsc@180a6000 {
-			compatible = "brcm,iproc-touchscreen";
-			reg = <0x180a6000 0x40>;
+			compatible = "brcm,iproc-touchscreen-syscon";
+			#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>;