diff options
author | Tom Rini <trini@konsulko.com> | 2019-01-03 08:39:44 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-03 08:39:44 -0500 |
commit | 7436f5e54d35bcad53befec90e2e67288071f74e (patch) | |
tree | 19d99b0fa4532bfbfefa2a12274a6079cf10df3f /drivers/pinctrl/pinctrl-uclass.c | |
parent | 695f67b5b3693232406a5cb3590d8fc5860c9f6c (diff) | |
parent | 77012e79ffc35994e5d6efca458d65bd03842b00 (diff) |
Merge tag 'for-master-20190103' of git://git.denx.de/u-boot-rockchip
Last-minute fixes for 2019.1:
- clamp DRAM size to below 32bit for 32bit targets to support 4GB
- fix copyright notice on some Rockchip-contributed files
- adjust vdd_log for the RK3399-Q7 to improve stability in some workloads
Diffstat (limited to 'drivers/pinctrl/pinctrl-uclass.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-uclass.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 29c910c55f..c8b38d78f6 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -27,6 +27,28 @@ int pinctrl_decode_pin_config(const void *blob, int node) return flags; } +/* + * TODO: this function is temporary for v2019.01. + * It should be renamed to pinctrl_decode_pin_config(), + * the original pinctrl_decode_pin_config() function should + * be removed and all callers of the original function should + * be migrated to use the new one. + */ +int pinctrl_decode_pin_config_dm(struct udevice *dev) +{ + int pinconfig = 0; + + if (dev->uclass->uc_drv->id != UCLASS_PINCONFIG) + return -EINVAL; + + if (dev_read_bool(dev, "bias-pull-up")) + pinconfig |= 1 << PIN_CONFIG_BIAS_PULL_UP; + else if (dev_read_bool(dev, "bias-pull-down")) + pinconfig |= 1 << PIN_CONFIG_BIAS_PULL_DOWN; + + return pinconfig; +} + #if CONFIG_IS_ENABLED(PINCTRL_FULL) /** * pinctrl_config_one() - apply pinctrl settings for a single node |