lkml.org 
[lkml]   [2016]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/6] pwm-regulator: Support for enable GPIO
Date
Enable the pwm-regulator driver to make use of an enable GPIO.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/regulator/pwm-regulator.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index ab3cc0235843..8e5e4e744c51 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -273,6 +273,11 @@ static int pwm_regulator_probe(struct platform_device *pdev)
if (!init_data)
return -ENOMEM;

+ ret = of_get_regulator_gpio_config(&pdev->dev, np, "enable-gpio",
+ &config);
+ if (ret)
+ return ret;
+
config.of_node = np;
config.dev = &pdev->dev;
config.driver_data = drvdata;
--
2.8.3
\
 
 \ /
  Last update: 2016-06-22 11:01    [W:0.085 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site