* [PATCH] 4.9 backport of "pinctrl: intel: Read back TX buffer state"
@ 2018-08-02 2:50 Anthony de Boer
2018-08-03 19:38 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Anthony de Boer @ 2018-08-02 2:50 UTC (permalink / raw)
To: stable
Greetings. I'd like to request a backport/cherry-pick of an existing
patch from the Linus tree onto the linux-4.9.y tree as I'm helping some
folk try to get Debian-stable-vintage Linux running on an instance of the
affected hardware. Without this patch the GPIO pins don't function, but
with the cherry-picked patch they come to life.
The commit is d68b42e30bbacd24354d644f430d088435b15e83 in the mainline
Linux tree and it applied cleanly to the linux-4.9.y tree as of 4.9.115
(dbcdf42bab53d219caa51bcfe54c8b9066010290); I include a copy of it
for reference.
Thanks.
---
>From d68b42e30bbacd24354d644f430d088435b15e83 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Thu, 24 Aug 2017 11:19:33 +0300
Subject: [PATCH] pinctrl: intel: Read back TX buffer state
In the same way as it's done in pinctrl-cherryview.c we would provide
a readback TX buffer state.
Fixes: 17fab473693 ("pinctrl: intel: Set pin direction properly")
Reported-by: "Bourque, Francis" <francis.bourque@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: "Bourque, Francis" <francis.bourque@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/intel/pinctrl-intel.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index ac806891ff81..71df0f70b61f 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -751,12 +751,17 @@ static int intel_gpio_get(struct gpio_chip *chip, unsigned offset)
{
struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
void __iomem *reg;
+ u32 padcfg0;
reg = intel_get_padcfg(pctrl, offset, PADCFG0);
if (!reg)
return -EINVAL;
- return !!(readl(reg) & PADCFG0_GPIORXSTATE);
+ padcfg0 = readl(reg);
+ if (!(padcfg0 & PADCFG0_GPIOTXDIS))
+ return !!(padcfg0 & PADCFG0_GPIOTXSTATE);
+
+ return !!(padcfg0 & PADCFG0_GPIORXSTATE);
}
static void intel_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
--
2.11.0
--
Anthony de Boer
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] 4.9 backport of "pinctrl: intel: Read back TX buffer state"
2018-08-02 2:50 [PATCH] 4.9 backport of "pinctrl: intel: Read back TX buffer state" Anthony de Boer
@ 2018-08-03 19:38 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2018-08-03 19:38 UTC (permalink / raw)
To: Anthony de Boer; +Cc: stable
On Wed, Aug 01, 2018 at 10:50:21PM -0400, Anthony de Boer wrote:
> Greetings. I'd like to request a backport/cherry-pick of an existing
> patch from the Linus tree onto the linux-4.9.y tree as I'm helping some
> folk try to get Debian-stable-vintage Linux running on an instance of the
> affected hardware. Without this patch the GPIO pins don't function, but
> with the cherry-picked patch they come to life.
>
> The commit is d68b42e30bbacd24354d644f430d088435b15e83 in the mainline
> Linux tree and it applied cleanly to the linux-4.9.y tree as of 4.9.115
> (dbcdf42bab53d219caa51bcfe54c8b9066010290); I include a copy of it
> for reference.
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-03 21:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 2:50 [PATCH] 4.9 backport of "pinctrl: intel: Read back TX buffer state" Anthony de Boer
2018-08-03 19:38 ` Greg KH
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).