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 0/6] regulator: add enable GPIO property to pwm-regulator
Date: Wed, 22 Jun 2016 17:25:52 +0900	[thread overview]
Message-ID: <20160622082558.20935-1-acourbot@nvidia.com> (raw)

This series adds the ability for the pwm-regulator driver to have an enable-gpio
property, a feature that is required for the VDD_GPU regulator of Jetson TX1.

Before doing that though, it goes through a few required changes/improvements
in the regulator framework.

Patch 1 allows the regulator core to use both an enable GPIO and an enable
callback for a given driver. This is required for our use-case since the PWM
also needs to be enabled/disabled in pwm-regulator regardless of whether we are
using an enable GPIO or not.

Patches 2-4 factorize the enable GPIO DT parsing code. With fixed and GPIO
regulators already using that feature, and PWM to do the same, it probably
makes sense to only have one function doing this. The parsing function supports
more properties than individual drivers require, but the DT binding is the
authority on which properties are valid, not the implementation.

Finally patches 5-6 add support for the enable GPIO in pwm-regulator and the
corresponding DT binding. The binding is kept minimal (active-high and
open-drain properties can be specified in the GPIO phandle) on purpose.

Alexandre Courbot (6):
  regulator: core: Allow simultaneous use of enable op and GPIO
  regulator: of: Add enable GPIO configuration function
  regulator: fixed: Use of_get_regulator_gpio_config
  regulator: gpio: Use of_get_regulator_gpio_config
  pwm-regulator: Support for enable GPIO
  dt-bindings: pwm-regulator: Document enable-gpio property

 .../bindings/regulator/pwm-regulator.txt           |  7 ++-
 drivers/regulator/core.c                           | 34 ++++++++------
 drivers/regulator/fixed.c                          | 52 +++++++++++-----------
 drivers/regulator/gpio-regulator.c                 | 47 ++++++++++---------
 drivers/regulator/of_regulator.c                   | 52 ++++++++++++++++++++++
 drivers/regulator/pwm-regulator.c                  |  5 +++
 include/linux/regulator/of_regulator.h             | 14 ++++++
 7 files changed, 149 insertions(+), 62 deletions(-)

-- 
2.8.3

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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22  8:25 Alexandre Courbot [this message]
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 ` [PATCH 5/6] pwm-regulator: Support for enable GPIO Alexandre Courbot
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-1-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