diff options
author | Christoph Muellner | 2019-01-02 15:09:18 +0100 |
---|---|---|
committer | Philipp Tomsich | 2019-01-02 22:38:44 +0100 |
commit | 5ff776889212c080e3d1a33634ac904405ed6845 (patch) | |
tree | 836c2cf8fece6fc3aed29e7c5fbbfc7a15cd676a /include/dm | |
parent | 4de2bbb39ea71d28bc422b9405f199b3abe4b8fa (diff) |
dm: pinctrl: Add pinctrl_decode_pin_config_dm().
pinctrl_decode_pin_config_dm() is basically a feature-equivalent
implementation of pinctrl_decode_pin_config(), which operates
on struct udevice devices and uses the dev_read_*() API.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/pinctrl.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index 63a7d55b888..ff2b82e7c25 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -355,6 +355,18 @@ int pinctrl_get_periph_id(struct udevice *dev, struct udevice *periph); int pinctrl_decode_pin_config(const void *blob, int node); /** + * pinctrl_decode_pin_config_dm() - decode pin configuration flags + * + * This decodes some of the PIN_CONFIG values into flags, with each value + * being (1 << pin_cfg). This does not support things with values like the + * slew rate. + * + * @pinconfig: Pinconfig udevice + * @return decoded flag value, or -ve on error + */ +int pinctrl_decode_pin_config_dm(struct udevice *dev); + +/** * pinctrl_get_gpio_mux() - get the mux value for a particular GPIO * * This allows the raw mux value for a GPIO to be obtained. It is |