Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pinctrl-pxa3xx.h
Go to the documentation of this file.
1 /*
2  * linux/drivers/pinctrl/pinctrl-pxa3xx.h
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * publishhed by the Free Software Foundation.
7  *
8  * Copyright (C) 2011, Marvell Technology Group Ltd.
9  *
10  * Author: Haojian Zhuang <[email protected]>
11  *
12  */
13 
14 #ifndef __PINCTRL_PXA3XX_H
15 
16 #include <linux/pinctrl/pinctrl.h>
17 #include <linux/pinctrl/pinmux.h>
18 
19 #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
20 
21 #define PXA3xx_MUX_GPIO 0
22 
23 #define PXA3xx_MAX_MUX 8
24 #define MFPR_FUNC_MASK 0x7
25 
37 };
38 
40  const char *name;
41  const unsigned int pin;
42  const unsigned int mfpr; /* register offset */
43  const unsigned short func[8];
44 };
45 
47  const char *name;
48  const unsigned mux;
49  const unsigned *pins;
50  const unsigned npins;
51 };
52 
54  const char *name;
55  const char * const * groups;
56  const unsigned num_groups;
57 };
58 
60  struct device *dev;
61  struct pinctrl_dev *pctrl;
63  unsigned int phy_base;
64  unsigned int phy_size;
66 
68  unsigned int num_mfp;
70  unsigned int num_grps;
72  unsigned int num_funcs;
73  unsigned int num_gpio;
74  struct pinctrl_desc *desc;
75  struct pinctrl_pin_desc *pads;
76  unsigned int num_pads;
77 
78  unsigned ds_mask; /* drive strength mask */
79  unsigned ds_shift; /* drive strength shift */
80  unsigned slp_mask; /* sleep mask */
81  unsigned slp_input_low;
82  unsigned slp_input_high;
83  unsigned slp_output_low;
84  unsigned slp_output_high;
85  unsigned slp_float;
86 };
87 
89  GPIO0 = 0,
99  GPIO10, /* 10 */
109  GPIO20, /* 20 */
119  GPIO30, /* 30 */
129  GPIO40, /* 40 */
139  GPIO50, /* 50 */
149  GPIO60, /* 60 */
159  GPIO70, /* 70 */
169  GPIO80, /* 80 */
179  GPIO90, /* 90 */
189  GPIO100, /* 100 */
199  GPIO110, /* 110 */
209  GPIO120, /* 120 */
219  GPIO130, /* 130 */
229  GPIO140, /* 140 */
239  GPIO150, /* 150 */
249  GPIO160, /* 160 */
259 };
260 
261 extern int pxa3xx_pinctrl_register(struct platform_device *pdev,
262  struct pxa3xx_pinmux_info *info);
263 extern int pxa3xx_pinctrl_unregister(struct platform_device *pdev);
264 #endif /* __PINCTRL_PXA3XX_H */