Skip to content

Commit afe5301

Browse files
webgeek1234sre
authored andcommitted
power: bq24190: Add BQ24193 support
The BQ24193 is most similar to the BQ24192. This is used in many Nvidia Tegra devices such as the SHIELD Portable. This variant works as-is with the existing BQ24192 code, but cannot be probed with a simple fallback compatible to ti,bq24192. So add it same as how BQ24196 is handled. Signed-off-by: Aaron Kling <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 6133b98 commit afe5301

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/power/supply/bq24190_charger.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ enum bq24190_chip {
207207
BQ24190,
208208
BQ24192,
209209
BQ24192i,
210+
BQ24193,
210211
BQ24196,
211212
BQ24296,
212213
BQ24297,
@@ -2014,6 +2015,17 @@ static const struct bq24190_chip_info bq24190_chip_info_tbl[] = {
20142015
.ichg_array_size = ARRAY_SIZE(bq24190_ccc_ichg_values),
20152016
#ifdef CONFIG_REGULATOR
20162017
.vbus_desc = &bq24190_vbus_desc,
2018+
#endif
2019+
.check_chip = bq24190_check_chip,
2020+
.set_chg_config = bq24190_battery_set_chg_config,
2021+
.ntc_fault_mask = BQ24190_REG_F_NTC_FAULT_MASK,
2022+
.get_ntc_status = bq24190_charger_get_ntc_status,
2023+
.set_otg_vbus = bq24190_set_otg_vbus,
2024+
},
2025+
[BQ24193] = {
2026+
.ichg_array_size = ARRAY_SIZE(bq24190_ccc_ichg_values),
2027+
#ifdef CONFIG_REGULATOR
2028+
.vbus_desc = &bq24190_vbus_desc,
20172029
#endif
20182030
.check_chip = bq24190_check_chip,
20192031
.set_chg_config = bq24190_battery_set_chg_config,
@@ -2308,6 +2320,7 @@ static const struct i2c_device_id bq24190_i2c_ids[] = {
23082320
{ "bq24190", (kernel_ulong_t)&bq24190_chip_info_tbl[BQ24190] },
23092321
{ "bq24192", (kernel_ulong_t)&bq24190_chip_info_tbl[BQ24192] },
23102322
{ "bq24192i", (kernel_ulong_t)&bq24190_chip_info_tbl[BQ24192i] },
2323+
{ "bq24193", (kernel_ulong_t)&bq24190_chip_info_tbl[BQ24193] },
23112324
{ "bq24196", (kernel_ulong_t)&bq24190_chip_info_tbl[BQ24196] },
23122325
{ "bq24296", (kernel_ulong_t)&bq24190_chip_info_tbl[BQ24296] },
23132326
{ "bq24297", (kernel_ulong_t)&bq24190_chip_info_tbl[BQ24297] },
@@ -2319,6 +2332,7 @@ static const struct of_device_id bq24190_of_match[] = {
23192332
{ .compatible = "ti,bq24190", .data = &bq24190_chip_info_tbl[BQ24190] },
23202333
{ .compatible = "ti,bq24192", .data = &bq24190_chip_info_tbl[BQ24192] },
23212334
{ .compatible = "ti,bq24192i", .data = &bq24190_chip_info_tbl[BQ24192i] },
2335+
{ .compatible = "ti,bq24193", .data = &bq24190_chip_info_tbl[BQ24193] },
23222336
{ .compatible = "ti,bq24196", .data = &bq24190_chip_info_tbl[BQ24196] },
23232337
{ .compatible = "ti,bq24296", .data = &bq24190_chip_info_tbl[BQ24296] },
23242338
{ .compatible = "ti,bq24297", .data = &bq24190_chip_info_tbl[BQ24297] },

0 commit comments

Comments
 (0)