~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/wm8350/gpio.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/mfd/wm8350/gpio.h (Version linux-6.12-rc7) and /include/linux/mfd/wm8350/gpio.h (Version linux-4.19.323)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later * << 
  2 /*                                                  1 /*
  3  * gpio.h  --  GPIO Driver for Wolfson WM8350       2  * gpio.h  --  GPIO Driver for Wolfson WM8350 PMIC
  4  *                                                  3  *
  5  * Copyright 2007 Wolfson Microelectronics PLC      4  * Copyright 2007 Wolfson Microelectronics PLC
                                                   >>   5  *
                                                   >>   6  *  This program is free software; you can redistribute  it and/or modify it
                                                   >>   7  *  under  the terms of  the GNU General  Public License as published by the
                                                   >>   8  *  Free Software Foundation;  either version 2 of the  License, or (at your
                                                   >>   9  *  option) any later version.
                                                   >>  10  *
  6  */                                                11  */
  7                                                    12 
  8 #ifndef __LINUX_MFD_WM8350_GPIO_H_                 13 #ifndef __LINUX_MFD_WM8350_GPIO_H_
  9 #define __LINUX_MFD_WM8350_GPIO_H_                 14 #define __LINUX_MFD_WM8350_GPIO_H_
 10                                                    15 
 11 #include <linux/platform_device.h>                 16 #include <linux/platform_device.h>
 12                                                    17 
 13 /*                                                 18 /*
 14  * GPIO Registers.                                 19  * GPIO Registers.
 15  */                                                20  */
 16 #define WM8350_GPIO_DEBOUNCE                       21 #define WM8350_GPIO_DEBOUNCE                    0x80
 17 #define WM8350_GPIO_PIN_PULL_UP_CONTROL            22 #define WM8350_GPIO_PIN_PULL_UP_CONTROL         0x81
 18 #define WM8350_GPIO_PULL_DOWN_CONTROL              23 #define WM8350_GPIO_PULL_DOWN_CONTROL           0x82
 19 #define WM8350_GPIO_INT_MODE                       24 #define WM8350_GPIO_INT_MODE                    0x83
 20 #define WM8350_GPIO_CONTROL                        25 #define WM8350_GPIO_CONTROL                     0x85
 21 #define WM8350_GPIO_CONFIGURATION_I_O              26 #define WM8350_GPIO_CONFIGURATION_I_O           0x86
 22 #define WM8350_GPIO_PIN_POLARITY_TYPE              27 #define WM8350_GPIO_PIN_POLARITY_TYPE           0x87
 23 #define WM8350_GPIO_FUNCTION_SELECT_1              28 #define WM8350_GPIO_FUNCTION_SELECT_1           0x8C
 24 #define WM8350_GPIO_FUNCTION_SELECT_2              29 #define WM8350_GPIO_FUNCTION_SELECT_2           0x8D
 25 #define WM8350_GPIO_FUNCTION_SELECT_3              30 #define WM8350_GPIO_FUNCTION_SELECT_3           0x8E
 26 #define WM8350_GPIO_FUNCTION_SELECT_4              31 #define WM8350_GPIO_FUNCTION_SELECT_4           0x8F
 27 #define WM8350_GPIO_LEVEL                          32 #define WM8350_GPIO_LEVEL                       0xE6
 28                                                    33 
 29 /*                                                 34 /*
 30  * GPIO Functions                                  35  * GPIO Functions
 31  */                                                36  */
 32 #define WM8350_GPIO0_GPIO_IN                       37 #define WM8350_GPIO0_GPIO_IN                    0x0
 33 #define WM8350_GPIO0_GPIO_OUT                      38 #define WM8350_GPIO0_GPIO_OUT                   0x0
 34 #define WM8350_GPIO0_PWR_ON_IN                     39 #define WM8350_GPIO0_PWR_ON_IN                  0x1
 35 #define WM8350_GPIO0_PWR_ON_OUT                    40 #define WM8350_GPIO0_PWR_ON_OUT                 0x1
 36 #define WM8350_GPIO0_LDO_EN_IN                     41 #define WM8350_GPIO0_LDO_EN_IN                  0x2
 37 #define WM8350_GPIO0_VRTC_OUT                      42 #define WM8350_GPIO0_VRTC_OUT                   0x2
 38 #define WM8350_GPIO0_LPWR1_IN                      43 #define WM8350_GPIO0_LPWR1_IN                   0x3
 39 #define WM8350_GPIO0_POR_B_OUT                     44 #define WM8350_GPIO0_POR_B_OUT                  0x3
 40                                                    45 
 41 #define WM8350_GPIO1_GPIO_IN                       46 #define WM8350_GPIO1_GPIO_IN                    0x0
 42 #define WM8350_GPIO1_GPIO_OUT                      47 #define WM8350_GPIO1_GPIO_OUT                   0x0
 43 #define WM8350_GPIO1_PWR_ON_IN                     48 #define WM8350_GPIO1_PWR_ON_IN                  0x1
 44 #define WM8350_GPIO1_DO_CONF_OUT                   49 #define WM8350_GPIO1_DO_CONF_OUT                0x1
 45 #define WM8350_GPIO1_LDO_EN_IN                     50 #define WM8350_GPIO1_LDO_EN_IN                  0x2
 46 #define WM8350_GPIO1_RESET_OUT                     51 #define WM8350_GPIO1_RESET_OUT                  0x2
 47 #define WM8350_GPIO1_LPWR2_IN                      52 #define WM8350_GPIO1_LPWR2_IN                   0x3
 48 #define WM8350_GPIO1_MEMRST_OUT                    53 #define WM8350_GPIO1_MEMRST_OUT                 0x3
 49                                                    54 
 50 #define WM8350_GPIO2_GPIO_IN                       55 #define WM8350_GPIO2_GPIO_IN                    0x0
 51 #define WM8350_GPIO2_GPIO_OUT                      56 #define WM8350_GPIO2_GPIO_OUT                   0x0
 52 #define WM8350_GPIO2_PWR_ON_IN                     57 #define WM8350_GPIO2_PWR_ON_IN                  0x1
 53 #define WM8350_GPIO2_PWR_ON_OUT                    58 #define WM8350_GPIO2_PWR_ON_OUT                 0x1
 54 #define WM8350_GPIO2_WAKE_UP_IN                    59 #define WM8350_GPIO2_WAKE_UP_IN                 0x2
 55 #define WM8350_GPIO2_VRTC_OUT                      60 #define WM8350_GPIO2_VRTC_OUT                   0x2
 56 #define WM8350_GPIO2_32KHZ_IN                      61 #define WM8350_GPIO2_32KHZ_IN                   0x3
 57 #define WM8350_GPIO2_32KHZ_OUT                     62 #define WM8350_GPIO2_32KHZ_OUT                  0x3
 58                                                    63 
 59 #define WM8350_GPIO3_GPIO_IN                       64 #define WM8350_GPIO3_GPIO_IN                    0x0
 60 #define WM8350_GPIO3_GPIO_OUT                      65 #define WM8350_GPIO3_GPIO_OUT                   0x0
 61 #define WM8350_GPIO3_PWR_ON_IN                     66 #define WM8350_GPIO3_PWR_ON_IN                  0x1
 62 #define WM8350_GPIO3_P_CLK_OUT                     67 #define WM8350_GPIO3_P_CLK_OUT                  0x1
 63 #define WM8350_GPIO3_LDO_EN_IN                     68 #define WM8350_GPIO3_LDO_EN_IN                  0x2
 64 #define WM8350_GPIO3_VRTC_OUT                      69 #define WM8350_GPIO3_VRTC_OUT                   0x2
 65 #define WM8350_GPIO3_PWR_OFF_IN                    70 #define WM8350_GPIO3_PWR_OFF_IN                 0x3
 66 #define WM8350_GPIO3_32KHZ_OUT                     71 #define WM8350_GPIO3_32KHZ_OUT                  0x3
 67                                                    72 
 68 #define WM8350_GPIO4_GPIO_IN                       73 #define WM8350_GPIO4_GPIO_IN                    0x0
 69 #define WM8350_GPIO4_GPIO_OUT                      74 #define WM8350_GPIO4_GPIO_OUT                   0x0
 70 #define WM8350_GPIO4_MR_IN                         75 #define WM8350_GPIO4_MR_IN                      0x1
 71 #define WM8350_GPIO4_MEM_RST_OUT                   76 #define WM8350_GPIO4_MEM_RST_OUT                0x1
 72 #define WM8350_GPIO4_FLASH_IN                      77 #define WM8350_GPIO4_FLASH_IN                   0x2
 73 #define WM8350_GPIO4_ADA_OUT                       78 #define WM8350_GPIO4_ADA_OUT                    0x2
 74 #define WM8350_GPIO4_HIBERNATE_IN                  79 #define WM8350_GPIO4_HIBERNATE_IN               0x3
 75 #define WM8350_GPIO4_FLASH_OUT                     80 #define WM8350_GPIO4_FLASH_OUT                  0x3
 76 #define WM8350_GPIO4_MICDET_OUT                    81 #define WM8350_GPIO4_MICDET_OUT                 0x4
 77 #define WM8350_GPIO4_MICSHT_OUT                    82 #define WM8350_GPIO4_MICSHT_OUT                 0x5
 78                                                    83 
 79 #define WM8350_GPIO5_GPIO_IN                       84 #define WM8350_GPIO5_GPIO_IN                    0x0
 80 #define WM8350_GPIO5_GPIO_OUT                      85 #define WM8350_GPIO5_GPIO_OUT                   0x0
 81 #define WM8350_GPIO5_LPWR1_IN                      86 #define WM8350_GPIO5_LPWR1_IN                   0x1
 82 #define WM8350_GPIO5_P_CLK_OUT                     87 #define WM8350_GPIO5_P_CLK_OUT                  0x1
 83 #define WM8350_GPIO5_ADCLRCLK_IN                   88 #define WM8350_GPIO5_ADCLRCLK_IN                0x2
 84 #define WM8350_GPIO5_ADCLRCLK_OUT                  89 #define WM8350_GPIO5_ADCLRCLK_OUT               0x2
 85 #define WM8350_GPIO5_HIBERNATE_IN                  90 #define WM8350_GPIO5_HIBERNATE_IN               0x3
 86 #define WM8350_GPIO5_32KHZ_OUT                     91 #define WM8350_GPIO5_32KHZ_OUT                  0x3
 87 #define WM8350_GPIO5_MICDET_OUT                    92 #define WM8350_GPIO5_MICDET_OUT                 0x4
 88 #define WM8350_GPIO5_MICSHT_OUT                    93 #define WM8350_GPIO5_MICSHT_OUT                 0x5
 89 #define WM8350_GPIO5_ADA_OUT                       94 #define WM8350_GPIO5_ADA_OUT                    0x6
 90 #define WM8350_GPIO5_OPCLK_OUT                     95 #define WM8350_GPIO5_OPCLK_OUT                  0x7
 91                                                    96 
 92 #define WM8350_GPIO6_GPIO_IN                       97 #define WM8350_GPIO6_GPIO_IN                    0x0
 93 #define WM8350_GPIO6_GPIO_OUT                      98 #define WM8350_GPIO6_GPIO_OUT                   0x0
 94 #define WM8350_GPIO6_LPWR2_IN                      99 #define WM8350_GPIO6_LPWR2_IN                   0x1
 95 #define WM8350_GPIO6_MEMRST_OUT                   100 #define WM8350_GPIO6_MEMRST_OUT                 0x1
 96 #define WM8350_GPIO6_FLASH_IN                     101 #define WM8350_GPIO6_FLASH_IN                   0x2
 97 #define WM8350_GPIO6_ADA_OUT                      102 #define WM8350_GPIO6_ADA_OUT                    0x2
 98 #define WM8350_GPIO6_HIBERNATE_IN                 103 #define WM8350_GPIO6_HIBERNATE_IN               0x3
 99 #define WM8350_GPIO6_RTC_OUT                      104 #define WM8350_GPIO6_RTC_OUT                    0x3
100 #define WM8350_GPIO6_MICDET_OUT                   105 #define WM8350_GPIO6_MICDET_OUT                 0x4
101 #define WM8350_GPIO6_MICSHT_OUT                   106 #define WM8350_GPIO6_MICSHT_OUT                 0x5
102 #define WM8350_GPIO6_ADCLRCLKB_OUT                107 #define WM8350_GPIO6_ADCLRCLKB_OUT              0x6
103 #define WM8350_GPIO6_SDOUT_OUT                    108 #define WM8350_GPIO6_SDOUT_OUT                  0x7
104                                                   109 
105 #define WM8350_GPIO7_GPIO_IN                      110 #define WM8350_GPIO7_GPIO_IN                    0x0
106 #define WM8350_GPIO7_GPIO_OUT                     111 #define WM8350_GPIO7_GPIO_OUT                   0x0
107 #define WM8350_GPIO7_LPWR3_IN                     112 #define WM8350_GPIO7_LPWR3_IN                   0x1
108 #define WM8350_GPIO7_P_CLK_OUT                    113 #define WM8350_GPIO7_P_CLK_OUT                  0x1
109 #define WM8350_GPIO7_MASK_IN                      114 #define WM8350_GPIO7_MASK_IN                    0x2
110 #define WM8350_GPIO7_VCC_FAULT_OUT                115 #define WM8350_GPIO7_VCC_FAULT_OUT              0x2
111 #define WM8350_GPIO7_HIBERNATE_IN                 116 #define WM8350_GPIO7_HIBERNATE_IN               0x3
112 #define WM8350_GPIO7_BATT_FAULT_OUT               117 #define WM8350_GPIO7_BATT_FAULT_OUT             0x3
113 #define WM8350_GPIO7_MICDET_OUT                   118 #define WM8350_GPIO7_MICDET_OUT                 0x4
114 #define WM8350_GPIO7_MICSHT_OUT                   119 #define WM8350_GPIO7_MICSHT_OUT                 0x5
115 #define WM8350_GPIO7_ADA_OUT                      120 #define WM8350_GPIO7_ADA_OUT                    0x6
116 #define WM8350_GPIO7_CSB_IN                       121 #define WM8350_GPIO7_CSB_IN                     0x7
117                                                   122 
118 #define WM8350_GPIO8_GPIO_IN                      123 #define WM8350_GPIO8_GPIO_IN                    0x0
119 #define WM8350_GPIO8_GPIO_OUT                     124 #define WM8350_GPIO8_GPIO_OUT                   0x0
120 #define WM8350_GPIO8_MR_IN                        125 #define WM8350_GPIO8_MR_IN                      0x1
121 #define WM8350_GPIO8_VCC_FAULT_OUT                126 #define WM8350_GPIO8_VCC_FAULT_OUT              0x1
122 #define WM8350_GPIO8_ADCBCLK_IN                   127 #define WM8350_GPIO8_ADCBCLK_IN                 0x2
123 #define WM8350_GPIO8_ADCBCLK_OUT                  128 #define WM8350_GPIO8_ADCBCLK_OUT                0x2
124 #define WM8350_GPIO8_PWR_OFF_IN                   129 #define WM8350_GPIO8_PWR_OFF_IN                 0x3
125 #define WM8350_GPIO8_BATT_FAULT_OUT               130 #define WM8350_GPIO8_BATT_FAULT_OUT             0x3
126 #define WM8350_GPIO8_ALTSCL_IN                    131 #define WM8350_GPIO8_ALTSCL_IN                  0xf
127                                                   132 
128 #define WM8350_GPIO9_GPIO_IN                      133 #define WM8350_GPIO9_GPIO_IN                    0x0
129 #define WM8350_GPIO9_GPIO_OUT                     134 #define WM8350_GPIO9_GPIO_OUT                   0x0
130 #define WM8350_GPIO9_HEARTBEAT_IN                 135 #define WM8350_GPIO9_HEARTBEAT_IN               0x1
131 #define WM8350_GPIO9_VCC_FAULT_OUT                136 #define WM8350_GPIO9_VCC_FAULT_OUT              0x1
132 #define WM8350_GPIO9_MASK_IN                      137 #define WM8350_GPIO9_MASK_IN                    0x2
133 #define WM8350_GPIO9_LINE_GT_BATT_OUT             138 #define WM8350_GPIO9_LINE_GT_BATT_OUT           0x2
134 #define WM8350_GPIO9_PWR_OFF_IN                   139 #define WM8350_GPIO9_PWR_OFF_IN                 0x3
135 #define WM8350_GPIO9_BATT_FAULT_OUT               140 #define WM8350_GPIO9_BATT_FAULT_OUT             0x3
136 #define WM8350_GPIO9_ALTSDA_OUT                   141 #define WM8350_GPIO9_ALTSDA_OUT                 0xf
137                                                   142 
138 #define WM8350_GPIO10_GPIO_IN                     143 #define WM8350_GPIO10_GPIO_IN                   0x0
139 #define WM8350_GPIO10_GPIO_OUT                    144 #define WM8350_GPIO10_GPIO_OUT                  0x0
140 #define WM8350_GPIO10_ISINKC_OUT                  145 #define WM8350_GPIO10_ISINKC_OUT                0x1
141 #define WM8350_GPIO10_PWR_OFF_IN                  146 #define WM8350_GPIO10_PWR_OFF_IN                0x2
142 #define WM8350_GPIO10_LINE_GT_BATT_OUT            147 #define WM8350_GPIO10_LINE_GT_BATT_OUT          0x2
143 #define WM8350_GPIO10_CHD_IND_IN                  148 #define WM8350_GPIO10_CHD_IND_IN                0x3
144                                                   149 
145 #define WM8350_GPIO11_GPIO_IN                     150 #define WM8350_GPIO11_GPIO_IN                   0x0
146 #define WM8350_GPIO11_GPIO_OUT                    151 #define WM8350_GPIO11_GPIO_OUT                  0x0
147 #define WM8350_GPIO11_ISINKD_OUT                  152 #define WM8350_GPIO11_ISINKD_OUT                0x1
148 #define WM8350_GPIO11_WAKEUP_IN                   153 #define WM8350_GPIO11_WAKEUP_IN                 0x2
149 #define WM8350_GPIO11_LINE_GT_BATT_OUT            154 #define WM8350_GPIO11_LINE_GT_BATT_OUT          0x2
150 #define WM8350_GPIO11_CHD_IND_IN                  155 #define WM8350_GPIO11_CHD_IND_IN                0x3
151                                                   156 
152 #define WM8350_GPIO12_GPIO_IN                     157 #define WM8350_GPIO12_GPIO_IN                   0x0
153 #define WM8350_GPIO12_GPIO_OUT                    158 #define WM8350_GPIO12_GPIO_OUT                  0x0
154 #define WM8350_GPIO12_ISINKE_OUT                  159 #define WM8350_GPIO12_ISINKE_OUT                0x1
155 #define WM8350_GPIO12_LINE_GT_BATT_OUT            160 #define WM8350_GPIO12_LINE_GT_BATT_OUT          0x2
156 #define WM8350_GPIO12_LINE_EN_OUT                 161 #define WM8350_GPIO12_LINE_EN_OUT               0x3
157 #define WM8350_GPIO12_32KHZ_OUT                   162 #define WM8350_GPIO12_32KHZ_OUT                 0x4
158                                                   163 
159 #define WM8350_GPIO_DIR_IN                        164 #define WM8350_GPIO_DIR_IN                      0
160 #define WM8350_GPIO_DIR_OUT                       165 #define WM8350_GPIO_DIR_OUT                     1
161 #define WM8350_GPIO_ACTIVE_LOW                    166 #define WM8350_GPIO_ACTIVE_LOW                  0
162 #define WM8350_GPIO_ACTIVE_HIGH                   167 #define WM8350_GPIO_ACTIVE_HIGH                 1
163 #define WM8350_GPIO_PULL_NONE                     168 #define WM8350_GPIO_PULL_NONE                   0
164 #define WM8350_GPIO_PULL_UP                       169 #define WM8350_GPIO_PULL_UP                     1
165 #define WM8350_GPIO_PULL_DOWN                     170 #define WM8350_GPIO_PULL_DOWN                   2
166 #define WM8350_GPIO_INVERT_OFF                    171 #define WM8350_GPIO_INVERT_OFF                  0
167 #define WM8350_GPIO_INVERT_ON                     172 #define WM8350_GPIO_INVERT_ON                   1
168 #define WM8350_GPIO_DEBOUNCE_OFF                  173 #define WM8350_GPIO_DEBOUNCE_OFF                0
169 #define WM8350_GPIO_DEBOUNCE_ON                   174 #define WM8350_GPIO_DEBOUNCE_ON                 1
170                                                   175 
171 /*                                                176 /*
172  * R30 (0x1E) - GPIO Interrupt Status             177  * R30 (0x1E) - GPIO Interrupt Status
173  */                                               178  */
174 #define WM8350_GP12_EINT                          179 #define WM8350_GP12_EINT                        0x1000
175 #define WM8350_GP11_EINT                          180 #define WM8350_GP11_EINT                        0x0800
176 #define WM8350_GP10_EINT                          181 #define WM8350_GP10_EINT                        0x0400
177 #define WM8350_GP9_EINT                           182 #define WM8350_GP9_EINT                         0x0200
178 #define WM8350_GP8_EINT                           183 #define WM8350_GP8_EINT                         0x0100
179 #define WM8350_GP7_EINT                           184 #define WM8350_GP7_EINT                         0x0080
180 #define WM8350_GP6_EINT                           185 #define WM8350_GP6_EINT                         0x0040
181 #define WM8350_GP5_EINT                           186 #define WM8350_GP5_EINT                         0x0020
182 #define WM8350_GP4_EINT                           187 #define WM8350_GP4_EINT                         0x0010
183 #define WM8350_GP3_EINT                           188 #define WM8350_GP3_EINT                         0x0008
184 #define WM8350_GP2_EINT                           189 #define WM8350_GP2_EINT                         0x0004
185 #define WM8350_GP1_EINT                           190 #define WM8350_GP1_EINT                         0x0002
186 #define WM8350_GP0_EINT                           191 #define WM8350_GP0_EINT                         0x0001
187                                                   192 
188                                                   193 
189 /*                                                194 /*
190  * R128 (0x80) - GPIO Debounce                    195  * R128 (0x80) - GPIO Debounce
191  */                                               196  */
192 #define WM8350_GP12_DB                            197 #define WM8350_GP12_DB                          0x1000
193 #define WM8350_GP11_DB                            198 #define WM8350_GP11_DB                          0x0800
194 #define WM8350_GP10_DB                            199 #define WM8350_GP10_DB                          0x0400
195 #define WM8350_GP9_DB                             200 #define WM8350_GP9_DB                           0x0200
196 #define WM8350_GP8_DB                             201 #define WM8350_GP8_DB                           0x0100
197 #define WM8350_GP7_DB                             202 #define WM8350_GP7_DB                           0x0080
198 #define WM8350_GP6_DB                             203 #define WM8350_GP6_DB                           0x0040
199 #define WM8350_GP5_DB                             204 #define WM8350_GP5_DB                           0x0020
200 #define WM8350_GP4_DB                             205 #define WM8350_GP4_DB                           0x0010
201 #define WM8350_GP3_DB                             206 #define WM8350_GP3_DB                           0x0008
202 #define WM8350_GP2_DB                             207 #define WM8350_GP2_DB                           0x0004
203 #define WM8350_GP1_DB                             208 #define WM8350_GP1_DB                           0x0002
204 #define WM8350_GP0_DB                             209 #define WM8350_GP0_DB                           0x0001
205                                                   210 
206 /*                                                211 /*
207  * R129 (0x81) - GPIO Pin pull up Control         212  * R129 (0x81) - GPIO Pin pull up Control
208  */                                               213  */
209 #define WM8350_GP12_PU                            214 #define WM8350_GP12_PU                          0x1000
210 #define WM8350_GP11_PU                            215 #define WM8350_GP11_PU                          0x0800
211 #define WM8350_GP10_PU                            216 #define WM8350_GP10_PU                          0x0400
212 #define WM8350_GP9_PU                             217 #define WM8350_GP9_PU                           0x0200
213 #define WM8350_GP8_PU                             218 #define WM8350_GP8_PU                           0x0100
214 #define WM8350_GP7_PU                             219 #define WM8350_GP7_PU                           0x0080
215 #define WM8350_GP6_PU                             220 #define WM8350_GP6_PU                           0x0040
216 #define WM8350_GP5_PU                             221 #define WM8350_GP5_PU                           0x0020
217 #define WM8350_GP4_PU                             222 #define WM8350_GP4_PU                           0x0010
218 #define WM8350_GP3_PU                             223 #define WM8350_GP3_PU                           0x0008
219 #define WM8350_GP2_PU                             224 #define WM8350_GP2_PU                           0x0004
220 #define WM8350_GP1_PU                             225 #define WM8350_GP1_PU                           0x0002
221 #define WM8350_GP0_PU                             226 #define WM8350_GP0_PU                           0x0001
222                                                   227 
223 /*                                                228 /*
224  * R130 (0x82) - GPIO Pull down Control           229  * R130 (0x82) - GPIO Pull down Control
225  */                                               230  */
226 #define WM8350_GP12_PD                            231 #define WM8350_GP12_PD                          0x1000
227 #define WM8350_GP11_PD                            232 #define WM8350_GP11_PD                          0x0800
228 #define WM8350_GP10_PD                            233 #define WM8350_GP10_PD                          0x0400
229 #define WM8350_GP9_PD                             234 #define WM8350_GP9_PD                           0x0200
230 #define WM8350_GP8_PD                             235 #define WM8350_GP8_PD                           0x0100
231 #define WM8350_GP7_PD                             236 #define WM8350_GP7_PD                           0x0080
232 #define WM8350_GP6_PD                             237 #define WM8350_GP6_PD                           0x0040
233 #define WM8350_GP5_PD                             238 #define WM8350_GP5_PD                           0x0020
234 #define WM8350_GP4_PD                             239 #define WM8350_GP4_PD                           0x0010
235 #define WM8350_GP3_PD                             240 #define WM8350_GP3_PD                           0x0008
236 #define WM8350_GP2_PD                             241 #define WM8350_GP2_PD                           0x0004
237 #define WM8350_GP1_PD                             242 #define WM8350_GP1_PD                           0x0002
238 #define WM8350_GP0_PD                             243 #define WM8350_GP0_PD                           0x0001
239                                                   244 
240 /*                                                245 /*
241  * R131 (0x83) - GPIO Interrupt Mode              246  * R131 (0x83) - GPIO Interrupt Mode
242  */                                               247  */
243 #define WM8350_GP12_INTMODE                       248 #define WM8350_GP12_INTMODE                     0x1000
244 #define WM8350_GP11_INTMODE                       249 #define WM8350_GP11_INTMODE                     0x0800
245 #define WM8350_GP10_INTMODE                       250 #define WM8350_GP10_INTMODE                     0x0400
246 #define WM8350_GP9_INTMODE                        251 #define WM8350_GP9_INTMODE                      0x0200
247 #define WM8350_GP8_INTMODE                        252 #define WM8350_GP8_INTMODE                      0x0100
248 #define WM8350_GP7_INTMODE                        253 #define WM8350_GP7_INTMODE                      0x0080
249 #define WM8350_GP6_INTMODE                        254 #define WM8350_GP6_INTMODE                      0x0040
250 #define WM8350_GP5_INTMODE                        255 #define WM8350_GP5_INTMODE                      0x0020
251 #define WM8350_GP4_INTMODE                        256 #define WM8350_GP4_INTMODE                      0x0010
252 #define WM8350_GP3_INTMODE                        257 #define WM8350_GP3_INTMODE                      0x0008
253 #define WM8350_GP2_INTMODE                        258 #define WM8350_GP2_INTMODE                      0x0004
254 #define WM8350_GP1_INTMODE                        259 #define WM8350_GP1_INTMODE                      0x0002
255 #define WM8350_GP0_INTMODE                        260 #define WM8350_GP0_INTMODE                      0x0001
256                                                   261 
257 /*                                                262 /*
258  * R133 (0x85) - GPIO Control                     263  * R133 (0x85) - GPIO Control
259  */                                               264  */
260 #define WM8350_GP_DBTIME_MASK                     265 #define WM8350_GP_DBTIME_MASK                   0x00C0
261                                                   266 
262 /*                                                267 /*
263  * R134 (0x86) - GPIO Configuration (i/o)         268  * R134 (0x86) - GPIO Configuration (i/o)
264  */                                               269  */
265 #define WM8350_GP12_DIR                           270 #define WM8350_GP12_DIR                         0x1000
266 #define WM8350_GP11_DIR                           271 #define WM8350_GP11_DIR                         0x0800
267 #define WM8350_GP10_DIR                           272 #define WM8350_GP10_DIR                         0x0400
268 #define WM8350_GP9_DIR                            273 #define WM8350_GP9_DIR                          0x0200
269 #define WM8350_GP8_DIR                            274 #define WM8350_GP8_DIR                          0x0100
270 #define WM8350_GP7_DIR                            275 #define WM8350_GP7_DIR                          0x0080
271 #define WM8350_GP6_DIR                            276 #define WM8350_GP6_DIR                          0x0040
272 #define WM8350_GP5_DIR                            277 #define WM8350_GP5_DIR                          0x0020
273 #define WM8350_GP4_DIR                            278 #define WM8350_GP4_DIR                          0x0010
274 #define WM8350_GP3_DIR                            279 #define WM8350_GP3_DIR                          0x0008
275 #define WM8350_GP2_DIR                            280 #define WM8350_GP2_DIR                          0x0004
276 #define WM8350_GP1_DIR                            281 #define WM8350_GP1_DIR                          0x0002
277 #define WM8350_GP0_DIR                            282 #define WM8350_GP0_DIR                          0x0001
278                                                   283 
279 /*                                                284 /*
280  * R135 (0x87) - GPIO Pin Polarity / Type         285  * R135 (0x87) - GPIO Pin Polarity / Type
281  */                                               286  */
282 #define WM8350_GP12_CFG                           287 #define WM8350_GP12_CFG                         0x1000
283 #define WM8350_GP11_CFG                           288 #define WM8350_GP11_CFG                         0x0800
284 #define WM8350_GP10_CFG                           289 #define WM8350_GP10_CFG                         0x0400
285 #define WM8350_GP9_CFG                            290 #define WM8350_GP9_CFG                          0x0200
286 #define WM8350_GP8_CFG                            291 #define WM8350_GP8_CFG                          0x0100
287 #define WM8350_GP7_CFG                            292 #define WM8350_GP7_CFG                          0x0080
288 #define WM8350_GP6_CFG                            293 #define WM8350_GP6_CFG                          0x0040
289 #define WM8350_GP5_CFG                            294 #define WM8350_GP5_CFG                          0x0020
290 #define WM8350_GP4_CFG                            295 #define WM8350_GP4_CFG                          0x0010
291 #define WM8350_GP3_CFG                            296 #define WM8350_GP3_CFG                          0x0008
292 #define WM8350_GP2_CFG                            297 #define WM8350_GP2_CFG                          0x0004
293 #define WM8350_GP1_CFG                            298 #define WM8350_GP1_CFG                          0x0002
294 #define WM8350_GP0_CFG                            299 #define WM8350_GP0_CFG                          0x0001
295                                                   300 
296 /*                                                301 /*
297  * R140 (0x8C) - GPIO Function Select 1           302  * R140 (0x8C) - GPIO Function Select 1
298  */                                               303  */
299 #define WM8350_GP3_FN_MASK                        304 #define WM8350_GP3_FN_MASK                      0xF000
300 #define WM8350_GP2_FN_MASK                        305 #define WM8350_GP2_FN_MASK                      0x0F00
301 #define WM8350_GP1_FN_MASK                        306 #define WM8350_GP1_FN_MASK                      0x00F0
302 #define WM8350_GP0_FN_MASK                        307 #define WM8350_GP0_FN_MASK                      0x000F
303                                                   308 
304 /*                                                309 /*
305  * R141 (0x8D) - GPIO Function Select 2           310  * R141 (0x8D) - GPIO Function Select 2
306  */                                               311  */
307 #define WM8350_GP7_FN_MASK                        312 #define WM8350_GP7_FN_MASK                      0xF000
308 #define WM8350_GP6_FN_MASK                        313 #define WM8350_GP6_FN_MASK                      0x0F00
309 #define WM8350_GP5_FN_MASK                        314 #define WM8350_GP5_FN_MASK                      0x00F0
310 #define WM8350_GP4_FN_MASK                        315 #define WM8350_GP4_FN_MASK                      0x000F
311                                                   316 
312 /*                                                317 /*
313  * R142 (0x8E) - GPIO Function Select 3           318  * R142 (0x8E) - GPIO Function Select 3
314  */                                               319  */
315 #define WM8350_GP11_FN_MASK                       320 #define WM8350_GP11_FN_MASK                     0xF000
316 #define WM8350_GP10_FN_MASK                       321 #define WM8350_GP10_FN_MASK                     0x0F00
317 #define WM8350_GP9_FN_MASK                        322 #define WM8350_GP9_FN_MASK                      0x00F0
318 #define WM8350_GP8_FN_MASK                        323 #define WM8350_GP8_FN_MASK                      0x000F
319                                                   324 
320 /*                                                325 /*
321  * R143 (0x8F) - GPIO Function Select 4           326  * R143 (0x8F) - GPIO Function Select 4
322  */                                               327  */
323 #define WM8350_GP12_FN_MASK                       328 #define WM8350_GP12_FN_MASK                     0x000F
324                                                   329 
325 /*                                                330 /*
326  * R230 (0xE6) - GPIO Pin Status                  331  * R230 (0xE6) - GPIO Pin Status
327  */                                               332  */
328 #define WM8350_GP12_LVL                           333 #define WM8350_GP12_LVL                         0x1000
329 #define WM8350_GP11_LVL                           334 #define WM8350_GP11_LVL                         0x0800
330 #define WM8350_GP10_LVL                           335 #define WM8350_GP10_LVL                         0x0400
331 #define WM8350_GP9_LVL                            336 #define WM8350_GP9_LVL                          0x0200
332 #define WM8350_GP8_LVL                            337 #define WM8350_GP8_LVL                          0x0100
333 #define WM8350_GP7_LVL                            338 #define WM8350_GP7_LVL                          0x0080
334 #define WM8350_GP6_LVL                            339 #define WM8350_GP6_LVL                          0x0040
335 #define WM8350_GP5_LVL                            340 #define WM8350_GP5_LVL                          0x0020
336 #define WM8350_GP4_LVL                            341 #define WM8350_GP4_LVL                          0x0010
337 #define WM8350_GP3_LVL                            342 #define WM8350_GP3_LVL                          0x0008
338 #define WM8350_GP2_LVL                            343 #define WM8350_GP2_LVL                          0x0004
339 #define WM8350_GP1_LVL                            344 #define WM8350_GP1_LVL                          0x0002
340 #define WM8350_GP0_LVL                            345 #define WM8350_GP0_LVL                          0x0001
341                                                   346 
342 struct wm8350;                                    347 struct wm8350;
343                                                   348 
344 int wm8350_gpio_config(struct wm8350 *wm8350,     349 int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func,
345                        int pol, int pull, int     350                        int pol, int pull, int invert, int debounce);
346                                                   351 
347 struct wm8350_gpio {                              352 struct wm8350_gpio {
348         struct platform_device *pdev;             353         struct platform_device *pdev;
349 };                                                354 };
350                                                   355 
351 /*                                                356 /*
352  * GPIO Interrupts                                357  * GPIO Interrupts
353  */                                               358  */
354 #define WM8350_IRQ_GPIO(x)                        359 #define WM8350_IRQ_GPIO(x)                      (50 + x)
355                                                   360 
356 #endif                                            361 #endif
357                                                   362 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php