Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Greg Hackmann and committed by
Sebastian Reichel
65d687a7 5c0e09e0

+25 -1
+17
Documentation/devicetree/bindings/goldfish/battery.txt
··· 1 + Android Goldfish Battery 2 + 3 + Android goldfish battery device generated by android emulator. 4 + 5 + Required properties: 6 + 7 + - compatible : should contain "google,goldfish-battery" to match emulator 8 + - reg : <registers mapping> 9 + - interrupts : <interrupt mapping> 10 + 11 + Example: 12 + 13 + goldfish_battery@9020000 { 14 + compatible = "google,goldfish-battery"; 15 + reg = <0x9020000 0x1000>; 16 + interrupts = <0x3>; 17 + };
+8 -1
drivers/power/goldfish_battery.c
··· 227 227 return 0; 228 228 } 229 229 230 + static const struct of_device_id goldfish_battery_of_match[] = { 231 + { .compatible = "google,goldfish-battery", }, 232 + {}, 233 + }; 234 + MODULE_DEVICE_TABLE(of, goldfish_battery_of_match); 235 + 230 236 static struct platform_driver goldfish_battery_device = { 231 237 .probe = goldfish_battery_probe, 232 238 .remove = goldfish_battery_remove, 233 239 .driver = { 234 - .name = "goldfish-battery" 240 + .name = "goldfish-battery", 241 + .of_match_table = goldfish_battery_of_match, 235 242 } 236 243 }; 237 244 module_platform_driver(goldfish_battery_device);