Message ID | 1563398164-2679-1-git-send-email-wahrenst@gmx.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
On Wed, Jul 17, 2019 at 11:16 PM Stefan Wahren <wahrenst@gmx.net> wrote: > 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> I don't understand this: why do you even need to make a *new* SoC work with *legacy* bias control? Just use the generic pin configs and be happy. Or did someone produce a lot of DTS file using the "hack" seen in earlier patches that you would now have to fix? (Sigh.) That is why they should discuss with community first I guess. Yours, Linus Walleij
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;
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(+) -- 2.7.4