From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@armlinux.org.uk>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Mark Brown <broonie@kernel.org>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Andreas Kemnade <andreas@kemnade.info>,
Helge Deller <deller@gmx.de>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
linux-input@vger.kernel.org, linux-spi@vger.kernel.org,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH v3 1/3] Input: ads7846 - Convert to use software nodes
Date: Fri, 5 May 2023 11:08:50 -0700 [thread overview]
Message-ID: <ZFVGMiuRT+e2eVXw@google.com> (raw)
In-Reply-To: <20230430-nokia770-regression-v3-1-a6d0a89ffa8b@linaro.org>
Hi Linus,
On Fri, May 05, 2023 at 01:16:55PM +0200, Linus Walleij wrote:
>
> Populate the devices on the Nokia 770 CBUS I2C using software
> nodes instead of platform data quirks. This includes the LCD
> and the ADS7846 touchscreen so the conversion just brings the LCD
> along with it as software nodes is an all-or-nothing design
> pattern.
Wow, so that worked , awesome!
> +static const struct property_entry nokia770_ads7846_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 4096),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 4096),
> + PROPERTY_ENTRY_U32("touchscreen-max-pressure", 256),
> + PROPERTY_ENTRY_U32("touchscreen-average-samples", 10),
> + PROPERTY_ENTRY_U16("ti,x-plate-ohms", 180),
> + PROPERTY_ENTRY_U16("ti,debounce-tol", 3),
> + PROPERTY_ENTRY_U16("ti,debounce-rep", 1),
> + PROPERTY_ENTRY_GPIO("pendown-gpios", &nokia770_gpiochip1_node,
> + ADS7846_PENDOWN_GPIO, GPIO_ACTIVE_HIGH),
Looking at the driver this actually needs to be GPIO_ACTIVE_LOW.
>
> +static struct gpiod_lookup_table spitz_ads7846_gpio_table = {
> + .dev_id = "spi2.0",
> + .table = {
> + GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_TP_INT,
> + "pendown", GPIO_ACTIVE_HIGH),
GPIO_ACTIVE_LOW here too.
> +static struct gpiod_lookup_table db1100_touch_gpio_table = {
> + .dev_id = "spi0.0",
> + .table = {
> + GPIO_LOOKUP("alchemy-gpio2", 21,
> + "pendown", GPIO_ACTIVE_HIGH),
And here as well.
> @@ -223,7 +220,7 @@ static int get_pendown_state(struct ads7846 *ts)
> if (ts->get_pendown_state)
> return ts->get_pendown_state();
>
> - return !gpio_get_value(ts->gpio_pendown);
> + return !gpiod_get_value(ts->gpio_pendown);
This needs to be
return !gpiod_get_value_raw(ts->gpio_pendown);
I looked at various DTSes we have and they use a mix of active high and
active low annotations, so we have to go with the "raw" variant for now,
and then update to normal one once we update bad DTSes.
Thanks!
--
Dmitry
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@armlinux.org.uk>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Mark Brown <broonie@kernel.org>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Andreas Kemnade <andreas@kemnade.info>,
Helge Deller <deller@gmx.de>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
linux-input@vger.kernel.org, linux-spi@vger.kernel.org,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH v3 1/3] Input: ads7846 - Convert to use software nodes
Date: Fri, 5 May 2023 11:08:50 -0700 [thread overview]
Message-ID: <ZFVGMiuRT+e2eVXw@google.com> (raw)
In-Reply-To: <20230430-nokia770-regression-v3-1-a6d0a89ffa8b@linaro.org>
Hi Linus,
On Fri, May 05, 2023 at 01:16:55PM +0200, Linus Walleij wrote:
>
> Populate the devices on the Nokia 770 CBUS I2C using software
> nodes instead of platform data quirks. This includes the LCD
> and the ADS7846 touchscreen so the conversion just brings the LCD
> along with it as software nodes is an all-or-nothing design
> pattern.
Wow, so that worked , awesome!
> +static const struct property_entry nokia770_ads7846_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 4096),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 4096),
> + PROPERTY_ENTRY_U32("touchscreen-max-pressure", 256),
> + PROPERTY_ENTRY_U32("touchscreen-average-samples", 10),
> + PROPERTY_ENTRY_U16("ti,x-plate-ohms", 180),
> + PROPERTY_ENTRY_U16("ti,debounce-tol", 3),
> + PROPERTY_ENTRY_U16("ti,debounce-rep", 1),
> + PROPERTY_ENTRY_GPIO("pendown-gpios", &nokia770_gpiochip1_node,
> + ADS7846_PENDOWN_GPIO, GPIO_ACTIVE_HIGH),
Looking at the driver this actually needs to be GPIO_ACTIVE_LOW.
>
> +static struct gpiod_lookup_table spitz_ads7846_gpio_table = {
> + .dev_id = "spi2.0",
> + .table = {
> + GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_TP_INT,
> + "pendown", GPIO_ACTIVE_HIGH),
GPIO_ACTIVE_LOW here too.
> +static struct gpiod_lookup_table db1100_touch_gpio_table = {
> + .dev_id = "spi0.0",
> + .table = {
> + GPIO_LOOKUP("alchemy-gpio2", 21,
> + "pendown", GPIO_ACTIVE_HIGH),
And here as well.
> @@ -223,7 +220,7 @@ static int get_pendown_state(struct ads7846 *ts)
> if (ts->get_pendown_state)
> return ts->get_pendown_state();
>
> - return !gpio_get_value(ts->gpio_pendown);
> + return !gpiod_get_value(ts->gpio_pendown);
This needs to be
return !gpiod_get_value_raw(ts->gpio_pendown);
I looked at various DTSes we have and they use a mix of active high and
active low annotations, so we have to go with the "raw" variant for now,
and then update to normal one once we update bad DTSes.
Thanks!
--
Dmitry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Tony Lindgren <tony@atomide.com>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Robert Jarzmik <robert.jarzmik@free.fr>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Helge Deller <deller@gmx.de>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Andreas Kemnade <andreas@kemnade.info>,
linux-input@vger.kernel.org,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org,
linux-spi@vger.kernel.org, Daniel Mack <daniel@zonque.org>
Subject: Re: [PATCH v3 1/3] Input: ads7846 - Convert to use software nodes
Date: Fri, 5 May 2023 11:08:50 -0700 [thread overview]
Message-ID: <ZFVGMiuRT+e2eVXw@google.com> (raw)
In-Reply-To: <20230430-nokia770-regression-v3-1-a6d0a89ffa8b@linaro.org>
Hi Linus,
On Fri, May 05, 2023 at 01:16:55PM +0200, Linus Walleij wrote:
>
> Populate the devices on the Nokia 770 CBUS I2C using software
> nodes instead of platform data quirks. This includes the LCD
> and the ADS7846 touchscreen so the conversion just brings the LCD
> along with it as software nodes is an all-or-nothing design
> pattern.
Wow, so that worked , awesome!
> +static const struct property_entry nokia770_ads7846_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 4096),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 4096),
> + PROPERTY_ENTRY_U32("touchscreen-max-pressure", 256),
> + PROPERTY_ENTRY_U32("touchscreen-average-samples", 10),
> + PROPERTY_ENTRY_U16("ti,x-plate-ohms", 180),
> + PROPERTY_ENTRY_U16("ti,debounce-tol", 3),
> + PROPERTY_ENTRY_U16("ti,debounce-rep", 1),
> + PROPERTY_ENTRY_GPIO("pendown-gpios", &nokia770_gpiochip1_node,
> + ADS7846_PENDOWN_GPIO, GPIO_ACTIVE_HIGH),
Looking at the driver this actually needs to be GPIO_ACTIVE_LOW.
>
> +static struct gpiod_lookup_table spitz_ads7846_gpio_table = {
> + .dev_id = "spi2.0",
> + .table = {
> + GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_TP_INT,
> + "pendown", GPIO_ACTIVE_HIGH),
GPIO_ACTIVE_LOW here too.
> +static struct gpiod_lookup_table db1100_touch_gpio_table = {
> + .dev_id = "spi0.0",
> + .table = {
> + GPIO_LOOKUP("alchemy-gpio2", 21,
> + "pendown", GPIO_ACTIVE_HIGH),
And here as well.
> @@ -223,7 +220,7 @@ static int get_pendown_state(struct ads7846 *ts)
> if (ts->get_pendown_state)
> return ts->get_pendown_state();
>
> - return !gpio_get_value(ts->gpio_pendown);
> + return !gpiod_get_value(ts->gpio_pendown);
This needs to be
return !gpiod_get_value_raw(ts->gpio_pendown);
I looked at various DTSes we have and they use a mix of active high and
active low annotations, so we have to go with the "raw" variant for now,
and then update to normal one once we update bad DTSes.
Thanks!
--
Dmitry
next prev parent reply other threads:[~2023-05-05 18:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 11:16 [PATCH v3 0/3] Fix up Nokia 770 regression Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-05 11:16 ` [PATCH v3 1/3] Input: ads7846 - Convert to use software nodes Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-05 18:08 ` Dmitry Torokhov [this message]
2023-05-05 18:08 ` Dmitry Torokhov
2023-05-05 18:08 ` Dmitry Torokhov
2023-05-08 21:23 ` Linus Walleij
2023-05-08 21:23 ` Linus Walleij
2023-05-08 21:28 ` Dmitry Torokhov
2023-05-08 21:28 ` Dmitry Torokhov
2023-05-08 21:31 ` Linus Walleij
2023-05-08 21:31 ` Linus Walleij
2023-05-08 15:16 ` andy.shevchenko
2023-05-08 15:16 ` andy.shevchenko
2023-05-08 20:54 ` Linus Walleij
2023-05-08 20:54 ` Linus Walleij
2023-05-05 11:16 ` [PATCH v3 2/3] ARM/mmc: Convert old mmci-omap to GPIO descriptors Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-05 11:16 ` [PATCH v3 3/3] ARM: omap1: Fix up the Nokia 770 board device IRQs Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-05 11:16 ` Linus Walleij
2023-05-08 15:17 ` andy.shevchenko
2023-05-08 15:17 ` andy.shevchenko
2023-05-08 21:28 ` Linus Walleij
2023-05-08 21:28 ` Linus Walleij
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=ZFVGMiuRT+e2eVXw@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=bartosz.golaszewski@linaro.org \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=haojian.zhuang@gmail.com \
--cc=jmkrzyszt@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=robert.jarzmik@free.fr \
--cc=tony@atomide.com \
--cc=tsbogend@alpha.franken.de \
--cc=ulf.hansson@linaro.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.