All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: linus.walleij@linaro.org, ian.campbell@citrix.com,
	rob.herring@calxeda.com, pawel.moll@arm.com,
	mark.rutland@arm.com, rob@landley.net, sameo@linux.intel.com,
	lee.jones@linaro.org, grant.likely@linaro.org,
	broonie@kernel.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	gg@slimlogic.co.uk, kishon@ti.com
Subject: Re: [PATCH V2 3/3] pinctrl: palmas: add pincontrol driver
Date: Mon, 05 Aug 2013 16:04:23 -0600	[thread overview]
Message-ID: <52002167.2050504@wwwdotorg.org> (raw)
In-Reply-To: <1375688014-6117-4-git-send-email-ldewangan@nvidia.com>

On 08/05/2013 01:33 AM, Laxman Dewangan wrote:
> TI Palmas series Power Management IC have multiple pins which can be
> configured for different functionality. This pins can be configured
> for different function. Also their properties like pull up/down,
> open drain enable/disable are configurable.
> 
> Add support for pincontrol driver Palmas series device like TPS65913,
> TPS80036. The driver supports to be register from DT only.

> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt

> +Required subnode-properties:
> +- pinctrl-pins: An array of strings. Each string contains the name of a pin.
> +  Valid values for these names are listed below.

s/pinctrl-pins/pins/ I think.

> +Optional subnode-properties:
> +- pinctrl-function:  string containing the name of the function to mux to the
> +  pin. Valid values for function names are listed below. Please refer the
> +  datasheet of the device to determine which are valid for each pin.

s/pinctrl-function/function/ I think.

> +The properties "pinctrl-pins" and "pinctrl-function" ara generic pincontrol
> +properties and described in pinctrl-bindings.txt.
> +
> +Following are other valid propeties for Palams pinctrol dt node which are
> +described in pinctrl-bindings.txt.
> +bias-disable, bias-pull-up, bias-pull-down, bias-pull-pin-default
> +drive-open-drain: Value will represent the open drain to be enable/disable
> + of pins.
> +    0: Disable, 1: Enable.

I'd be tempted to replace everything I quoted above with something a
little simpler to avoid any redundancy with pinctrl-bindings.txt:

==========
This binding uses the following generic properties as defined in
pinctrl-bindings.txt:

Required: pins
Options: function, bias-disable, bias-pull-up, bias-pull-down,
bias-pin-default, drive-open-drain.
==========

> +Note that many of these properties are only valid for certain specific pins.
> +See the Palmas device datasheet for complete details regarding which pins
> +support which functionality.
> +
> +Valid values for pin names are:
> +pins: gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, gpio9,

"pins:" is redundant here.

> +	gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, vac, powergood,
> +	nreswarm, pwrdown, gpadc_start, reset_in, nsleep, enable1, enable2,
> +	int.
> +
> +function: gpio, led, pwm, regen, sysen, clk32kgaudio, id, vbus_det, chrg_det,

I think you would want to structure this list the same as the pins list,
so prefix it with "Valid values for function names are:", and delete
"function:" at the start of the list.

> +There is 4 special function: opt0, opt1, opt2 and opt3. If this functions are

s/this/any of these/

> +selected then directly pins register will be written with 0, 1, 2 and 3

s/and/or/

> +repectively if it is valid for that pins.

s/repectively/respectively/

Hmm. I'm not sure I like mixing those functions with the more "semantic"
function names above. I'd prefer the driver support either the semantic
names or the raw names, but not both. It's not really a big deal though
I suppose.

I didn't review the code, just the binding.

      parent reply	other threads:[~2013-08-05 22:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05  7:33 [PATCH V2 0/3] pinctrl: add pincontrol driver for palmas device Laxman Dewangan
2013-08-05  7:33 ` Laxman Dewangan
2013-08-05  7:33 ` [PATCH V2 1/3] pinctrl: add utility functions for add map/configs Laxman Dewangan
2013-08-05  7:33   ` Laxman Dewangan
2013-08-05 21:37   ` Stephen Warren
2013-08-06 12:25     ` Laxman Dewangan
2013-08-05  7:33 ` [PATCH V2 2/3] pinctrl: pinconf-generic: add generic APIs for mapping pinctrl node Laxman Dewangan
2013-08-05  7:33   ` Laxman Dewangan
2013-08-05 21:42   ` Stephen Warren
2013-08-05  7:33 ` [PATCH V2 3/3] pinctrl: palmas: add pincontrol driver Laxman Dewangan
2013-08-05  7:33   ` Laxman Dewangan
2013-08-05  7:44   ` Lee Jones
2013-08-05 22:04   ` Stephen Warren [this message]

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=52002167.2050504@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gg@slimlogic.co.uk \
    --cc=grant.likely@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=kishon@ti.com \
    --cc=ldewangan@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@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=sameo@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.