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