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

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/tps6507x.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/tps6507x.h (Version linux-6.12-rc7) and /include/linux/mfd/tps6507x.h (Version linux-5.10.229)


  1 /* linux/mfd/tps6507x.h                             1 /* linux/mfd/tps6507x.h
  2  *                                                  2  *
  3  * Functions to access TPS65070 power manageme      3  * Functions to access TPS65070 power management chip.
  4  *                                                  4  *
  5  * Copyright (c) 2009 RidgeRun (todd.fischer@r      5  * Copyright (c) 2009 RidgeRun (todd.fischer@ridgerun.com)
  6  *                                                  6  *
  7  *                                                  7  *
  8  *  For licencing details see kernel-base/COPY      8  *  For licencing details see kernel-base/COPYING
  9  */                                                 9  */
 10                                                    10 
 11 #ifndef __LINUX_MFD_TPS6507X_H                     11 #ifndef __LINUX_MFD_TPS6507X_H
 12 #define __LINUX_MFD_TPS6507X_H                     12 #define __LINUX_MFD_TPS6507X_H
 13                                                    13 
 14 /*                                                 14 /*
 15  * -------------------------------------------     15  * ----------------------------------------------------------------------------
 16  * Registers, all 8 bits                           16  * Registers, all 8 bits
 17  * -------------------------------------------     17  * ----------------------------------------------------------------------------
 18  */                                                18  */
 19                                                    19 
 20                                                    20 
 21 /* Register definitions */                         21 /* Register definitions */
 22 #define TPS6507X_REG_PPATH1                        22 #define TPS6507X_REG_PPATH1                     0X01
 23 #define TPS6507X_CHG_USB                           23 #define TPS6507X_CHG_USB                        BIT(7)
 24 #define TPS6507X_CHG_AC                            24 #define TPS6507X_CHG_AC                         BIT(6)
 25 #define TPS6507X_CHG_USB_PW_ENABLE                 25 #define TPS6507X_CHG_USB_PW_ENABLE              BIT(5)
 26 #define TPS6507X_CHG_AC_PW_ENABLE                  26 #define TPS6507X_CHG_AC_PW_ENABLE               BIT(4)
 27 #define TPS6507X_CHG_AC_CURRENT                    27 #define TPS6507X_CHG_AC_CURRENT                 BIT(2)
 28 #define TPS6507X_CHG_USB_CURRENT                   28 #define TPS6507X_CHG_USB_CURRENT                BIT(0)
 29                                                    29 
 30 #define TPS6507X_REG_INT                           30 #define TPS6507X_REG_INT                        0X02
 31 #define TPS6507X_REG_MASK_AC_USB                   31 #define TPS6507X_REG_MASK_AC_USB                BIT(7)
 32 #define TPS6507X_REG_MASK_TSC                      32 #define TPS6507X_REG_MASK_TSC                   BIT(6)
 33 #define TPS6507X_REG_MASK_PB_IN                    33 #define TPS6507X_REG_MASK_PB_IN                 BIT(5)
 34 #define TPS6507X_REG_TSC_INT                       34 #define TPS6507X_REG_TSC_INT                    BIT(3)
 35 #define TPS6507X_REG_PB_IN_INT                     35 #define TPS6507X_REG_PB_IN_INT                  BIT(2)
 36 #define TPS6507X_REG_AC_USB_APPLIED                36 #define TPS6507X_REG_AC_USB_APPLIED             BIT(1)
 37 #define TPS6507X_REG_AC_USB_REMOVED                37 #define TPS6507X_REG_AC_USB_REMOVED             BIT(0)
 38                                                    38 
 39 #define TPS6507X_REG_CHGCONFIG0                    39 #define TPS6507X_REG_CHGCONFIG0                 0X03
 40                                                    40 
 41 #define TPS6507X_REG_CHGCONFIG1                    41 #define TPS6507X_REG_CHGCONFIG1                 0X04
 42 #define TPS6507X_CON_CTRL1_DCDC1_ENABLE            42 #define TPS6507X_CON_CTRL1_DCDC1_ENABLE         BIT(4)
 43 #define TPS6507X_CON_CTRL1_DCDC2_ENABLE            43 #define TPS6507X_CON_CTRL1_DCDC2_ENABLE         BIT(3)
 44 #define TPS6507X_CON_CTRL1_DCDC3_ENABLE            44 #define TPS6507X_CON_CTRL1_DCDC3_ENABLE         BIT(2)
 45 #define TPS6507X_CON_CTRL1_LDO1_ENABLE             45 #define TPS6507X_CON_CTRL1_LDO1_ENABLE          BIT(1)
 46 #define TPS6507X_CON_CTRL1_LDO2_ENABLE             46 #define TPS6507X_CON_CTRL1_LDO2_ENABLE          BIT(0)
 47                                                    47 
 48 #define TPS6507X_REG_CHGCONFIG2                    48 #define TPS6507X_REG_CHGCONFIG2                 0X05
 49                                                    49 
 50 #define TPS6507X_REG_CHGCONFIG3                    50 #define TPS6507X_REG_CHGCONFIG3                 0X06
 51                                                    51 
 52 #define TPS6507X_REG_ADCONFIG                      52 #define TPS6507X_REG_ADCONFIG                   0X07
 53 #define TPS6507X_ADCONFIG_AD_ENABLE                53 #define TPS6507X_ADCONFIG_AD_ENABLE             BIT(7)
 54 #define TPS6507X_ADCONFIG_START_CONVERSION         54 #define TPS6507X_ADCONFIG_START_CONVERSION      BIT(6)
 55 #define TPS6507X_ADCONFIG_CONVERSION_DONE          55 #define TPS6507X_ADCONFIG_CONVERSION_DONE       BIT(5)
 56 #define TPS6507X_ADCONFIG_VREF_ENABLE              56 #define TPS6507X_ADCONFIG_VREF_ENABLE           BIT(4)
 57 #define TPS6507X_ADCONFIG_INPUT_AD_IN1             57 #define TPS6507X_ADCONFIG_INPUT_AD_IN1          0
 58 #define TPS6507X_ADCONFIG_INPUT_AD_IN2             58 #define TPS6507X_ADCONFIG_INPUT_AD_IN2          1
 59 #define TPS6507X_ADCONFIG_INPUT_AD_IN3             59 #define TPS6507X_ADCONFIG_INPUT_AD_IN3          2
 60 #define TPS6507X_ADCONFIG_INPUT_AD_IN4             60 #define TPS6507X_ADCONFIG_INPUT_AD_IN4          3
 61 #define TPS6507X_ADCONFIG_INPUT_TS_PIN             61 #define TPS6507X_ADCONFIG_INPUT_TS_PIN          4
 62 #define TPS6507X_ADCONFIG_INPUT_BAT_CURRENT        62 #define TPS6507X_ADCONFIG_INPUT_BAT_CURRENT     5
 63 #define TPS6507X_ADCONFIG_INPUT_AC_VOLTAGE         63 #define TPS6507X_ADCONFIG_INPUT_AC_VOLTAGE      6
 64 #define TPS6507X_ADCONFIG_INPUT_SYS_VOLTAGE        64 #define TPS6507X_ADCONFIG_INPUT_SYS_VOLTAGE     7
 65 #define TPS6507X_ADCONFIG_INPUT_CHARGER_VOLTAG     65 #define TPS6507X_ADCONFIG_INPUT_CHARGER_VOLTAGE 8
 66 #define TPS6507X_ADCONFIG_INPUT_BAT_VOLTAGE        66 #define TPS6507X_ADCONFIG_INPUT_BAT_VOLTAGE     9
 67 #define TPS6507X_ADCONFIG_INPUT_THRESHOLD_VOLT     67 #define TPS6507X_ADCONFIG_INPUT_THRESHOLD_VOLTAGE 10
 68 #define TPS6507X_ADCONFIG_INPUT_ISET1_VOLTAGE      68 #define TPS6507X_ADCONFIG_INPUT_ISET1_VOLTAGE   11
 69 #define TPS6507X_ADCONFIG_INPUT_ISET2_VOLTAGE      69 #define TPS6507X_ADCONFIG_INPUT_ISET2_VOLTAGE   12
 70 #define TPS6507X_ADCONFIG_INPUT_REAL_TSC           70 #define TPS6507X_ADCONFIG_INPUT_REAL_TSC        14
 71 #define TPS6507X_ADCONFIG_INPUT_TSC                71 #define TPS6507X_ADCONFIG_INPUT_TSC             15
 72                                                    72 
 73 #define TPS6507X_REG_TSCMODE                       73 #define TPS6507X_REG_TSCMODE                    0X08
 74 #define TPS6507X_TSCMODE_X_POSITION                74 #define TPS6507X_TSCMODE_X_POSITION             0
 75 #define TPS6507X_TSCMODE_Y_POSITION                75 #define TPS6507X_TSCMODE_Y_POSITION             1
 76 #define TPS6507X_TSCMODE_PRESSURE                  76 #define TPS6507X_TSCMODE_PRESSURE               2
 77 #define TPS6507X_TSCMODE_X_PLATE                   77 #define TPS6507X_TSCMODE_X_PLATE                3
 78 #define TPS6507X_TSCMODE_Y_PLATE                   78 #define TPS6507X_TSCMODE_Y_PLATE                4
 79 #define TPS6507X_TSCMODE_STANDBY                   79 #define TPS6507X_TSCMODE_STANDBY                5
 80 #define TPS6507X_TSCMODE_ADC_INPUT                 80 #define TPS6507X_TSCMODE_ADC_INPUT              6
 81 #define TPS6507X_TSCMODE_DISABLE                   81 #define TPS6507X_TSCMODE_DISABLE                7
 82                                                    82 
 83 #define TPS6507X_REG_ADRESULT_1                    83 #define TPS6507X_REG_ADRESULT_1                 0X09
 84                                                    84 
 85 #define TPS6507X_REG_ADRESULT_2                    85 #define TPS6507X_REG_ADRESULT_2                 0X0A
 86 #define TPS6507X_REG_ADRESULT_2_MASK               86 #define TPS6507X_REG_ADRESULT_2_MASK            (BIT(1) | BIT(0))
 87                                                    87 
 88 #define TPS6507X_REG_PGOOD                         88 #define TPS6507X_REG_PGOOD                      0X0B
 89                                                    89 
 90 #define TPS6507X_REG_PGOODMASK                     90 #define TPS6507X_REG_PGOODMASK                  0X0C
 91                                                    91 
 92 #define TPS6507X_REG_CON_CTRL1                     92 #define TPS6507X_REG_CON_CTRL1                  0X0D
 93 #define TPS6507X_CON_CTRL1_DCDC1_ENABLE            93 #define TPS6507X_CON_CTRL1_DCDC1_ENABLE         BIT(4)
 94 #define TPS6507X_CON_CTRL1_DCDC2_ENABLE            94 #define TPS6507X_CON_CTRL1_DCDC2_ENABLE         BIT(3)
 95 #define TPS6507X_CON_CTRL1_DCDC3_ENABLE            95 #define TPS6507X_CON_CTRL1_DCDC3_ENABLE         BIT(2)
 96 #define TPS6507X_CON_CTRL1_LDO1_ENABLE             96 #define TPS6507X_CON_CTRL1_LDO1_ENABLE          BIT(1)
 97 #define TPS6507X_CON_CTRL1_LDO2_ENABLE             97 #define TPS6507X_CON_CTRL1_LDO2_ENABLE          BIT(0)
 98                                                    98 
 99 #define TPS6507X_REG_CON_CTRL2                     99 #define TPS6507X_REG_CON_CTRL2                  0X0E
100                                                   100 
101 #define TPS6507X_REG_CON_CTRL3                    101 #define TPS6507X_REG_CON_CTRL3                  0X0F
102                                                   102 
103 #define TPS6507X_REG_DEFDCDC1                     103 #define TPS6507X_REG_DEFDCDC1                   0X10
104 #define TPS6507X_DEFDCDC1_DCDC1_EXT_ADJ_EN        104 #define TPS6507X_DEFDCDC1_DCDC1_EXT_ADJ_EN      BIT(7)
105 #define TPS6507X_DEFDCDC1_DCDC1_MASK              105 #define TPS6507X_DEFDCDC1_DCDC1_MASK            0X3F
106                                                   106 
107 #define TPS6507X_REG_DEFDCDC2_LOW                 107 #define TPS6507X_REG_DEFDCDC2_LOW               0X11
108 #define TPS6507X_DEFDCDC2_LOW_DCDC2_MASK          108 #define TPS6507X_DEFDCDC2_LOW_DCDC2_MASK        0X3F
109                                                   109 
110 #define TPS6507X_REG_DEFDCDC2_HIGH                110 #define TPS6507X_REG_DEFDCDC2_HIGH              0X12
111 #define TPS6507X_DEFDCDC2_HIGH_DCDC2_MASK         111 #define TPS6507X_DEFDCDC2_HIGH_DCDC2_MASK       0X3F
112                                                   112 
113 #define TPS6507X_REG_DEFDCDC3_LOW                 113 #define TPS6507X_REG_DEFDCDC3_LOW               0X13
114 #define TPS6507X_DEFDCDC3_LOW_DCDC3_MASK          114 #define TPS6507X_DEFDCDC3_LOW_DCDC3_MASK        0X3F
115                                                   115 
116 #define TPS6507X_REG_DEFDCDC3_HIGH                116 #define TPS6507X_REG_DEFDCDC3_HIGH              0X14
117 #define TPS6507X_DEFDCDC3_HIGH_DCDC3_MASK         117 #define TPS6507X_DEFDCDC3_HIGH_DCDC3_MASK       0X3F
118                                                   118 
119 #define TPS6507X_REG_DEFSLEW                      119 #define TPS6507X_REG_DEFSLEW                    0X15
120                                                   120 
121 #define TPS6507X_REG_LDO_CTRL1                    121 #define TPS6507X_REG_LDO_CTRL1                  0X16
122 #define TPS6507X_REG_LDO_CTRL1_LDO1_MASK          122 #define TPS6507X_REG_LDO_CTRL1_LDO1_MASK        0X0F
123                                                   123 
124 #define TPS6507X_REG_DEFLDO2                      124 #define TPS6507X_REG_DEFLDO2                    0X17
125 #define TPS6507X_REG_DEFLDO2_LDO2_MASK            125 #define TPS6507X_REG_DEFLDO2_LDO2_MASK          0X3F
126                                                   126 
127 #define TPS6507X_REG_WLED_CTRL1                   127 #define TPS6507X_REG_WLED_CTRL1                 0X18
128                                                   128 
129 #define TPS6507X_REG_WLED_CTRL2                   129 #define TPS6507X_REG_WLED_CTRL2                 0X19
130                                                   130 
131 /* VDCDC MASK */                                  131 /* VDCDC MASK */
132 #define TPS6507X_DEFDCDCX_DCDC_MASK               132 #define TPS6507X_DEFDCDCX_DCDC_MASK             0X3F
133                                                   133 
134 #define TPS6507X_MAX_REGISTER                     134 #define TPS6507X_MAX_REGISTER                   0X19
135                                                   135 
136 /**                                               136 /**
137  * struct tps6507x_board - packages regulator     137  * struct tps6507x_board - packages regulator and touchscreen init data
138  * @tps6507x_regulator_data: regulator initial    138  * @tps6507x_regulator_data: regulator initialization values
139  *                                                139  *
140  * Board data may be used to initialize regula    140  * Board data may be used to initialize regulator and touchscreen.
141  */                                               141  */
142                                                   142 
143 struct tps6507x_board {                           143 struct tps6507x_board {
144         struct regulator_init_data *tps6507x_p    144         struct regulator_init_data *tps6507x_pmic_init_data;
145         struct touchscreen_init_data *tps6507x    145         struct touchscreen_init_data *tps6507x_ts_init_data;
146 };                                                146 };
147                                                   147 
148 /**                                               148 /**
149  * struct tps6507x_dev - tps6507x sub-driver c    149  * struct tps6507x_dev - tps6507x sub-driver chip access routines
150  * @read_dev() - I2C register read function       150  * @read_dev() - I2C register read function
151  * @write_dev() - I2C register write function     151  * @write_dev() - I2C register write function
152  *                                                152  *
153  * Device data may be used to access the TPS65    153  * Device data may be used to access the TPS6507x chip
154  */                                               154  */
155                                                   155 
156 struct tps6507x_dev {                             156 struct tps6507x_dev {
157         struct device *dev;                       157         struct device *dev;
158         struct i2c_client *i2c_client;            158         struct i2c_client *i2c_client;
159         int (*read_dev)(struct tps6507x_dev *t    159         int (*read_dev)(struct tps6507x_dev *tps6507x, char reg, int size,
160                         void *dest);              160                         void *dest);
161         int (*write_dev)(struct tps6507x_dev *    161         int (*write_dev)(struct tps6507x_dev *tps6507x, char reg, int size,
162                          void *src);              162                          void *src);
163                                                   163 
164         /* Client devices */                      164         /* Client devices */
165         struct tps6507x_pmic *pmic;               165         struct tps6507x_pmic *pmic;
166 };                                                166 };
167                                                   167 
168 #endif /*  __LINUX_MFD_TPS6507X_H */              168 #endif /*  __LINUX_MFD_TPS6507X_H */
169                                                   169 

~ [ 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