2 * linux/drivers/pinctrl/pinctrl-pxa3xx.h
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.
8 * Copyright (C) 2011, Marvell Technology Group Ltd.
10 * Author: Haojian Zhuang <haojian.zhuang@marvell.com>
14 #ifndef __PINCTRL_PXA3XX_H
16 #include <linux/pinctrl/pinctrl.h>
17 #include <linux/pinctrl/pinmux.h>
19 #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
21 #define PXA3xx_MUX_GPIO 0
23 #define PXA3xx_MAX_MUX 8
24 #define MFPR_FUNC_MASK 0x7
39 struct pxa3xx_mfp_pin
{
41 const unsigned int pin
;
42 const unsigned int mfpr
; /* register offset */
43 const unsigned short func
[8];
46 struct pxa3xx_pin_group
{
53 struct pxa3xx_pmx_func
{
55 const char * const * groups
;
56 const unsigned num_groups
;
59 struct pxa3xx_pinmux_info
{
61 struct pinctrl_dev
*pctrl
;
62 enum pxa_cpu_type cputype
;
63 unsigned int phy_base
;
64 unsigned int phy_size
;
65 void __iomem
*virt_base
;
67 struct pxa3xx_mfp_pin
*mfp
;
69 struct pxa3xx_pin_group
*grps
;
70 unsigned int num_grps
;
71 struct pxa3xx_pmx_func
*funcs
;
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
;
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
;
88 enum pxa3xx_pin_list
{
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 */
This page took 0.038708 seconds and 5 git commands to generate.