All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	linux-arm-msm@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Sven Eckelmann <sven.eckelmann@openmesh.com>,
	Andy Gross <andy.gross@linaro.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] pinctrl: msm: fix gpio-hog related boot issues
Date: Thu, 12 Apr 2018 21:05:59 +0200	[thread overview]
Message-ID: <3015969.TLpigVpPJ0@debian64> (raw)
In-Reply-To: <CACRpkdacDjzF=CR59by8Zd44wJD12Sr5FSTd=Ph_eSH2QYZudA@mail.gmail.com>

On Donnerstag, 12. April 2018 14:48:56 CEST Linus Walleij wrote:
> On Wed, Mar 28, 2018 at 8:07 PM, Christian Lamparter <chunkeey@gmail.com> wrote:
> 
> > -       ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), 0, 0, chip->ngpio);
> > -       if (ret) {
> > -               dev_err(pctrl->dev, "Failed to add pin range\n");
> > -               gpiochip_remove(&pctrl->chip);
> > -               return ret;
> > -       }
> 
> If you instead of deleteing this, just wrap it inside
> something like:
> 
> if (!of_property_read_bool(np, "gpio-ranges") {
>   (...)
> }
> 
> You will stay compatible with elder device trees, solving Björns
> issue. You will only be adding hogs to newer device trees with
> the ranges defined anyway.
> 
> Be genereous with comments in the code if you choose this
> approach so everyone realize what is going on.
Thank you for your insightful advice. I just sent out v4 which
goes the of_property_read_bool route. Let's wait and see what
kbuilt-bot has to say.

Best Regards,
Christian

WARNING: multiple messages have this Message-ID (diff)
From: chunkeey@gmail.com (Christian Lamparter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: msm: fix gpio-hog related boot issues
Date: Thu, 12 Apr 2018 21:05:59 +0200	[thread overview]
Message-ID: <3015969.TLpigVpPJ0@debian64> (raw)
In-Reply-To: <CACRpkdacDjzF=CR59by8Zd44wJD12Sr5FSTd=Ph_eSH2QYZudA@mail.gmail.com>

On Donnerstag, 12. April 2018 14:48:56 CEST Linus Walleij wrote:
> On Wed, Mar 28, 2018 at 8:07 PM, Christian Lamparter <chunkeey@gmail.com> wrote:
> 
> > -       ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), 0, 0, chip->ngpio);
> > -       if (ret) {
> > -               dev_err(pctrl->dev, "Failed to add pin range\n");
> > -               gpiochip_remove(&pctrl->chip);
> > -               return ret;
> > -       }
> 
> If you instead of deleteing this, just wrap it inside
> something like:
> 
> if (!of_property_read_bool(np, "gpio-ranges") {
>   (...)
> }
> 
> You will stay compatible with elder device trees, solving Bj?rns
> issue. You will only be adding hogs to newer device trees with
> the ranges defined anyway.
> 
> Be genereous with comments in the code if you choose this
> approach so everyone realize what is going on.
Thank you for your insightful advice. I just sent out v4 which
goes the of_property_read_bool route. Let's wait and see what
kbuilt-bot has to say.

Best Regards,
Christian

  reply	other threads:[~2018-04-12 19:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 18:07 [PATCH] pinctrl: msm: fix gpio-hog related boot issues Christian Lamparter
2018-03-28 18:07 ` Christian Lamparter
2018-03-29  0:27 ` Bjorn Andersson
2018-03-29  0:27   ` Bjorn Andersson
2018-03-29 12:23   ` Christian Lamparter
2018-03-29 12:23     ` Christian Lamparter
2018-03-29 14:05     ` Christian Lamparter
2018-03-29 14:05       ` Christian Lamparter
2018-04-12 12:48 ` Linus Walleij
2018-04-12 12:48   ` Linus Walleij
2018-04-12 19:05   ` Christian Lamparter [this message]
2018-04-12 19:05     ` Christian Lamparter

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=3015969.TLpigVpPJ0@debian64 \
    --to=chunkeey@gmail.com \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sven.eckelmann@openmesh.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.