From: David Brownell <david-b@pacbell.net>
To: Laurent Pinchart <laurentp@cse-semaphore.com>
Cc: linuxppc-dev@ozlabs.org, avorontsov@ru.mvista.com,
"Greg Kroah-Hartman" <greg@kroah.com>,
linux-usb@vger.kernel.org, Li Yang <leoli@freescale.com>,
linux-kernel@vger.kernel.org, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH 0/3] Patches to support QE USB Host Controller
Date: Wed, 24 Sep 2008 13:04:24 -0700 [thread overview]
Message-ID: <200809241304.24878.david-b@pacbell.net> (raw)
In-Reply-To: <200808141415.42109.laurentp@cse-semaphore.com>
On Thursday 14 August 2008, Laurent Pinchart wrote:
>
> > David, could you bear with gpio_to_chip() exported function, just as
> > a stopgap for a proper api?
>
> I need gpio_to_chip() (or another 'proper API') as well for RTS/CTS
> based flow control in the CPM/CPM2 UART driver.
I'l still say "proper". This should be straightforward; along
the lines of
struct qe_pin {
struct ... *qe_ports; /* includes gpio_chip */
unsigned offset;
};
And instead of having the driver look up a "gpio" for such
non-GPIO usage, have it call something that sets up a qe_pin.
All that infrastructure exists already...
Then drivers can use calls which mux the pin into its "normal"
mode (QE function of some kind), or into its "gpio" mode.
The gpio number would be gpio_chip->base + offset, and the
gpio_chip is visible -- in a fully typesafe manner! -- from
the qe_ports structure.
No type-unsafe interfaces. No confusion between roles of a
given pin. No hidden assumption there's only one kind of GPIO
(backed by QE ports). And ... no need to change any core
structural assumptions of the GPIO framework.
- Dave
next prev parent reply other threads:[~2008-09-24 20:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 16:17 [PATCH 0/3] Patches to support QE USB Host Controller Anton Vorontsov
2008-08-08 16:18 ` [PATCH 1/3] gpiolib: make gpio_to_chip() public Anton Vorontsov
2008-08-14 14:04 ` Laurent Pinchart
2008-08-14 14:14 ` Anton Vorontsov
2008-08-14 14:45 ` Laurent Pinchart
2008-08-14 15:10 ` Anton Vorontsov
2008-08-18 13:58 ` Laurent Pinchart
2008-08-18 14:33 ` Anton Vorontsov
2008-08-18 14:44 ` Laurent Pinchart
2008-08-18 15:33 ` Anton Vorontsov
2008-08-19 9:26 ` Laurent Pinchart
2008-08-19 14:50 ` Anton Vorontsov
2008-08-08 16:18 ` [PATCH 2/3] powerpc/qe: new call to revert a gpio to a dedicated function Anton Vorontsov
2008-08-08 16:18 ` [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller Anton Vorontsov
2008-08-08 23:26 ` [PATCH 0/3] Patches to support QE " Greg KH
2008-08-26 15:49 ` Anton Vorontsov
2008-08-14 12:15 ` Laurent Pinchart
2008-09-24 20:04 ` David Brownell [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-18 15:16 Anton Vorontsov
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=200809241304.24878.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=avorontsov@ru.mvista.com \
--cc=greg@kroah.com \
--cc=laurentp@cse-semaphore.com \
--cc=leoli@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=timur@freescale.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