2 * IMX pinmux core definitions
4 * Copyright (C) 2012 Freescale Semiconductor, Inc.
5 * Copyright (C) 2012 Linaro Ltd.
7 * Author: Dong Aisheng <dong.aisheng@linaro.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
15 #ifndef __DRIVERS_PINCTRL_IMX_H
16 #define __DRIVERS_PINCTRL_IMX_H
18 struct platform_device
;
21 * struct imx_pin_group - describes an IMX pin group
22 * @name: the name of this specific pin group
23 * @pins: an array of discrete physical pins used in this group, taken
24 * from the driver-local pin enumeration space
25 * @npins: the number of pins in this group array, i.e. the number of
26 * elements in .pins so we can iterate over that array
27 * @mux_mode: the mux mode for each pin in this group. The size of this
28 * array is the same as pins.
29 * @configs: the config for each pin in this group. The size of this
30 * array is the same as pins.
32 struct imx_pin_group
{
36 unsigned int *mux_mode
;
37 unsigned long *configs
;
41 * struct imx_pmx_func - describes IMX pinmux functions
42 * @name: the name of this specific function
43 * @groups: corresponding pin groups
44 * @num_groups: the number of groups
53 * struct imx_pin_reg - describe a pin reg map
54 * The last 3 members are used for select input setting
56 * @mux_reg: mux register offset
57 * @conf_reg: config register offset
59 * @input_reg: select input register offset for this mux if any
60 * 0 if no select input setting needed.
61 * @input_val: the value set to select input register
72 struct imx_pinctrl_soc_info
{
74 const struct pinctrl_pin_desc
*pins
;
76 const struct imx_pin_reg
*pin_regs
;
77 unsigned int npin_regs
;
78 struct imx_pin_group
*groups
;
80 struct imx_pmx_func
*functions
;
81 unsigned int nfunctions
;
87 #define IMX_PIN_REG(id, conf, mux, mode, input, val) \
97 #define IMX_PINCTRL_PIN(pin) PINCTRL_PIN(pin, #pin)
99 #define PAD_CTL_MASK(len) ((1 << len) - 1)
100 #define IMX_MUX_MASK 0x7
101 #define IOMUXC_CONFIG_SION (0x1 << 4)
103 int imx_pinctrl_probe(struct platform_device
*pdev
,
104 struct imx_pinctrl_soc_info
*info
);
105 int imx_pinctrl_remove(struct platform_device
*pdev
);
106 #endif /* __DRIVERS_PINCTRL_IMX_H */
This page took 0.031578 seconds and 5 git commands to generate.