summaryrefslogtreecommitdiffstats
path: root/drivers/power/bq27xxx_battery_i2c.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 12:50:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 12:50:55 -0700
commit9cc984e4bc089cd21b715b92ffe2d2bda0bb1d1a (patch)
treee653d8f15b91321604a5f3052bfb568d7aa4b6b0 /drivers/power/bq27xxx_battery_i2c.c
parentb5b131c7473e17275debcdf1c226f452dc3876ed (diff)
parent0df6e32b0e36710fe989095241833e09dac3e41d (diff)
downloadop-kernel-dev-9cc984e4bc089cd21b715b92ffe2d2bda0bb1d1a.zip
op-kernel-dev-9cc984e4bc089cd21b715b92ffe2d2bda0bb1d1a.tar.gz
Merge tag 'for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset changes from Sebastian Reichel: - add types for USB Type C and PD chargers - add act8945a charger driver - add ACPI/DT bindings for goldfish-battery - add support for versatile reset controller - misc fixes * tag 'for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (24 commits) power: pm2301-charger: use __maybe_unused to hide pm functions power: ipaq-micro-battery: use __maybe_unused to hide pm functions power_supply: 88pm860x_charger: do not pass NULL to power_supply_put jz4740-battery: Correct voltage change check power_supply: lp8788-charger: initialize boolean 'found' goldfish: Enable ACPI-based enumeration for goldfish battery power: goldfish_battery: add devicetree bindings power: act8945a: add charger driver for ACT8945A power: add documentation for ACT8945A's charger DT bindings ARM: dts: n900: Rename isp1704 to isp1707 to match correct name power_supply: bq27xxx_battery: Add of modalias and match table when CONFIG_OF is enabled power_supply: bq2415x_charger: Add of modalias and match table when CONFIG_OF is enabled power_supply: bq2415x_charger: Do not add acpi modalias when CONFIG_ACPI is not enabled power_supply: isp1704_charger: Add compatible of match for nxp,isp1707 power_supply: isp1704_charger: Error messages when probe fail power_supply: Add types for USB Type C and PD chargers power: bq24735-charger: add 'ti,external-control' option power: bq24735-charger: document 'ti,external-control' option power: bq24735-charger: fix failed i2c with ac-detect power: reset: Fix dependencies for !HAS_IOMEM archs ...
Diffstat (limited to 'drivers/power/bq27xxx_battery_i2c.c')
-rw-r--r--drivers/power/bq27xxx_battery_i2c.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/power/bq27xxx_battery_i2c.c b/drivers/power/bq27xxx_battery_i2c.c
index 8eafc6f..b8f8d3a 100644
--- a/drivers/power/bq27xxx_battery_i2c.c
+++ b/drivers/power/bq27xxx_battery_i2c.c
@@ -166,9 +166,33 @@ static const struct i2c_device_id bq27xxx_i2c_id_table[] = {
};
MODULE_DEVICE_TABLE(i2c, bq27xxx_i2c_id_table);
+#ifdef CONFIG_OF
+static const struct of_device_id bq27xxx_battery_i2c_of_match_table[] = {
+ { .compatible = "ti,bq27200" },
+ { .compatible = "ti,bq27210" },
+ { .compatible = "ti,bq27500" },
+ { .compatible = "ti,bq27510" },
+ { .compatible = "ti,bq27520" },
+ { .compatible = "ti,bq27530" },
+ { .compatible = "ti,bq27531" },
+ { .compatible = "ti,bq27541" },
+ { .compatible = "ti,bq27542" },
+ { .compatible = "ti,bq27546" },
+ { .compatible = "ti,bq27742" },
+ { .compatible = "ti,bq27545" },
+ { .compatible = "ti,bq27421" },
+ { .compatible = "ti,bq27425" },
+ { .compatible = "ti,bq27441" },
+ { .compatible = "ti,bq27621" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, bq27xxx_battery_i2c_of_match_table);
+#endif
+
static struct i2c_driver bq27xxx_battery_i2c_driver = {
.driver = {
.name = "bq27xxx-battery",
+ .of_match_table = of_match_ptr(bq27xxx_battery_i2c_of_match_table),
},
.probe = bq27xxx_battery_i2c_probe,
.remove = bq27xxx_battery_i2c_remove,
OpenPOWER on IntegriCloud