From: Hans de Goede <hdegoede@redhat.com>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
Daniel Scally <dan.scally@ideasonboard.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Kate Hsuan <hpa@redhat.com>,
linux-gpio@vger.kernel.org
Subject: [PATCH v2 resend 1/2] gpio: tps68470: Fix tps68470_gpio_get() reading from the wrong register
Date: Wed, 25 Jan 2023 12:05:46 +0100 [thread overview]
Message-ID: <20230125110547.18093-2-hdegoede@redhat.com> (raw)
In-Reply-To: <20230125110547.18093-1-hdegoede@redhat.com>
For the regular GPIO pins the value should be read from TPS68470_REG_GPDI,
so that the actual value of the pin is read, rather than the value the pin
would output when put in output mode.
Fixes: 275b13a65547 ("gpio: Add support for TPS68470 GPIOs")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Tested-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
- Add Fixes tag
---
drivers/gpio/gpio-tps68470.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-tps68470.c b/drivers/gpio/gpio-tps68470.c
index aaddcabe9b35..778a72cf800c 100644
--- a/drivers/gpio/gpio-tps68470.c
+++ b/drivers/gpio/gpio-tps68470.c
@@ -30,7 +30,7 @@ static int tps68470_gpio_get(struct gpio_chip *gc, unsigned int offset)
{
struct tps68470_gpio_data *tps68470_gpio = gpiochip_get_data(gc);
struct regmap *regmap = tps68470_gpio->tps68470_regmap;
- unsigned int reg = TPS68470_REG_GPDO;
+ unsigned int reg = TPS68470_REG_GPDI;
int val, ret;
if (offset >= TPS68470_N_REGULAR_GPIO) {
--
2.39.0
next prev parent reply other threads:[~2023-01-25 11:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 11:05 [PATCH v2 resend 0/2] gpio: tps68470: 2 bugfixes Hans de Goede
2023-01-25 11:05 ` Hans de Goede [this message]
2023-01-25 11:23 ` [PATCH v2 resend 1/2] gpio: tps68470: Fix tps68470_gpio_get() reading from the wrong register Andy Shevchenko
2023-01-25 11:32 ` Andy Shevchenko
2023-01-25 11:32 ` Hans de Goede
2023-01-25 11:34 ` Andy Shevchenko
2023-01-25 11:40 ` Hans de Goede
2023-01-25 14:55 ` Andy Shevchenko
2023-01-25 17:22 ` Hans de Goede
2023-01-25 11:05 ` [PATCH v2 resend 2/2] gpio: tps68470: Make tps68470_gpio_output() always set the initial value Hans de Goede
2023-01-25 11:24 ` Andy Shevchenko
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=20230125110547.18093-2-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=dan.scally@ideasonboard.com \
--cc=hpa@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).