linux-mips
[Top] [All Lists]

Re: [PATCH v2 3/3] MIPS: BCM47xx: rewrite GPIO handling and use gpiolib

To: Hauke Mehrtens <hauke@hauke-m.de>
Subject: Re: [PATCH v2 3/3] MIPS: BCM47xx: rewrite GPIO handling and use gpiolib
From: John Crispin <john@phrozen.org>
Date: Thu, 16 Aug 2012 21:35:12 +0200
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org, linux-wireless@vger.kernel.org
In-reply-to: <1345132801-8430-4-git-send-email-hauke@hauke-m.de>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1345132801-8430-1-git-send-email-hauke@hauke-m.de> <1345132801-8430-4-git-send-email-hauke@hauke-m.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16
On 16/08/12 18:00, Hauke Mehrtens wrote:
> int gpio_get_value(unsigned gpio)
> +{
> +     if (gpio < bcm47xx_gpio_count)
> +             return bcm47xx_gpio_in(1 << gpio);
> +
> +     return __gpio_get_value(gpio);
> +}
> +EXPORT_SYMBOL(gpio_get_value);

Hi,

You are using a gpio_chip. simply doing this

#define gpio_get_value __gpio_get_value

inside your arch/mips/include/asm/mach-bcm47xx/gpio.h will be enough.
__gpio_get_value() will then automatically find and use
bcm47xx_gpio_get_value() via the gpio_chip.

John

<Prev in Thread] Current Thread [Next in Thread>