From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 753CAC433EF for ; Tue, 1 Feb 2022 05:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7Svrzcm1rXJVuxYN5CFLpQdSYi5WSjTaMADgKnhJxd4=; b=zZykBa5FfS1QER uUo6psYSOGdfArOitwGytQFq5wQG40dLoWorhjrgNZok6/9iLzvI+DwKzNCKR3mlCaIJAM5KB8OsC hOuZNAq79e6Evd12FAc/nuIQBzfWEY6Id30HdlFxFjBC9eTcPSkn3QmyRiav5YOuJovTBWSakN9gf JFkIyrgbCNrxbu7zTMUrkbMaUyZYm8p2PBfy8BL4I4vOCExjSvCn4gaGtlI+K+vyDfVM7WoRE6t/i 9oqNCvSEHTSrRW42vgNcoQTeTGb0C7frOfNxy7LpxZYmtO2JVKVOfFMbX6kQ4d7cAks9K/xOOgQpk wf7B8feORIh1FfyurUCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nElhC-00BD7p-0h; Tue, 01 Feb 2022 05:27:14 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nElh8-00BD6p-OM for linux-arm-kernel@lists.infradead.org; Tue, 01 Feb 2022 05:27:12 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nElgr-0006gu-WF; Tue, 01 Feb 2022 06:26:54 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nElgo-00085c-RL; Tue, 01 Feb 2022 06:26:50 +0100 Date: Tue, 1 Feb 2022 06:26:50 +0100 From: Oleksij Rempel To: Sam Ravnborg Cc: Mark Rutland , devicetree@vger.kernel.org, Pengutronix Kernel Team , dri-devel@lists.freedesktop.org, Robin van der Gracht , David Airlie , Fabio Estevam , Sascha Hauer , linux-kernel@vger.kernel.org, Rob Herring , Thierry Reding , NXP Linux Team , Daniel Vetter , David Jander , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 4/5] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver Message-ID: <20220201052650.GA29389@pengutronix.de> References: <20220131102841.1955032-1-o.rempel@pengutronix.de> <20220131102841.1955032-5-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 06:19:47 up 52 days, 14:05, 47 users, load average: 0.17, 0.16, 0.12 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220131_212710_805462_5758AD14 X-CRM114-Status: GOOD ( 30.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sam, On Mon, Jan 31, 2022 at 04:42:06PM +0100, Sam Ravnborg wrote: > On Mon, Jan 31, 2022 at 11:28:40AM +0100, Oleksij Rempel wrote: > > The tsc2046 is an ADC used as touchscreen controller. To share as mach > much > > code as possible, we should use it as actual ADC + virtual touchscreen > > controller. > > With this patch we make use of the new kernel IIO and HID infrastructure. > > > > Signed-off-by: Oleksij Rempel > > --- > > arch/arm/boot/dts/imx6dl-plym2m.dts | 59 +++++++++++++++++++++-------- > > arch/arm/boot/dts/imx6dl-prtvt7.dts | 57 +++++++++++++++++++++------- > > arch/arm/boot/dts/imx6dl-victgo.dts | 59 ++++++++++++++++++++++------- > > 3 files changed, 132 insertions(+), 43 deletions(-) > > > > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts > > index 60fe5f14666e..73c7622bfe0f 100644 > > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts > > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts > > @@ -101,6 +101,18 @@ reg_12v0: regulator-12v0 { > > regulator-min-microvolt = <12000000>; > > regulator-max-microvolt = <12000000>; > > }; > > + > > + touchscreen { > > + compatible = "resistive-adc-touch"; > > + io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, > > + <&adc_ts 5>; > > + io-channel-names = "y", "z1", "z2", "x"; > > + touchscreen-min-pressure = <64687>; > > + touchscreen-inverted-x; > > + touchscreen-inverted-y; > > + touchscreen-x-plate-ohms = <300>; > > + touchscreen-y-plate-ohms = <800>; > > + }; > > }; > > > > &can1 { > > @@ -129,26 +141,41 @@ &ecspi2 { > > pinctrl-0 = <&pinctrl_ecspi2>; > > status = "okay"; > > > > - touchscreen@0 { > > - compatible = "ti,tsc2046"; > > + adc_ts: adc@0 { > > + compatible = "ti,tsc2046e-adc"; > > reg = <0>; > > pinctrl-0 = <&pinctrl_tsc2046>; > > pinctrl-names ="default"; > > - spi-max-frequency = <100000>; > > - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>; > > - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>; > > + spi-max-frequency = <1000000>; > > + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>; > > + #io-channel-cells = <1>; > > I quickly skimmed the patch - we seem to loose the pendown-gpio in most > of the patches - I do not see it replaced. pendown-gpio is not used by the new driver. It is replace by the IIO trigger. Please see this comment: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/drivers/iio/adc/ti-tsc2046.c?h=testing#n521 Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 841ECC433F5 for ; Tue, 1 Feb 2022 05:27:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbiBAF07 (ORCPT ); Tue, 1 Feb 2022 00:26:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbiBAF07 (ORCPT ); Tue, 1 Feb 2022 00:26:59 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB7A6C061714 for ; Mon, 31 Jan 2022 21:26:58 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nElgr-0006gu-WF; Tue, 01 Feb 2022 06:26:54 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nElgo-00085c-RL; Tue, 01 Feb 2022 06:26:50 +0100 Date: Tue, 1 Feb 2022 06:26:50 +0100 From: Oleksij Rempel To: Sam Ravnborg Cc: Mark Rutland , devicetree@vger.kernel.org, Pengutronix Kernel Team , dri-devel@lists.freedesktop.org, Robin van der Gracht , David Airlie , Fabio Estevam , Sascha Hauer , linux-kernel@vger.kernel.org, Rob Herring , Thierry Reding , NXP Linux Team , Daniel Vetter , David Jander , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 4/5] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver Message-ID: <20220201052650.GA29389@pengutronix.de> References: <20220131102841.1955032-1-o.rempel@pengutronix.de> <20220131102841.1955032-5-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 06:19:47 up 52 days, 14:05, 47 users, load average: 0.17, 0.16, 0.12 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Sam, On Mon, Jan 31, 2022 at 04:42:06PM +0100, Sam Ravnborg wrote: > On Mon, Jan 31, 2022 at 11:28:40AM +0100, Oleksij Rempel wrote: > > The tsc2046 is an ADC used as touchscreen controller. To share as mach > much > > code as possible, we should use it as actual ADC + virtual touchscreen > > controller. > > With this patch we make use of the new kernel IIO and HID infrastructure. > > > > Signed-off-by: Oleksij Rempel > > --- > > arch/arm/boot/dts/imx6dl-plym2m.dts | 59 +++++++++++++++++++++-------- > > arch/arm/boot/dts/imx6dl-prtvt7.dts | 57 +++++++++++++++++++++------- > > arch/arm/boot/dts/imx6dl-victgo.dts | 59 ++++++++++++++++++++++------- > > 3 files changed, 132 insertions(+), 43 deletions(-) > > > > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts > > index 60fe5f14666e..73c7622bfe0f 100644 > > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts > > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts > > @@ -101,6 +101,18 @@ reg_12v0: regulator-12v0 { > > regulator-min-microvolt = <12000000>; > > regulator-max-microvolt = <12000000>; > > }; > > + > > + touchscreen { > > + compatible = "resistive-adc-touch"; > > + io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, > > + <&adc_ts 5>; > > + io-channel-names = "y", "z1", "z2", "x"; > > + touchscreen-min-pressure = <64687>; > > + touchscreen-inverted-x; > > + touchscreen-inverted-y; > > + touchscreen-x-plate-ohms = <300>; > > + touchscreen-y-plate-ohms = <800>; > > + }; > > }; > > > > &can1 { > > @@ -129,26 +141,41 @@ &ecspi2 { > > pinctrl-0 = <&pinctrl_ecspi2>; > > status = "okay"; > > > > - touchscreen@0 { > > - compatible = "ti,tsc2046"; > > + adc_ts: adc@0 { > > + compatible = "ti,tsc2046e-adc"; > > reg = <0>; > > pinctrl-0 = <&pinctrl_tsc2046>; > > pinctrl-names ="default"; > > - spi-max-frequency = <100000>; > > - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>; > > - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>; > > + spi-max-frequency = <1000000>; > > + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>; > > + #io-channel-cells = <1>; > > I quickly skimmed the patch - we seem to loose the pendown-gpio in most > of the patches - I do not see it replaced. pendown-gpio is not used by the new driver. It is replace by the IIO trigger. Please see this comment: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/drivers/iio/adc/ti-tsc2046.c?h=testing#n521 Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA305C433EF for ; Tue, 1 Feb 2022 05:26:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8EEB10E60D; Tue, 1 Feb 2022 05:26:57 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 87E7C10E609 for ; Tue, 1 Feb 2022 05:26:56 +0000 (UTC) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nElgr-0006gu-WF; Tue, 01 Feb 2022 06:26:54 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nElgo-00085c-RL; Tue, 01 Feb 2022 06:26:50 +0100 Date: Tue, 1 Feb 2022 06:26:50 +0100 From: Oleksij Rempel To: Sam Ravnborg Subject: Re: [PATCH v2 4/5] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver Message-ID: <20220201052650.GA29389@pengutronix.de> References: <20220131102841.1955032-1-o.rempel@pengutronix.de> <20220131102841.1955032-5-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 06:19:47 up 52 days, 14:05, 47 users, load average: 0.17, 0.16, 0.12 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, David Airlie , Robin van der Gracht , Sascha Hauer , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , Thierry Reding , NXP Linux Team , Pengutronix Kernel Team , David Jander , Shawn Guo , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Sam, On Mon, Jan 31, 2022 at 04:42:06PM +0100, Sam Ravnborg wrote: > On Mon, Jan 31, 2022 at 11:28:40AM +0100, Oleksij Rempel wrote: > > The tsc2046 is an ADC used as touchscreen controller. To share as mach > much > > code as possible, we should use it as actual ADC + virtual touchscreen > > controller. > > With this patch we make use of the new kernel IIO and HID infrastructure. > > > > Signed-off-by: Oleksij Rempel > > --- > > arch/arm/boot/dts/imx6dl-plym2m.dts | 59 +++++++++++++++++++++-------- > > arch/arm/boot/dts/imx6dl-prtvt7.dts | 57 +++++++++++++++++++++------- > > arch/arm/boot/dts/imx6dl-victgo.dts | 59 ++++++++++++++++++++++------- > > 3 files changed, 132 insertions(+), 43 deletions(-) > > > > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts > > index 60fe5f14666e..73c7622bfe0f 100644 > > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts > > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts > > @@ -101,6 +101,18 @@ reg_12v0: regulator-12v0 { > > regulator-min-microvolt = <12000000>; > > regulator-max-microvolt = <12000000>; > > }; > > + > > + touchscreen { > > + compatible = "resistive-adc-touch"; > > + io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, > > + <&adc_ts 5>; > > + io-channel-names = "y", "z1", "z2", "x"; > > + touchscreen-min-pressure = <64687>; > > + touchscreen-inverted-x; > > + touchscreen-inverted-y; > > + touchscreen-x-plate-ohms = <300>; > > + touchscreen-y-plate-ohms = <800>; > > + }; > > }; > > > > &can1 { > > @@ -129,26 +141,41 @@ &ecspi2 { > > pinctrl-0 = <&pinctrl_ecspi2>; > > status = "okay"; > > > > - touchscreen@0 { > > - compatible = "ti,tsc2046"; > > + adc_ts: adc@0 { > > + compatible = "ti,tsc2046e-adc"; > > reg = <0>; > > pinctrl-0 = <&pinctrl_tsc2046>; > > pinctrl-names ="default"; > > - spi-max-frequency = <100000>; > > - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>; > > - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>; > > + spi-max-frequency = <1000000>; > > + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>; > > + #io-channel-cells = <1>; > > I quickly skimmed the patch - we seem to loose the pendown-gpio in most > of the patches - I do not see it replaced. pendown-gpio is not used by the new driver. It is replace by the IIO trigger. Please see this comment: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/drivers/iio/adc/ti-tsc2046.c?h=testing#n521 Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |