All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz <foss+kernel@0leil.net>
To: "Samuel Holland" <samuel@sholland.org>,
	"Bastien Nocera" <hadess@hadess.net>,
	"Guido Günther" <agx@sigxcpu.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Angus Ainslie" <angus@akkea.ca>,
	"Ondrej Jirman" <megous@megous.com>,
	"Icenowy Zheng" <icenowy@aosc.io>,
	"Andy Gross" <agross@kernel.org>,
	"Aleksei Mamlin" <mamlinav@gmail.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"David Jander" <david@protonic.nl>,
	"Frieder Schrempf" <frieder.schrempf@kontron.de>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@somainline.org>,
	"Peter Geis" <pgwipeout@gmail.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Lukasz Majewski" <lukma@denx.de>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@somainline.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Michael Riesch" <michael.riesch@wolfvision.net>,
	"Rob Herring" <robh+dt@kernel.org>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev,
	devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: [PATCH v3 1/9] Input: goodix - add macro for gpio mapping
Date: Mon,  5 Dec 2022 14:40:30 +0100	[thread overview]
Message-ID: <20221103-upstream-goodix-reset-v3-1-0975809eb183@theobroma-systems.com> (raw)
In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com>

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

To prepare for the quirks member to be set for all pins, which would
make the line longer than allowed, let's move all mappings into a macro.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 drivers/input/touchscreen/goodix.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index c281e49826c23..d73d4272a8ea5 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -797,23 +797,31 @@ static int goodix_reset(struct goodix_ts_data *ts)
 }
 
 #ifdef ACPI_GPIO_SUPPORT
+
+#define GOODIX_GPIO_MAPPING(_name, _params, _size) \
+	{ \
+		.name = _name, \
+		.data = _params, \
+		.size = _size, \
+	}
+
 static const struct acpi_gpio_params first_gpio = { 0, 0, false };
 static const struct acpi_gpio_params second_gpio = { 1, 0, false };
 
 static const struct acpi_gpio_mapping acpi_goodix_int_first_gpios[] = {
-	{ GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1 },
-	{ GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1),
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1),
 	{ },
 };
 
 static const struct acpi_gpio_mapping acpi_goodix_int_last_gpios[] = {
-	{ GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 },
-	{ GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1),
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1),
 	{ },
 };
 
 static const struct acpi_gpio_mapping acpi_goodix_reset_only_gpios[] = {
-	{ GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1),
 	{ },
 };
 

-- 
b4 0.10.1

WARNING: multiple messages have this Message-ID (diff)
From: Quentin Schulz <foss+kernel@0leil.net>
To: "Samuel Holland" <samuel@sholland.org>,
	"Bastien Nocera" <hadess@hadess.net>,
	"Guido Günther" <agx@sigxcpu.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Angus Ainslie" <angus@akkea.ca>,
	"Ondrej Jirman" <megous@megous.com>,
	"Icenowy Zheng" <icenowy@aosc.io>,
	"Andy Gross" <agross@kernel.org>,
	"Aleksei Mamlin" <mamlinav@gmail.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"David Jander" <david@protonic.nl>,
	"Frieder Schrempf" <frieder.schrempf@kontron.de>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@somainline.org>,
	"Peter Geis" <pgwipeout@gmail.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Lukasz Majewski" <lukma@denx.de>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@somainline.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Michael Riesch" <michael.riesch@wolfvision.net>,
	"Rob Herring" <robh+dt@kernel.org>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev,
	devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: [PATCH v3 1/9] Input: goodix - add macro for gpio mapping
Date: Mon,  5 Dec 2022 14:40:30 +0100	[thread overview]
Message-ID: <20221103-upstream-goodix-reset-v3-1-0975809eb183@theobroma-systems.com> (raw)
In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com>

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

To prepare for the quirks member to be set for all pins, which would
make the line longer than allowed, let's move all mappings into a macro.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 drivers/input/touchscreen/goodix.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index c281e49826c23..d73d4272a8ea5 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -797,23 +797,31 @@ static int goodix_reset(struct goodix_ts_data *ts)
 }
 
 #ifdef ACPI_GPIO_SUPPORT
+
+#define GOODIX_GPIO_MAPPING(_name, _params, _size) \
+	{ \
+		.name = _name, \
+		.data = _params, \
+		.size = _size, \
+	}
+
 static const struct acpi_gpio_params first_gpio = { 0, 0, false };
 static const struct acpi_gpio_params second_gpio = { 1, 0, false };
 
 static const struct acpi_gpio_mapping acpi_goodix_int_first_gpios[] = {
-	{ GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1 },
-	{ GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1),
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1),
 	{ },
 };
 
 static const struct acpi_gpio_mapping acpi_goodix_int_last_gpios[] = {
-	{ GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 },
-	{ GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1),
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1),
 	{ },
 };
 
 static const struct acpi_gpio_mapping acpi_goodix_reset_only_gpios[] = {
-	{ GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1),
 	{ },
 };
 

-- 
b4 0.10.1

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Quentin Schulz <foss+kernel@0leil.net>
To: "Samuel Holland" <samuel@sholland.org>,
	"Bastien Nocera" <hadess@hadess.net>,
	"Guido Günther" <agx@sigxcpu.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Angus Ainslie" <angus@akkea.ca>,
	"Ondrej Jirman" <megous@megous.com>,
	"Icenowy Zheng" <icenowy@aosc.io>,
	"Andy Gross" <agross@kernel.org>,
	"Aleksei Mamlin" <mamlinav@gmail.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"David Jander" <david@protonic.nl>,
	"Frieder Schrempf" <frieder.schrempf@kontron.de>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@somainline.org>,
	"Peter Geis" <pgwipeout@gmail.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Lukasz Majewski" <lukma@denx.de>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@somainline.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Michael Riesch" <michael.riesch@wolfvision.net>,
	"Rob Herring" <robh+dt@kernel.org>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev,
	devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: [PATCH v3 1/9] Input: goodix - add macro for gpio mapping
Date: Mon,  5 Dec 2022 14:40:30 +0100	[thread overview]
Message-ID: <20221103-upstream-goodix-reset-v3-1-0975809eb183@theobroma-systems.com> (raw)
In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com>

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

To prepare for the quirks member to be set for all pins, which would
make the line longer than allowed, let's move all mappings into a macro.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 drivers/input/touchscreen/goodix.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index c281e49826c23..d73d4272a8ea5 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -797,23 +797,31 @@ static int goodix_reset(struct goodix_ts_data *ts)
 }
 
 #ifdef ACPI_GPIO_SUPPORT
+
+#define GOODIX_GPIO_MAPPING(_name, _params, _size) \
+	{ \
+		.name = _name, \
+		.data = _params, \
+		.size = _size, \
+	}
+
 static const struct acpi_gpio_params first_gpio = { 0, 0, false };
 static const struct acpi_gpio_params second_gpio = { 1, 0, false };
 
 static const struct acpi_gpio_mapping acpi_goodix_int_first_gpios[] = {
-	{ GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1 },
-	{ GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1),
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1),
 	{ },
 };
 
 static const struct acpi_gpio_mapping acpi_goodix_int_last_gpios[] = {
-	{ GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 },
-	{ GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1),
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1),
 	{ },
 };
 
 static const struct acpi_gpio_mapping acpi_goodix_reset_only_gpios[] = {
-	{ GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 },
+	GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1),
 	{ },
 };
 

-- 
b4 0.10.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-12-05 13:41 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 13:40 [PATCH v3 0/9] fix reset line polarity for Goodix touchscreen controllers Quentin Schulz
2022-12-05 13:40 ` Quentin Schulz
2022-12-05 13:40 ` Quentin Schulz
2022-12-05 13:40 ` Quentin Schulz [this message]
2022-12-05 13:40   ` [PATCH v3 1/9] Input: goodix - add macro for gpio mapping Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40 ` [PATCH v3 2/9] Input: goodix - make gpiod_get honor GPIOD_ASIS Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40 ` [PATCH v3 3/9] Input: goodix - fix reset polarity Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40 ` [PATCH v3 4/9] ARM: dts: imx: fix touchscreen reset GPIO polarity Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-06 11:25   ` Frieder Schrempf
2022-12-06 11:25     ` Frieder Schrempf
2022-12-06 11:25     ` Frieder Schrempf
2022-12-06 12:42     ` Lukasz Majewski
2022-12-06 12:42       ` Lukasz Majewski
2022-12-06 12:42       ` Lukasz Majewski
2022-12-05 13:40 ` [PATCH v3 5/9] ARM: dts: sunxi: fix touchscreen reset GPIO polarity on Wexler TAB7200 tablet Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40 ` [PATCH v3 6/9] arm64: dts: allwinner: fix touchscreen reset GPIO polarity Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-06  0:26   ` Samuel Holland
2022-12-06  0:26     ` Samuel Holland
2022-12-06  0:26     ` Samuel Holland
2022-12-06 11:11     ` Quentin Schulz
2022-12-06 11:11       ` Quentin Schulz
2022-12-06 11:11       ` Quentin Schulz
2022-12-12  6:32       ` Samuel Holland
2022-12-12  6:32         ` Samuel Holland
2022-12-12  6:32         ` Samuel Holland
2022-12-12 13:21         ` Robin Murphy
2022-12-12 13:21           ` Robin Murphy
2022-12-12 13:21           ` Robin Murphy
2022-12-05 13:40 ` [PATCH v3 7/9] arm64: dts: librem5: " Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40 ` [PATCH v3 8/9] arm64: dts: qcom: msm8998-fxtec: " Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40 ` [PATCH v3 9/9] arm64: dts: rockchip: " Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-05 13:40   ` Quentin Schulz
2022-12-13 10:24   ` Michael Riesch
2022-12-13 10:24     ` Michael Riesch
2022-12-13 10:24     ` Michael Riesch
2022-12-05 22:19 ` [PATCH v3 0/9] fix reset line polarity for Goodix touchscreen controllers Hans de Goede
2022-12-05 22:19   ` Hans de Goede
2022-12-05 22:19   ` Hans de Goede
2023-01-10 16:17 ` (subset) " Bjorn Andersson
2023-01-10 16:17   ` Bjorn Andersson
2023-01-10 16:17   ` Bjorn Andersson
2023-01-16 12:37   ` Quentin Schulz
2023-01-16 12:37     ` Quentin Schulz
2023-01-16 12:37     ` Quentin Schulz
2023-02-28 17:36     ` Quentin Schulz
2023-02-28 17:36       ` Quentin Schulz
2023-02-28 17:36       ` Quentin Schulz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103-upstream-goodix-reset-v3-1-0975809eb183@theobroma-systems.com \
    --to=foss+kernel@0leil.net \
    --cc=agross@kernel.org \
    --cc=agx@sigxcpu.org \
    --cc=andersson@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=angus@akkea.ca \
    --cc=david@protonic.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=heiko@sntech.de \
    --cc=icenowy@aosc.io \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=lukma@denx.de \
    --cc=mamlinav@gmail.com \
    --cc=megous@megous.com \
    --cc=michael.riesch@wolfvision.net \
    --cc=pgwipeout@gmail.com \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=samuel@sholland.org \
    --cc=shawnguo@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.