summaryrefslogtreecommitdiffstats
path: root/drivers/power/goldfish_battery.c
diff options
context:
space:
mode:
authorGreg Hackmann2016-02-26 19:45:30 +0100
committerSebastian Reichel2016-03-03 13:53:52 +0100
commit65d687a7b7d6f27e4306fe8cc8a1ca66a1a760f6 (patch)
treee07b339d1eaccea825a78dca2550445324380dd4 /drivers/power/goldfish_battery.c
parentpower: act8945a: add charger driver for ACT8945A (diff)
downloadkernel-qcow2-linux-65d687a7b7d6f27e4306fe8cc8a1ca66a1a760f6.tar.gz
kernel-qcow2-linux-65d687a7b7d6f27e4306fe8cc8a1ca66a1a760f6.tar.xz
kernel-qcow2-linux-65d687a7b7d6f27e4306fe8cc8a1ca66a1a760f6.zip
power: goldfish_battery: add devicetree bindings
Add device tree bindings to the Goldfish virtual platform battery drivers. Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Jin Qian <jinqian@android.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/goldfish_battery.c')
-rw-r--r--drivers/power/goldfish_battery.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/power/goldfish_battery.c b/drivers/power/goldfish_battery.c
index a50bb988c69a..7510796e190c 100644
--- a/drivers/power/goldfish_battery.c
+++ b/drivers/power/goldfish_battery.c
@@ -227,11 +227,18 @@ static int goldfish_battery_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id goldfish_battery_of_match[] = {
+ { .compatible = "google,goldfish-battery", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, goldfish_battery_of_match);
+
static struct platform_driver goldfish_battery_device = {
.probe = goldfish_battery_probe,
.remove = goldfish_battery_remove,
.driver = {
- .name = "goldfish-battery"
+ .name = "goldfish-battery",
+ .of_match_table = goldfish_battery_of_match,
}
};
module_platform_driver(goldfish_battery_device);