mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@linaro.org>
To: Laxman Dewangan <ldewangan@nvidia.com>, lee.jones@linaro.org
Cc: sameo@linux.intel.com, broonie@kernel.org,
	linus.walleij@linaro.org, akpm@linux-foundation.org,
	devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	rtc-linux@googlegroups.com, rob.herring@calxeda.com,
	mark.rutland@arm.com, pawel.moll@arm.com, swarren@wwwdotorg.org,
	rob@landley.net, ijc+devicetree@hellion.org.uk,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Florian Lobmaier <florian.lobmaier@ams.com>
Subject: Re: [PATCH V5 REPOST] mfd: add support for ams AS3722 PMIC
Date: Fri, 25 Oct 2013 21:07:54 +0100	[thread overview]
Message-ID: <20131025200754.D222AC4058E@trevor.secretlab.ca> (raw)
In-Reply-To: <1382427526-2390-1-git-send-email-ldewangan@nvidia.com>

On Tue, 22 Oct 2013 13:08:46 +0530, Laxman Dewangan <ldewangan@nvidia.com> wrote:
> The ams AS3722 is a compact system PMU suitable for mobile phones,
> tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down
> controller, 11 LDOs, RTC, automatic battery, temperature and
> over-current monitoring, 8 GPIOs, ADC and a watchdog.
> 
> Add MFD core driver for the AS3722 to support core functionality.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> Signed-off-by: Florian Lobmaier <florian.lobmaier@ams.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Stephen Warren <swarren@nvidia.com>
> ---
> Changes from V1:
> - Remove compatible string from DT for subnode.
> - Nit cleanups in driver and use module_i2c_driver
> 
> Changes from V2:
> - Change DT file to reflect the changes in gpio/pincntrl driver.
>   Now there is no extra subnode.
> 
> Changes from V3:
> - Combine DT of pincontrol and regulator to mfd.
> - Nits cleanups.
> - AMS to ams.
> 
> Changes from V4:
> - Rephrased the dt binding documents.
> - Added dt-binding header for DTS file.
> - Fix some of indention issue in dt documents.
> 
> Reposting V5 as per Lee's.
> 
>  Documentation/devicetree/bindings/mfd/as3722.txt |  194 ++++++++++
>  drivers/mfd/Kconfig                              |   12 +
>  drivers/mfd/Makefile                             |    1 +
>  drivers/mfd/as3722.c                             |  449 ++++++++++++++++++++++
>  include/dt-bindings/mfd/as3722.h                 |   52 +++
>  include/linux/mfd/as3722.h                       |  423 ++++++++++++++++++++
>  6 files changed, 1131 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/as3722.txt
>  create mode 100644 drivers/mfd/as3722.c
>  create mode 100644 include/dt-bindings/mfd/as3722.h
>  create mode 100644 include/linux/mfd/as3722.h
> 
> diff --git a/Documentation/devicetree/bindings/mfd/as3722.txt b/Documentation/devicetree/bindings/mfd/as3722.txt
> new file mode 100644
> index 0000000..fc2191e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/as3722.txt
> @@ -0,0 +1,194 @@
> +* ams AS3722 Power management IC.
> +
> +Required properties:
> +-------------------
> +- compatible: Must be "ams,as3722".
> +- reg: I2C device address.
> +- interrupt-controller: AS3722 has internal interrupt controller which takes the
> +  interrupt request from internal sub-blocks like RTC, regulators, GPIOs as well
> +  as external input.
> +- #interrupt-cells: Should be set to 2 for IRQ number and flags.
> +  The first cell is the IRQ number. IRQ numbers for different interrupt source
> +  of AS3722 are defined at dt-bindings/mfd/as3722.h
> +  The second cell is the flags, encoded as the trigger masks from binding document
> +	interrupts.txt, using dt-bindings/irq.
> +
> +Optional submodule and their properties:
> +=======================================
> +
> +Pinmux and GPIO:
> +===============
> +Device has 8 GPIO pins which can be configured as GPIO as well as the special IO
> +functions.
> +
> +Please refer to pinctrl-bindings.txt in this directory for details of the
> +common pinctrl bindings used by client devices, including the meaning of the
> +phrase "pin configuration node".
> +
> +Following are properties which is needed if GPIO and pinmux functionality
> +is required:
> +    Required properties:
> +    -------------------
> +	- gpio-controller: Marks the device node as a GPIO controller.
> +	- #gpio-cells: Number of GPIO cells. Refer to binding document
> +			gpio/gpio.txt
> +
> +    Optional properties:
> +    --------------------
> +	Following properties are require if pin control setting is required
> +	at boot.
> +	- pinctrl-names: A pinctrl state named "default" be defined, using the
> +		bindings in pinctrl/pinctrl-binding.txt.
> +	- pinctrl[0...n]: Properties to contain the phandle that refer to
> +		different nodes of pin control settings. These nodes represents
> +		the pin control setting of state 0 to state n. Each of these
> +		nodes contains different subnodes to represents some desired
> +		configuration for a list of pins. This configuration can
> +		include the mux function to select on those pin(s), and
> +		various pin configuration parameters, such as pull-up,
> +		open drain.
> +
> +		Each subnode have following properties:
> +		Required properties:
> +		    - pins: List of pins. Valid values of pins properties are:
> +				gpio0, gpio1, gpio2, gpio3, gpio4, gpio5,
> +				gpio6, gpio7
> +
> +		Optional properties:
> +			function, bias-disable, bias-pull-up, bias-pull-down,
> +			bias-high-impedance, drive-open-drain.
> +
> +			Valid values for function properties are:
> +				gpio, interrupt-out, gpio-in-interrupt,
> +				vsup-vbat-low-undebounce-out,
> +				vsup-vbat-low-debounce-out,
> +				voltage-in-standby, oc-pg-sd0, oc-pg-sd6,
> +				powergood-out, pwm-in, pwm-out, clk32k-out,
> +				watchdog-in, soft-reset-in
> +
> +Regulators:
> +===========
> +Device has multiple DCDC and LDOs. The node "regulators" is require if regulator
> +functionality is needed.
> +
> +Following are properties of regulator subnode.
> +
> +    Optional properties:
> +    -------------------
> +	The input supply of regulators are the optional properties on the
> +	regulator node. The input supply of these regulators are provided
> +	through following properties:
> +		vsup-sd2-supply: Input supply for SD2.
> +		vsup-sd3-supply: Input supply for SD3.
> +		vsup-sd4-supply: Input supply for SD4.
> +		vsup-sd5-supply: Input supply for SD5.
> +		vin-ldo0-supply: Input supply for LDO0.
> +		vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
> +		vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
> +		vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
> +		vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
> +		vin-ldo11-supply: Input supply for LDO11.

What is the data in these properties? The documentation isn't clear.

In principle, the binding looks okay to me.

g.


  parent reply	other threads:[~2013-10-25 22:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22  7:38 Laxman Dewangan
2013-10-22  8:40 ` Lee Jones
2013-10-25 20:07 ` Grant Likely [this message]
2013-10-26 16:19   ` Lee Jones
2013-10-27 13:49     ` Grant Likely
2014-06-06 15:28 ` Lee Jones
2014-06-09  7:10   ` Laxman Dewangan
2014-06-09 11:57   ` Linus Walleij

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=20131025200754.D222AC4058E@trevor.secretlab.ca \
    --to=grant.likely@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.lobmaier@ams.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=ldewangan@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.com \
    --cc=swarren@wwwdotorg.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

all inboxes | Powered by JetHome®