hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/power/supply/bq27xxx_battery_i2c.c
....@@ -1,17 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * BQ27xxx battery monitor I2C driver
34 *
4
- * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
5
+ * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/
56 * Andrew F. Davis <afd@ti.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
10
- *
11
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12
- * kind, whether express or implied; without even the implied warranty
13
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
157 */
168
179 #include <linux/i2c.h>
....@@ -187,7 +179,7 @@
187179 i2c_set_clientdata(client, di);
188180
189181 if (client->irq) {
190
- ret = devm_request_threaded_irq(&client->dev, client->irq,
182
+ ret = request_threaded_irq(client->irq,
191183 NULL, bq27xxx_battery_irq_handler_thread,
192184 IRQF_ONESHOT,
193185 di->name, di);
....@@ -217,6 +209,7 @@
217209 {
218210 struct bq27xxx_device_info *di = i2c_get_clientdata(client);
219211
212
+ free_irq(client->irq, di);
220213 bq27xxx_battery_teardown(di);
221214
222215 mutex_lock(&battery_mutex);
....@@ -248,11 +241,15 @@
248241 { "bq27546", BQ27546 },
249242 { "bq27742", BQ27742 },
250243 { "bq27545", BQ27545 },
244
+ { "bq27411", BQ27411 },
251245 { "bq27421", BQ27421 },
252246 { "bq27425", BQ27425 },
253247 { "bq27426", BQ27426 },
254248 { "bq27441", BQ27441 },
255249 { "bq27621", BQ27621 },
250
+ { "bq27z561", BQ27Z561 },
251
+ { "bq28z610", BQ28Z610 },
252
+ { "bq34z100", BQ34Z100 },
256253 {},
257254 };
258255 MODULE_DEVICE_TABLE(i2c, bq27xxx_i2c_id_table);
....@@ -280,11 +277,15 @@
280277 { .compatible = "ti,bq27546" },
281278 { .compatible = "ti,bq27742" },
282279 { .compatible = "ti,bq27545" },
280
+ { .compatible = "ti,bq27411" },
283281 { .compatible = "ti,bq27421" },
284282 { .compatible = "ti,bq27425" },
285283 { .compatible = "ti,bq27426" },
286284 { .compatible = "ti,bq27441" },
287285 { .compatible = "ti,bq27621" },
286
+ { .compatible = "ti,bq27z561" },
287
+ { .compatible = "ti,bq28z610" },
288
+ { .compatible = "ti,bq34z100" },
288289 {},
289290 };
290291 MODULE_DEVICE_TABLE(of, bq27xxx_battery_i2c_of_match_table);