Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1338954
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] power_supply: bq2415x_charger: Add of modalias and match table when CONFIG_OF is enabled |
| Date | 2016-02-21 19:50 +0100 |
| Message-ID | <r4HeW-1KO-27@gated-at.bofh.it> (permalink) |
| References | <r4GiS-12G-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
drivers/power/bq2415x_charger.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c
index b0863f4..73e2f0b 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,
--
1.7.9.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] Small fixes for Nokia N900 power supply drivers Pali Rohár <pali.rohar@gmail.com> - 2016-02-21 19:20 +0100 Re: [PATCH 3/6] power_supply: bq2415x_charger: Do not add acpi modalias when CONFIG_ACPI is not enabled Pavel Machek <pavel@ucw.cz> - 2016-02-21 19:20 +0100 Re: [PATCH 1/6] power_supply: isp1704_charger: Error messages when probe fail Pavel Machek <pavel@ucw.cz> - 2016-02-21 19:30 +0100 [PATCH 6/6] ARM: dts: n900: Rename isp1704 to isp1707 to match correct name Pali Rohár <pali.rohar@gmail.com> - 2016-02-21 19:30 +0100 [PATCH 5/6] power_supply: bq27xxx_battery: Add of modalias and match table when CONFIG_OF is enabled Pali Rohár <pali.rohar@gmail.com> - 2016-02-21 19:40 +0100 [PATCH 1/6] power_supply: isp1704_charger: Error messages when probe fail Pali Rohár <pali.rohar@gmail.com> - 2016-02-21 19:40 +0100 [PATCH 3/6] power_supply: bq2415x_charger: Do not add acpi modalias when CONFIG_ACPI is not enabled Pali Rohár <pali.rohar@gmail.com> - 2016-02-21 19:50 +0100 [PATCH 4/6] power_supply: bq2415x_charger: Add of modalias and match table when CONFIG_OF is enabled Pali Rohár <pali.rohar@gmail.com> - 2016-02-21 19:50 +0100 Re: [PATCH 0/6] Small fixes for Nokia N900 power supply drivers Sebastian Reichel <sre@kernel.org> - 2016-02-21 20:50 +0100
csiph-web