diff options
author | Dong Aisheng <aisheng.dong@nxp.com> | 2017-07-25 21:41:55 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-08-14 15:01:01 +0200 |
commit | 3be6f65102a859d0a4b1b6448df8f4214f3d45ae (patch) | |
tree | b57f2697a8168ab245e6febce4f8b8b1e7f167b5 /drivers/pinctrl/freescale/pinctrl-imx.h | |
parent | a5c771e6cbdbe026d933c28a7705f6246bac7e64 (diff) | |
download | talos-op-linux-3be6f65102a859d0a4b1b6448df8f4214f3d45ae.tar.gz talos-op-linux-3be6f65102a859d0a4b1b6448df8f4214f3d45ae.zip |
pinctrl: imx: make imx_pmx_ops.gpio_set_direction platform specific callbacks
Various IMX platforms may have different imx_pmx_ops.gpio_set_direction
implementations, so let's make it platform specific callbacks instead of
the fixed common one.
Currently only VF610 platform implements it. No function level changes.
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/freescale/pinctrl-imx.h')
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-imx.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h index 880bba7fd1ab..5aa22b52c1d4 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.h +++ b/drivers/pinctrl/freescale/pinctrl-imx.h @@ -16,9 +16,12 @@ #define __DRIVERS_PINCTRL_IMX_H #include <linux/pinctrl/pinconf-generic.h> +#include <linux/pinctrl/pinmux.h> struct platform_device; +extern struct pinmux_ops imx_pmx_ops; + /** * struct imx_pin - describes a single i.MX pin * @pin: the pin_id of this pin @@ -76,6 +79,23 @@ struct imx_pinctrl_soc_info { unsigned int num_decodes; void (*fixup)(unsigned long *configs, unsigned int num_configs, u32 *raw_config); + + int (*gpio_set_direction)(struct pinctrl_dev *pctldev, + struct pinctrl_gpio_range *range, + unsigned offset, + bool input); +}; + +/** + * @dev: a pointer back to containing device + * @base: the offset to the controller in virtual memory + */ +struct imx_pinctrl { + struct device *dev; + struct pinctrl_dev *pctl; + void __iomem *base; + void __iomem *input_sel_base; + struct imx_pinctrl_soc_info *info; }; #define IMX_CFG_PARAMS_DECODE(p, m, o) \ |