| To: | Phil Sutter <n0-1@freewrt.org> |
|---|---|
| Subject: | Re: [PATCH] provide functions for gpio configuration |
| From: | Florian Fainelli <florian@openwrt.org> |
| Date: | Wed, 29 Oct 2008 21:07:42 +0100 |
| Cc: | Ralf Baechle <ralf@linux-mips.org>, Linux-Mips List <linux-mips@linux-mips.org> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id:sender; bh=ZdD7KOYm4oH8XSs3j+Y/Jl+JmtSkjenbt/Uvlvjbp54=; b=THPIkUbHD7jU0kN8uQzhAMJomfqufXuwjMnhhix3+d2vJ4262Npl/XJR1XevKGaXc8 4EwuFF3K5ATH20ONbPjEXyzCtxrlFFl5nBgu3V0WRpsC5LVrSGDFl081ca3QDOcTydcj pmCd4+Vhc3jFM/dHh9FsWuzhWXfqH3smjOGlg= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id:sender; b=ZIoS6Kir0HV+fttgwdD2lKUTtnojQEuRuflWErZ1LI4SWA5Tzb9X/JdbXfZLwJD0s+ Jc+dGlvaOXM8ewuUuhiC6A0sS8xkrI8x8dymdU8ro4mEa/wLBVjaPp63nNEDLoI9LCvH F1+H/mKx2pMIi4w4GffZ0NwzEORmfBFwA7tec= |
| In-reply-to: | <1225310409-4440-1-git-send-email-n0-1@freewrt.org> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <1225310409-4440-1-git-send-email-n0-1@freewrt.org> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | KMail/1.9.9 |
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
-------------------------------
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] provide functions for gpio configuration, Phil Sutter |
|---|---|
| Next by Date: | Re: [PATCH 06/36] Add Cavium OCTEON processor CSR definitions, Chad Reese |
| Previous by Thread: | [PATCH] provide functions for gpio configuration, Phil Sutter |
| Next by Thread: | Re: [PATCH] provide functions for gpio configuration, Phil Sutter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |