linux-mips
[Top] [All Lists]

Re: [PATCH V2 1/6] MIPS: lantiq: remove redunant ltq_gpio_request() decl

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH V2 1/6] MIPS: lantiq: remove redunant ltq_gpio_request() declaration and add device parameter
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Fri, 24 Feb 2012 14:35:11 +0400
Authentication-results: mr.google.com; spf=pass (google.com: domain of sshtylyov@mvista.com designates 10.204.152.208 as permitted sender) smtp.mail=sshtylyov@mvista.com
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <1330012913-13293-1-git-send-email-blogic@openwrt.org>
References: <1330012913-13293-1-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
Hello.

On 23-02-2012 20:01, John Crispin wrote:

3.2 introduced devm_request_gpio() to allow managed gpios.

The devres api requires a struct device pointer to work. Add a parameter to 
ltq_gpio_request()
so that managed gpios can work.

Signed-off-by: John Crispin<blogic@openwrt.org>
[...]

diff --git a/arch/mips/include/asm/mach-lantiq/lantiq.h 
b/arch/mips/include/asm/mach-lantiq/lantiq.h
index bf05854..d90eef3 100644
--- a/arch/mips/include/asm/mach-lantiq/lantiq.h
+++ b/arch/mips/include/asm/mach-lantiq/lantiq.h
@@ -39,6 +39,10 @@ extern unsigned int ltq_get_soc_type(void);
  /* spinlock all ebu i/o */
  extern spinlock_t ebu_lock;

+/* request a non-gpio and set the PIO config */
+extern int ltq_gpio_request(struct device *dev, unsigned int pin,
+               unsigned int mux, unsigned int dir, const char *name);
+

   Where are the call sites of this function? Shoudln't they be modified?

WBR, Sergei

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