Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65d687a7 authored by Greg Hackmann's avatar Greg Hackmann Committed by Sebastian Reichel
Browse files

power: goldfish_battery: add devicetree bindings



Add device tree bindings to the Goldfish virtual platform battery drivers.

Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
Signed-off-by: default avatarJin Qian <jinqian@android.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 5c0e09e0
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
Android Goldfish Battery

Android goldfish battery device generated by android emulator.

Required properties:

- compatible : should contain "google,goldfish-battery" to match emulator
- reg        : <registers mapping>
- interrupts : <interrupt mapping>

Example:

	goldfish_battery@9020000 {
		compatible = "google,goldfish-battery";
		reg = <0x9020000 0x1000>;
		interrupts = <0x3>;
	};
+8 −1
Original line number Diff line number Diff line
@@ -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);