[Top] [All Lists]

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

To: John Crispin <>
Subject: Re: [PATCH V2 1/6] MIPS: lantiq: remove redunant ltq_gpio_request() declaration and add device parameter
From: Sergei Shtylyov <>
Date: Fri, 24 Feb 2012 14:35:11 +0400
Authentication-results:; spf=pass ( domain of designates as permitted sender)
Cc: Ralf Baechle <>,
In-reply-to: <>
References: <>
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

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 
so that managed gpios can work.

Signed-off-by: John Crispin<>

diff --git a/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>