linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: iivanov@mm-sol.com (Ivan T. Ivanov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 7/7] pinctrl: qcom-spmi-gpio: Migrate to pinconf-generic
Date: Thu, 04 Dec 2014 11:30:58 +0200	[thread overview]
Message-ID: <1417685458.22963.1.camel@mm-sol.com> (raw)
In-Reply-To: <d3d1b263bf6242aa9a1a0876be455cce@BN1BFFO11FD021.protection.gbl>


On Wed, 2014-12-03 at 09:38 -0800, S?ren Brinkmann wrote:
> On Wed, 2014-12-03 at 03:03PM +0200, Ivan T. Ivanov wrote:
> > On Thu, 2014-11-27 at 17:26 -0800, Soren Brinkmann wrote:
> > > Instead of the driver caring about implementation details like device
> > > tree, just provide information about driver specific pinconf parameters
> > > to pinconf-generic which takes care of parsing the DT.
> > > 
> > > Signed-off-by: Soren Brinkmann brinkmann at xilinx.com>
> > > ---
> > > This is compile tested only. So, it's likely that it needs more tweaking
> > > to make it actually work on HW. But it illustrates the potential
> > > benefits of the pinconf-generic changes in this series.
> > > ---
> > >  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 125 +++----------------------------
> > >  1 file changed, 11 insertions(+), 114 deletions(-)
> > > 
> > > diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-
> > > gpio.c
> > > index b863b5080890..2db85e53ef73 100644
> > > --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> > > +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> > > @@ -131,14 +131,14 @@ struct pmic_gpio_state {
> > >         struct gpio_chip chip;
> > >  };
> > > 
> > > -struct pmic_gpio_bindings {
> > > -       const char*property;
> > > -       unsigned      param;
> > > +static const struct pinconf_generic_dt_params pmic_gpio_bindings[] = {
> > > +       {"qcom,pull-up-strength",PMIC_GPIO_CONF_PULL_UP,0},
> > > +       {"qcom,drive-strength",PMIC_GPIO_CONF_STRENGTH,0},
> > >  };
> > > 
> > > -static struct pmic_gpio_bindings pmic_gpio_bindings[] = {
> > > -       {"qcom,pull-up-strength",PMIC_GPIO_CONF_PULL_UP},
> > > -       {"qcom,drive-strength",PMIC_GPIO_CONF_STRENGTH},
> > > +static const struct pin_config_item pmic_conf_items[] = {
> > > +       PCONFDUMP(PMIC_GPIO_CONF_PULL_UP,  "pull-up-strength", NULL, true),
> > 
> > s/pull-up-strength/qcom,pull-up-strength/
> 
> This is used for the debugfs output. I don't think you want the qcom
> prefix here, do you?

Then at lest lets make it "pull up strength".

> 
> > > +       PCONFDUMP(PMIC_GPIO_CONF_STRENGTH, "drive-strength", NULL, true),
> > >  };
> > > 
> > 
> > 
> > 
> > I am not happy that we have to define the same think two times.
> 
> It's not really the same thing. One is the actual DT binding the other
> how the property is displayed in debugfs. Two different things. It's how
> the core does it. That's not new.

This didn't make me more happy :-). Could both be merged?

Regards,
Ivan

  reply	other threads:[~2014-12-04  9:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28  1:26 [PATCH v2 0/7] Pinctrl support for Zynq Soren Brinkmann
2014-11-28  1:26 ` [PATCH v2 1/7] pinctrl: pinconf-generic: Infer map type from DT property Soren Brinkmann
2014-12-02 15:01   ` Linus Walleij
2014-12-03 23:04     ` Sören Brinkmann
2014-11-28  1:26 ` [PATCH v2 2/7] pinctrl: pinconf-generic: Allow driver to specify DT params Soren Brinkmann
2014-11-28  1:26 ` [PATCH v2 3/7] pinctrl: zynq: Document DT binding Soren Brinkmann
2014-11-28  1:26 ` [PATCH v2 4/7] pinctrl: Add driver for Zynq Soren Brinkmann
2014-11-28  1:26 ` [PATCH v2 5/7] ARM: zynq: Enable pinctrl Soren Brinkmann
2014-11-28  1:26 ` [PATCH v2 6/7] ARM: zynq: DT: Add pinctrl information Soren Brinkmann
2014-11-28  1:26 ` [PATCH v2 7/7] pinctrl: qcom-spmi-gpio: Migrate to pinconf-generic Soren Brinkmann
2014-12-03 13:03   ` Ivan T. Ivanov
2014-12-03 17:38     ` Sören Brinkmann
2014-12-04  9:30       ` Ivan T. Ivanov [this message]
2014-12-04 17:21         ` Sören Brinkmann
2014-12-05  7:59   ` Ivan T. Ivanov
2014-12-05 17:08     ` Sören Brinkmann
2014-12-05 17:37       ` Sören Brinkmann
2014-12-12 16:21       ` Sören Brinkmann
2014-12-03 12:51 ` [PATCH v2 0/7] Pinctrl support for Zynq Ivan T. Ivanov
2014-12-03 17:59   ` Sören Brinkmann
2014-12-04  9:44 ` Linus Walleij
2014-12-04 17:28   ` Sören Brinkmann

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=1417685458.22963.1.camel@mm-sol.com \
    --to=iivanov@mm-sol.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).