[PATCH v6 03/10] regulator: fixed: add device binding for platform device

From: Lu Baolu
Date: Mon Apr 25 2016 - 04:09:21 EST


This is needed to handle the GPIO connected USB vcc pin found on
Intel Baytrail devices.

Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
---
drivers/regulator/fixed.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index ff62d69..e6f376f 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -209,12 +209,19 @@ static const struct of_device_id fixed_of_match[] = {
MODULE_DEVICE_TABLE(of, fixed_of_match);
#endif

+static const struct platform_device_id fixed_platform_ids[] = {
+ { .name = "reg-fixed-voltage", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, fixed_platform_ids);
+
static struct platform_driver regulator_fixed_voltage_driver = {
.probe = reg_fixed_voltage_probe,
.driver = {
.name = "reg-fixed-voltage",
.of_match_table = of_match_ptr(fixed_of_match),
},
+ .id_table = fixed_platform_ids,
};

static int __init regulator_fixed_voltage_init(void)
--
2.1.4