linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 14/18] HACK: pinctrl: bcm2835: Implement legacy pull for BCM7211
@ 2019-07-17 21:16 Stefan Wahren
  2019-07-17 21:16 ` [PATCH RFC 15/18] spi: bcm2835: enable shared interrupt support Stefan Wahren
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Stefan Wahren @ 2019-07-17 21:16 UTC (permalink / raw)
  To: Eric Anholt, Florian Fainelli, Ray Jui, Scott Branden,
	Nicolas Saenz Julienne, Rob Herring, Mark Rutland, Linus Walleij,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Adrian Hunter,
	Mark Brown
  Cc: bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel,
	Stefan Wahren

This temporay hack is necessary to make the BCM2838/7211 work with the legacy
pull configuration. The better approach is to convert all affected DTS files
to the generic bias control.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 7f7cc5c..56161b6 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -1003,6 +1003,13 @@ static int bcm7211_pinconf_set(struct pinctrl_dev *pctldev,

 		/* convert to 7211 value */
 		switch (param) {
+		case BCM2835_PINCONF_PARAM_PULL:
+			/* convert legacy brcm,pull */
+			if (arg == BCM2835_PUD_UP)
+				arg = BCM7211_PINCONFIG_PULL_UP;
+			else if (arg == BCM2835_PUD_DOWN)
+				arg = BCM7211_PINCONFIG_PULL_DOWN;
+			break;
 		case PIN_CONFIG_BIAS_DISABLE:
 			arg = BCM7211_PINCONFIG_PULL_NONE;
 			break;
--
2.7.4


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

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

end of thread, other threads:[~2019-08-02 22:12 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 21:16 [PATCH RFC 14/18] HACK: pinctrl: bcm2835: Implement legacy pull for BCM7211 Stefan Wahren
2019-07-17 21:16 ` [PATCH RFC 15/18] spi: bcm2835: enable shared interrupt support Stefan Wahren
2019-07-18 12:42   ` Mark Brown
2019-07-18 17:53     ` Stefan Wahren
2019-07-18 18:05       ` Florian Fainelli
2019-07-18 18:21         ` Stefan Wahren
2019-07-24 17:15           ` Mark Brown
2019-07-18 18:52       ` Mark Brown
2019-07-17 21:16 ` [PATCH RFC 16/18] dt-bindings: bcm: Add Raspberry Pi 4 B Stefan Wahren
2019-07-17 21:16 ` [PATCH RFC 17/18] ARM: bcm2835: Add bcm2838 compatible string Stefan Wahren
2019-07-17 21:16 ` [PATCH RFC 18/18] ARM: dts: Add minimal Raspberry Pi 4 support Stefan Wahren
2019-07-17 21:22   ` Florian Fainelli
2019-07-17 21:32     ` Stefan Wahren
2019-07-23 18:13   ` Marc Zyngier
2019-07-24  9:51     ` Vladimir Murzin
2019-07-24 10:41       ` Marc Zyngier
2019-07-24 12:36         ` Vladimir Murzin
2019-07-24 19:04           ` Stefan Wahren
2019-07-28 10:58     ` Stefan Wahren
2019-07-28 11:38       ` Marc Zyngier
2019-07-30 18:33         ` Stefan Wahren
2019-07-31 10:55           ` Marc Zyngier
2019-08-02 22:12 ` [PATCH RFC 14/18] HACK: pinctrl: bcm2835: Implement legacy pull for BCM7211 Linus Walleij

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