22
22
#define BQ25890_IRQ_PIN "bq25890_irq"
23
23
24
24
#define BQ25890_ID 3
25
+ #define BQ25895_ID 7
25
26
#define BQ25896_ID 0
26
27
27
28
enum bq25890_fields {
@@ -171,7 +172,7 @@ static const struct reg_field bq25890_reg_fields[] = {
171
172
[F_WD ] = REG_FIELD (0x07 , 4 , 5 ),
172
173
[F_TMR_EN ] = REG_FIELD (0x07 , 3 , 3 ),
173
174
[F_CHG_TMR ] = REG_FIELD (0x07 , 1 , 2 ),
174
- [F_JEITA_ISET ] = REG_FIELD (0x07 , 0 , 0 ),
175
+ [F_JEITA_ISET ] = REG_FIELD (0x07 , 0 , 0 ), // reserved on BQ25895
175
176
/* REG08 */
176
177
[F_BATCMP ] = REG_FIELD (0x08 , 5 , 7 ),
177
178
[F_VCLAMP ] = REG_FIELD (0x08 , 2 , 4 ),
@@ -180,15 +181,15 @@ static const struct reg_field bq25890_reg_fields[] = {
180
181
[F_FORCE_ICO ] = REG_FIELD (0x09 , 7 , 7 ),
181
182
[F_TMR2X_EN ] = REG_FIELD (0x09 , 6 , 6 ),
182
183
[F_BATFET_DIS ] = REG_FIELD (0x09 , 5 , 5 ),
183
- [F_JEITA_VSET ] = REG_FIELD (0x09 , 4 , 4 ),
184
+ [F_JEITA_VSET ] = REG_FIELD (0x09 , 4 , 4 ), // reserved on BQ25895
184
185
[F_BATFET_DLY ] = REG_FIELD (0x09 , 3 , 3 ),
185
186
[F_BATFET_RST_EN ] = REG_FIELD (0x09 , 2 , 2 ),
186
187
[F_PUMPX_UP ] = REG_FIELD (0x09 , 1 , 1 ),
187
188
[F_PUMPX_DN ] = REG_FIELD (0x09 , 0 , 0 ),
188
189
/* REG0A */
189
190
[F_BOOSTV ] = REG_FIELD (0x0A , 4 , 7 ),
190
191
/* PFM_OTG_DIS 3 on BQ25896 */
191
- [F_BOOSTI ] = REG_FIELD (0x0A , 0 , 2 ),
192
+ [F_BOOSTI ] = REG_FIELD (0x0A , 0 , 2 ), // reserved on BQ25895
192
193
/* REG0B */
193
194
[F_VBUS_STAT ] = REG_FIELD (0x0B , 5 , 7 ),
194
195
[F_CHG_STAT ] = REG_FIELD (0x0B , 3 , 4 ),
@@ -392,6 +393,8 @@ static int bq25890_power_supply_get_property(struct power_supply *psy,
392
393
case POWER_SUPPLY_PROP_MODEL_NAME :
393
394
if (bq -> chip_id == BQ25890_ID )
394
395
val -> strval = "BQ25890" ;
396
+ else if (bq -> chip_id == BQ25895_ID )
397
+ val -> strval = "BQ25895" ;
395
398
else if (bq -> chip_id == BQ25896_ID )
396
399
val -> strval = "BQ25896" ;
397
400
else
@@ -862,7 +865,8 @@ static int bq25890_probe(struct i2c_client *client,
862
865
return bq -> chip_id ;
863
866
}
864
867
865
- if ((bq -> chip_id != BQ25890_ID ) && (bq -> chip_id != BQ25896_ID )) {
868
+ if ((bq -> chip_id != BQ25890_ID ) && (bq -> chip_id != BQ25895_ID )
869
+ && (bq -> chip_id != BQ25896_ID )) {
866
870
dev_err (dev , "Chip with ID=%d, not supported!\n" , bq -> chip_id );
867
871
return - ENODEV ;
868
872
}
0 commit comments