From: Florian Fainelli <florian@openwrt.org>
To: Phil Sutter <n0-1@freewrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Linux-Mips List <linux-mips@linux-mips.org>
Subject: Re: [PATCH] provide functions for gpio configuration
Date: Wed, 29 Oct 2008 21:07:42 +0100 [thread overview]
Message-ID: <200810292107.43818.florian@openwrt.org> (raw)
In-Reply-To: <1225310409-4440-1-git-send-email-n0-1@freewrt.org>
Hi Phil,
Le Wednesday 29 October 2008 21:00:09 Phil Sutter, vous avez écrit :
> As gpiolib doesn't support pin multiplexing, it provides no way to
> access the GPIOFUNC register. Also there is no support for setting
> interrupt status and level. These functions provide access to them and
> are needed by the CompactFlash driver.
Right, but we do have interrupt level and status fuctions, registered as
callbacks to an extended gpiochip structure. These two functions can remain
static to the gpio.c file since we should perform interrupt status and level
initialisation at gpiochip init time. Not sure which code you based your work
on, but linux-queue tree at linux-mips.org has such code.
>
> The function rb532_gpio_set_cfg is redundant with
> rb532_gpio_direction_{input,output} but was added for simplicity's sake.
> Maybe gpiolib support could be dropped completely as there are not many
> users of it.
Sticking with the gpiolib has two advantages to me :
- you can use gpio_set_value/get_value for other
- GPIO initialisation should be done right after gpiochip registering
I would be rather in favor of adding the other missing callbacks to the
rb532_gpio_chip and make them look like the standard get/set functions. Just
like what was done with the interrupt level and status functions.
--
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------
next prev parent reply other threads:[~2008-10-29 20:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 20:00 [PATCH] provide functions for gpio configuration Phil Sutter
2008-10-29 20:07 ` Florian Fainelli [this message]
2008-10-29 21:10 ` Phil Sutter
2008-10-30 17:13 ` Florian Fainelli
2008-10-30 17:47 ` Phil Sutter
2008-10-30 18:16 ` Florian Fainelli
2008-10-30 20:20 ` Phil Sutter
2008-10-30 20:26 ` Florian Fainelli
2008-10-31 0:25 ` [PATCH] add prototypes for the exported symbols Phil Sutter
2008-10-31 14:58 ` [PATCH] provide functions for gpio configuration Phil Sutter
2008-11-02 21:56 ` Sergei Shtylyov
2008-11-03 14:29 ` Phil Sutter
2008-11-03 14:30 ` [PATCH] MIPS: rb532: fix bit swapping in rb532_set_bit() Phil Sutter
2008-11-03 14:48 ` Atsushi Nemoto
2008-11-03 15:05 ` Phil Sutter
2008-11-11 23:09 ` Phil Sutter
2009-01-29 16:27 ` Ralf Baechle
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=200810292107.43818.florian@openwrt.org \
--to=florian@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=n0-1@freewrt.org \
--cc=ralf@linux-mips.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 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.