SUPERH platform development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC 07/12] sh-pfc: Configure pins as GPIOs at request time when handled externally
Date: Wed, 13 Mar 2013 17:47:32 +0000	[thread overview]
Message-ID: <2458629.jisx88ilWO@avalon> (raw)
In-Reply-To: <1362941928-18115-8-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

Hi Linus,

On Wednesday 13 March 2013 18:40:07 Linus Walleij wrote:
> On Sun, Mar 10, 2013 at 7:58 PM, Laurent Pinchart wrote:
> > When a GPIO is handled by a separate driver the pinmux
> > gpio_set_direction() handler won't be called. The pin mux type then need
> > to be configured to GPIO at request time.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> 
> (...)
> 
> > @@ -180,6 +180,17 @@ static int sh_pfc_gpio_request_enable(struct
> > pinctrl_dev *pctldev,
> >                 goto done;
> >         }
> > 
> > +       if (pfc->gpio = NULL) {
> > +               /* If GPIOs are handled externally the pin mux type need
> > to be
> > +                * set to GPIO here.
> > +                */
> 
> So using an external GPIO is the *only* reason why pfc->gpio would be
> NULL?

That's correct. pfc->gpio points to the GPIO SoC and must always be supplied 
when the PFC driver handles GPIOs.

> Anyway you can write that if (!pfc->gpio) then...

OK.

-- 
Regards,

Laurent Pinchart


      parent reply	other threads:[~2013-03-13 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 18:58 [PATCH/RFC 07/12] sh-pfc: Configure pins as GPIOs at request time when handled externally Laurent Pinchart
2013-03-13 17:40 ` Linus Walleij
2013-03-13 17:47 ` Laurent Pinchart [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=2458629.jisx88ilWO@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.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