mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot@nvidia.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<gnurou@gmail.com>, Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH 5/6] pwm-regulator: Support for enable GPIO
Date: Wed, 22 Jun 2016 17:25:57 +0900	[thread overview]
Message-ID: <20160622082558.20935-6-acourbot@nvidia.com> (raw)
In-Reply-To: <20160622082558.20935-1-acourbot@nvidia.com>

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

  parent reply	other threads:[~2016-06-22  8:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22  8:25 [PATCH 0/6] regulator: add enable GPIO property to pwm-regulator Alexandre Courbot
2016-06-22  8:25 ` [PATCH 1/6] regulator: core: Allow simultaneous use of enable op and GPIO Alexandre Courbot
2016-06-22 10:34   ` Mark Brown
2016-06-23  1:10     ` Alexandre Courbot
2016-06-23  5:29       ` Alexandre Courbot
2016-06-23 10:01         ` Mark Brown
2016-06-22  8:25 ` [PATCH 2/6] regulator: of: Add enable GPIO configuration function Alexandre Courbot
2016-06-22 10:35   ` Mark Brown
2016-06-22  8:25 ` [PATCH 3/6] regulator: fixed: Use of_get_regulator_gpio_config Alexandre Courbot
2016-06-22  8:25 ` [PATCH 4/6] regulator: gpio: " Alexandre Courbot
2016-06-22  8:25 ` Alexandre Courbot [this message]
2016-06-22  8:25 ` [PATCH 6/6] dt-bindings: pwm-regulator: Document enable-gpio property Alexandre Courbot
2016-06-22 10:36   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160622082558.20935-6-acourbot@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome