summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2016-02-21 12:28:21 +0100
committerSebastian Reichel <sre@kernel.org>2016-02-21 20:25:49 +0100
commit523e5501411dadf9593fa850344b801e95095720 (patch)
tree098952523fc940cf862022d1ab24f1dbff04ca78 /drivers/power
parentec3d7d08c2f8ad09897096d74cdbc6fa6ba89bce (diff)
power_supply: bq2415x_charger: Add of modalias and match table when CONFIG_OF is enabled
Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/bq2415x_charger.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c
index b0863f4bef6f..73e2f0b79dd4 100644
--- a/drivers/power/bq2415x_charger.c
+++ b/drivers/power/bq2415x_charger.c
@@ -1779,9 +1779,29 @@ static const struct acpi_device_id bq2415x_i2c_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, bq2415x_i2c_acpi_match);
#endif
+#ifdef CONFIG_OF
+static const struct of_device_id bq2415x_of_match_table[] = {
+ { .compatible = "ti,bq24150" },
+ { .compatible = "ti,bq24150a" },
+ { .compatible = "ti,bq24151" },
+ { .compatible = "ti,bq24151a" },
+ { .compatible = "ti,bq24152" },
+ { .compatible = "ti,bq24153" },
+ { .compatible = "ti,bq24153a" },
+ { .compatible = "ti,bq24155" },
+ { .compatible = "ti,bq24156" },
+ { .compatible = "ti,bq24156a" },
+ { .compatible = "ti,bq24157s" },
+ { .compatible = "ti,bq24158" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, bq2415x_of_match_table);
+#endif
+
static struct i2c_driver bq2415x_driver = {
.driver = {
.name = "bq2415x-charger",
+ .of_match_table = of_match_ptr(bq2415x_of_match_table),
.acpi_match_table = ACPI_PTR(bq2415x_i2c_acpi_match),
},
.probe = bq2415x_probe,