public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: "Magnus Damm" <magnus.damm@gmail.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2.6.27-rc7] gpiolib: request/free hooks
Date: Mon, 29 Sep 2008 10:21:29 -0700	[thread overview]
Message-ID: <200809291021.30655.david-b@pacbell.net> (raw)
In-Reply-To: <aec7e5c30809282048x3d9a201j12303091e9d93a49@mail.gmail.com>

On Sunday 28 September 2008, Magnus Damm wrote:
> Hm, sounds like you prefer to keep pinmuxing and GPIO code separated?

Yep.

> > If you do that, be ready to provide a pinmux-only interface
> > at some point when this "piggybacking" breaks something...
> 
> In the SuperH case GPIO pin direction selection is done in the same
> way as selecting pin function. So in and out directions can be seen as
> two pin functions. And since we want to support GPIO pin direction we
> may as well support setting pin functions as well.
> 
> But maybe there are better ways to integrate it, I'm not sure.

Just don't expect the GPIO framework to address the problem of
how to configure one of those pins for a non-GPIO function.

Such pinmux problems deserve different programming interfaces.

\
> > Yeah.  Better to test-and-set the flag and then request, and backout
> > if it fails, than the other way.  Just who wrote that crap in the
> > first place?  Sigh.  (Notice it's done that way already in the code
> > path handling implicit requesting ... )
> 
> Sounds good.
> 
> > I'll send an updated patch along soonish.
> 
> Thank you!

... after I come up with a happy fix for the locking goofs;
those new methods may not be called under spinlock protection.

- Dave

  reply	other threads:[~2008-09-29 17:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24 22:08 [patch 2.6.27-rc7] gpiolib: request/free hooks David Brownell
2008-09-27 15:00 ` Magnus Damm
2008-09-27 18:29   ` David Brownell
2008-09-29  3:48     ` Magnus Damm
2008-09-29 17:21       ` David Brownell [this message]
2008-10-06  4:57         ` David Brownell

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=200809291021.30655.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox