linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.19 01/36] pinctrl: meson: fix pinconf bias disable
@ 2018-11-22 19:52 Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 02/36] pinctrl: meson: fix gxbb ao pull register bits Sasha Levin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sasha Levin @ 2018-11-22 19:52 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Jerome Brunet, Linus Walleij, Sasha Levin, linux-gpio,
	linux-amlogic

From: Jerome Brunet <jbrunet@baylibre.com>

[ Upstream commit e39f9dd8206ad66992ac0e6218ef1ba746f2cce9 ]

If a bias is enabled on a pin of an Amlogic SoC, calling .pin_config_set()
with PIN_CONFIG_BIAS_DISABLE will not disable the bias. Instead it will
force a pull-down bias on the pin.

Instead of the pull type register bank, the driver should access the pull
enable register bank.

Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/meson/pinctrl-meson.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 29a458da78db..4f3ab18636a3 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -192,7 +192,7 @@ static int meson_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin,
 			dev_dbg(pc->dev, "pin %u: disable bias\n", pin);
 
 			meson_calc_reg_and_bit(bank, pin, REG_PULL, &reg, &bit);
-			ret = regmap_update_bits(pc->reg_pull, reg,
+			ret = regmap_update_bits(pc->reg_pullen, reg,
 						 BIT(bit), 0);
 			if (ret)
 				return ret;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.19 02/36] pinctrl: meson: fix gxbb ao pull register bits
  2018-11-22 19:52 [PATCH AUTOSEL 4.19 01/36] pinctrl: meson: fix pinconf bias disable Sasha Levin
@ 2018-11-22 19:52 ` Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 03/36] pinctrl: meson: fix gxl " Sasha Levin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2018-11-22 19:52 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Jerome Brunet, Linus Walleij, Sasha Levin, linux-gpio,
	linux-amlogic

From: Jerome Brunet <jbrunet@baylibre.com>

[ Upstream commit 4bc51e1e350cd4707ce6e551a93eae26d40b9889 ]

AO pull register definition is inverted between pull (up/down) and
pull enable. Fixing this allows to properly apply bias setting
through pinconf

Fixes: 468c234f9ed7 ("pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index 4ceb06f8a33c..4edeb4cae72a 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -830,7 +830,7 @@ static struct meson_bank meson_gxbb_periphs_banks[] = {
 
 static struct meson_bank meson_gxbb_aobus_banks[] = {
 	/*   name    first      last       irq    pullen  pull    dir     out     in  */
-	BANK("AO",   GPIOAO_0,  GPIOAO_13, 0, 13, 0,  0,  0, 16,  0,  0,  0, 16,  1,  0),
+	BANK("AO",   GPIOAO_0,  GPIOAO_13, 0, 13, 0,  16, 0, 0,   0,  0,  0, 16,  1,  0),
 };
 
 static struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.19 03/36] pinctrl: meson: fix gxl ao pull register bits
  2018-11-22 19:52 [PATCH AUTOSEL 4.19 01/36] pinctrl: meson: fix pinconf bias disable Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 02/36] pinctrl: meson: fix gxbb ao pull register bits Sasha Levin
@ 2018-11-22 19:52 ` Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 04/36] pinctrl: meson: fix meson8 " Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 05/36] pinctrl: meson: fix meson8b " Sasha Levin
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2018-11-22 19:52 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Jerome Brunet, Linus Walleij, Sasha Levin, linux-gpio,
	linux-amlogic

From: Jerome Brunet <jbrunet@baylibre.com>

[ Upstream commit ed3a2b74f3eb34c84c8377353f4730f05acdfd05 ]

AO pull register definition is inverted between pull (up/down) and
pull enable. Fixing this allows to properly apply bias setting
through pinconf

Fixes: 0f15f500ff2c ("pinctrl: meson: Add GXL pinctrl definitions")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
index 7dae1d7bf6b0..158f618f1695 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -807,7 +807,7 @@ static struct meson_bank meson_gxl_periphs_banks[] = {
 
 static struct meson_bank meson_gxl_aobus_banks[] = {
 	/*   name    first      last      irq	pullen  pull    dir     out     in  */
-	BANK("AO",   GPIOAO_0,  GPIOAO_9, 0, 9, 0,  0,  0, 16,  0,  0,  0, 16,  1,  0),
+	BANK("AO",   GPIOAO_0,  GPIOAO_9, 0, 9, 0,  16, 0, 0,   0,  0,  0, 16,  1,  0),
 };
 
 static struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data = {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.19 04/36] pinctrl: meson: fix meson8 ao pull register bits
  2018-11-22 19:52 [PATCH AUTOSEL 4.19 01/36] pinctrl: meson: fix pinconf bias disable Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 02/36] pinctrl: meson: fix gxbb ao pull register bits Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 03/36] pinctrl: meson: fix gxl " Sasha Levin
@ 2018-11-22 19:52 ` Sasha Levin
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 05/36] pinctrl: meson: fix meson8b " Sasha Levin
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2018-11-22 19:52 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Jerome Brunet, Linus Walleij, Sasha Levin, linux-gpio,
	linux-amlogic

From: Jerome Brunet <jbrunet@baylibre.com>

[ Upstream commit e91b162d2868672d06010f34aa83d408db13d3c6 ]

AO pull register definition is inverted between pull (up/down) and
pull enable. Fixing this allows to properly apply bias setting
through pinconf

Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/meson/pinctrl-meson8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/meson/pinctrl-meson8.c b/drivers/pinctrl/meson/pinctrl-meson8.c
index c6d79315218f..86466173114d 100644
--- a/drivers/pinctrl/meson/pinctrl-meson8.c
+++ b/drivers/pinctrl/meson/pinctrl-meson8.c
@@ -1053,7 +1053,7 @@ static struct meson_bank meson8_cbus_banks[] = {
 
 static struct meson_bank meson8_aobus_banks[] = {
 	/*   name    first     last         irq    pullen  pull    dir     out     in  */
-	BANK("AO",   GPIOAO_0, GPIO_TEST_N, 0, 13, 0,  0,  0, 16,  0,  0,  0, 16,  1,  0),
+	BANK("AO",   GPIOAO_0, GPIO_TEST_N, 0, 13, 0, 16,  0,  0,  0,  0,  0, 16,  1,  0),
 };
 
 static struct meson_pinctrl_data meson8_cbus_pinctrl_data = {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.19 05/36] pinctrl: meson: fix meson8b ao pull register bits
  2018-11-22 19:52 [PATCH AUTOSEL 4.19 01/36] pinctrl: meson: fix pinconf bias disable Sasha Levin
                   ` (2 preceding siblings ...)
  2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 04/36] pinctrl: meson: fix meson8 " Sasha Levin
@ 2018-11-22 19:52 ` Sasha Levin
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2018-11-22 19:52 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Jerome Brunet, Linus Walleij, Sasha Levin, linux-gpio,
	linux-amlogic

From: Jerome Brunet <jbrunet@baylibre.com>

[ Upstream commit a1705f02704cd8a24d434bfd0141ee8142ad277a ]

AO pull register definition is inverted between pull (up/down) and
pull enable. Fixing this allows to properly apply bias setting
through pinconf

Fixes: 0fefcb6876d0 ("pinctrl: Add support for Meson8b")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/meson/pinctrl-meson8b.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/meson/pinctrl-meson8b.c b/drivers/pinctrl/meson/pinctrl-meson8b.c
index bb2a30964fc6..647ad15d5c3c 100644
--- a/drivers/pinctrl/meson/pinctrl-meson8b.c
+++ b/drivers/pinctrl/meson/pinctrl-meson8b.c
@@ -906,7 +906,7 @@ static struct meson_bank meson8b_cbus_banks[] = {
 
 static struct meson_bank meson8b_aobus_banks[] = {
 	/*   name    first     lastc        irq    pullen  pull    dir     out     in  */
-	BANK("AO",   GPIOAO_0, GPIO_TEST_N, 0, 13, 0,  0,  0, 16,  0,  0,  0, 16,  1,  0),
+	BANK("AO",   GPIOAO_0, GPIO_TEST_N, 0, 13, 0,  16, 0, 0,  0,  0,  0, 16,  1,  0),
 };
 
 static struct meson_pinctrl_data meson8b_cbus_pinctrl_data = {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-22 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22 19:52 [PATCH AUTOSEL 4.19 01/36] pinctrl: meson: fix pinconf bias disable Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 02/36] pinctrl: meson: fix gxbb ao pull register bits Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 03/36] pinctrl: meson: fix gxl " Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 04/36] pinctrl: meson: fix meson8 " Sasha Levin
2018-11-22 19:52 ` [PATCH AUTOSEL 4.19 05/36] pinctrl: meson: fix meson8b " Sasha Levin

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).