All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
@ 2011-03-28 23:03 ` Ryan Mallon
  0 siblings, 0 replies; 10+ messages in thread
From: Ryan Mallon @ 2011-03-28 23:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hartley pointed out that the patch I posted to remove the irq internals
fiddling from ep93xx_gpio_dbg_show does not function as expected. It
will print [interrupt] beside all pins which are capable of being
interrupts, not just those which are currently configured as interrupts.

The best solution is just to remove the custom ep93xx gpio debugfs
function all together. The generic gpiolib one is good enough.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
---

diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index 34e071d..c74adf9 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
 	return 0;
 }
 
-static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
-{
-	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
-	u8 data_reg, data_dir_reg;
-	int gpio, i;
-
-	data_reg = __raw_readb(ep93xx_chip->data_reg);
-	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
-
-	gpio = ep93xx_chip->chip.base;
-	for (i = 0; i < chip->ngpio; i++, gpio++) {
-		int is_out = data_dir_reg & (1 << i);
-		int irq = gpio_to_irq(gpio);
-
-		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
-				chip->label, i, gpio,
-				gpiochip_is_requested(chip, i) ? : "",
-				is_out ? "out" : "in ",
-				(data_reg & (1<<  i)) ? "hi" : "lo",
-				(!is_out && irq>= 0) ? "(interrupt)" : "");
-	}
-}
-
 #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
 	{								\
 		.chip = {						\
@@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 			.direction_output = ep93xx_gpio_direction_output, \
 			.get		  = ep93xx_gpio_get,		\
 			.set		  = ep93xx_gpio_set,		\
-			.dbg_show	  = ep93xx_gpio_dbg_show,	\
 			.base		  = base_gpio,			\
 			.ngpio		  = 8,				\
 		},							\

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
@ 2011-03-28 23:03 ` Ryan Mallon
  0 siblings, 0 replies; 10+ messages in thread
From: Ryan Mallon @ 2011-03-28 23:03 UTC (permalink / raw)
  To: linux-arm-kernel, linux kernel, hartleys; +Cc: Thomas Gleixner, Grant Likely

Hartley pointed out that the patch I posted to remove the irq internals
fiddling from ep93xx_gpio_dbg_show does not function as expected. It
will print [interrupt] beside all pins which are capable of being
interrupts, not just those which are currently configured as interrupts.

The best solution is just to remove the custom ep93xx gpio debugfs
function all together. The generic gpiolib one is good enough.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
---

diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index 34e071d..c74adf9 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
 	return 0;
 }
 
-static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
-{
-	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
-	u8 data_reg, data_dir_reg;
-	int gpio, i;
-
-	data_reg = __raw_readb(ep93xx_chip->data_reg);
-	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
-
-	gpio = ep93xx_chip->chip.base;
-	for (i = 0; i < chip->ngpio; i++, gpio++) {
-		int is_out = data_dir_reg & (1 << i);
-		int irq = gpio_to_irq(gpio);
-
-		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
-				chip->label, i, gpio,
-				gpiochip_is_requested(chip, i) ? : "",
-				is_out ? "out" : "in ",
-				(data_reg & (1<<  i)) ? "hi" : "lo",
-				(!is_out && irq>= 0) ? "(interrupt)" : "");
-	}
-}
-
 #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
 	{								\
 		.chip = {						\
@@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 			.direction_output = ep93xx_gpio_direction_output, \
 			.get		  = ep93xx_gpio_get,		\
 			.set		  = ep93xx_gpio_set,		\
-			.dbg_show	  = ep93xx_gpio_dbg_show,	\
 			.base		  = base_gpio,			\
 			.ngpio		  = 8,				\
 		},							\


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
  2011-03-28 23:03 ` Ryan Mallon
@ 2011-03-28 23:53   ` H Hartley Sweeten
  -1 siblings, 0 replies; 10+ messages in thread
From: H Hartley Sweeten @ 2011-03-28 23:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, March 28, 2011 4:03 PM, Ryan Mallon wrote:
>
> Hartley pointed out that the patch I posted to remove the irq internals
> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
> will print [interrupt] beside all pins which are capable of being
> interrupts, not just those which are currently configured as interrupts.
>
> The best solution is just to remove the custom ep93xx gpio debugfs
> function all together. The generic gpiolib one is good enough.
>
> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
@ 2011-03-28 23:53   ` H Hartley Sweeten
  0 siblings, 0 replies; 10+ messages in thread
From: H Hartley Sweeten @ 2011-03-28 23:53 UTC (permalink / raw)
  To: Ryan Mallon, linux-arm-kernel, linux kernel; +Cc: Thomas Gleixner, Grant Likely

On Monday, March 28, 2011 4:03 PM, Ryan Mallon wrote:
>
> Hartley pointed out that the patch I posted to remove the irq internals
> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
> will print [interrupt] beside all pins which are capable of being
> interrupts, not just those which are currently configured as interrupts.
>
> The best solution is just to remove the custom ep93xx gpio debugfs
> function all together. The generic gpiolib one is good enough.
>
> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
  2011-03-28 23:03 ` Ryan Mallon
@ 2011-03-31  4:01   ` Grant Likely
  -1 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2011-03-31  4:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 29, 2011 at 12:03:06PM +1300, Ryan Mallon wrote:
> Hartley pointed out that the patch I posted to remove the irq internals
> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
> will print [interrupt] beside all pins which are capable of being
> interrupts, not just those which are currently configured as interrupts.
> 
> The best solution is just to remove the custom ep93xx gpio debugfs
> function all together. The generic gpiolib one is good enough.
> 
> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

Applied, thanks.

g.

> ---
> 
> diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
> index 34e071d..c74adf9 100644
> --- a/arch/arm/mach-ep93xx/gpio.c
> +++ b/arch/arm/mach-ep93xx/gpio.c
> @@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
>  	return 0;
>  }
>  
> -static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> -{
> -	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
> -	u8 data_reg, data_dir_reg;
> -	int gpio, i;
> -
> -	data_reg = __raw_readb(ep93xx_chip->data_reg);
> -	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
> -
> -	gpio = ep93xx_chip->chip.base;
> -	for (i = 0; i < chip->ngpio; i++, gpio++) {
> -		int is_out = data_dir_reg & (1 << i);
> -		int irq = gpio_to_irq(gpio);
> -
> -		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
> -				chip->label, i, gpio,
> -				gpiochip_is_requested(chip, i) ? : "",
> -				is_out ? "out" : "in ",
> -				(data_reg & (1<<  i)) ? "hi" : "lo",
> -				(!is_out && irq>= 0) ? "(interrupt)" : "");
> -	}
> -}
> -
>  #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
>  	{								\
>  		.chip = {						\
> @@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>  			.direction_output = ep93xx_gpio_direction_output, \
>  			.get		  = ep93xx_gpio_get,		\
>  			.set		  = ep93xx_gpio_set,		\
> -			.dbg_show	  = ep93xx_gpio_dbg_show,	\
>  			.base		  = base_gpio,			\
>  			.ngpio		  = 8,				\
>  		},							\
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
@ 2011-03-31  4:01   ` Grant Likely
  0 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2011-03-31  4:01 UTC (permalink / raw)
  To: Ryan Mallon; +Cc: linux-arm-kernel, linux kernel, hartleys, Thomas Gleixner

On Tue, Mar 29, 2011 at 12:03:06PM +1300, Ryan Mallon wrote:
> Hartley pointed out that the patch I posted to remove the irq internals
> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
> will print [interrupt] beside all pins which are capable of being
> interrupts, not just those which are currently configured as interrupts.
> 
> The best solution is just to remove the custom ep93xx gpio debugfs
> function all together. The generic gpiolib one is good enough.
> 
> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

Applied, thanks.

g.

> ---
> 
> diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
> index 34e071d..c74adf9 100644
> --- a/arch/arm/mach-ep93xx/gpio.c
> +++ b/arch/arm/mach-ep93xx/gpio.c
> @@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
>  	return 0;
>  }
>  
> -static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> -{
> -	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
> -	u8 data_reg, data_dir_reg;
> -	int gpio, i;
> -
> -	data_reg = __raw_readb(ep93xx_chip->data_reg);
> -	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
> -
> -	gpio = ep93xx_chip->chip.base;
> -	for (i = 0; i < chip->ngpio; i++, gpio++) {
> -		int is_out = data_dir_reg & (1 << i);
> -		int irq = gpio_to_irq(gpio);
> -
> -		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
> -				chip->label, i, gpio,
> -				gpiochip_is_requested(chip, i) ? : "",
> -				is_out ? "out" : "in ",
> -				(data_reg & (1<<  i)) ? "hi" : "lo",
> -				(!is_out && irq>= 0) ? "(interrupt)" : "");
> -	}
> -}
> -
>  #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
>  	{								\
>  		.chip = {						\
> @@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>  			.direction_output = ep93xx_gpio_direction_output, \
>  			.get		  = ep93xx_gpio_get,		\
>  			.set		  = ep93xx_gpio_set,		\
> -			.dbg_show	  = ep93xx_gpio_dbg_show,	\
>  			.base		  = base_gpio,			\
>  			.ngpio		  = 8,				\
>  		},							\
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
  2011-03-31  4:01   ` Grant Likely
@ 2011-03-31  4:03     ` Ryan Mallon
  -1 siblings, 0 replies; 10+ messages in thread
From: Ryan Mallon @ 2011-03-31  4:03 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/31/2011 05:01 PM, Grant Likely wrote:
> On Tue, Mar 29, 2011 at 12:03:06PM +1300, Ryan Mallon wrote:
>> Hartley pointed out that the patch I posted to remove the irq internals
>> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
>> will print [interrupt] beside all pins which are capable of being
>> interrupts, not just those which are currently configured as interrupts.
>>
>> The best solution is just to remove the custom ep93xx gpio debugfs
>> function all together. The generic gpiolib one is good enough.
>>
>> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
> 
> Applied, thanks.
> 
> g.

This is presently sitting in rmk's patch tracking system. I take it I
should drop it from there?

~Ryan

>> ---
>>
>> diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
>> index 34e071d..c74adf9 100644
>> --- a/arch/arm/mach-ep93xx/gpio.c
>> +++ b/arch/arm/mach-ep93xx/gpio.c
>> @@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
>>  	return 0;
>>  }
>>  
>> -static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>> -{
>> -	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
>> -	u8 data_reg, data_dir_reg;
>> -	int gpio, i;
>> -
>> -	data_reg = __raw_readb(ep93xx_chip->data_reg);
>> -	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
>> -
>> -	gpio = ep93xx_chip->chip.base;
>> -	for (i = 0; i < chip->ngpio; i++, gpio++) {
>> -		int is_out = data_dir_reg & (1 << i);
>> -		int irq = gpio_to_irq(gpio);
>> -
>> -		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
>> -				chip->label, i, gpio,
>> -				gpiochip_is_requested(chip, i) ? : "",
>> -				is_out ? "out" : "in ",
>> -				(data_reg & (1<<  i)) ? "hi" : "lo",
>> -				(!is_out && irq>= 0) ? "(interrupt)" : "");
>> -	}
>> -}
>> -
>>  #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
>>  	{								\
>>  		.chip = {						\
>> @@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>>  			.direction_output = ep93xx_gpio_direction_output, \
>>  			.get		  = ep93xx_gpio_get,		\
>>  			.set		  = ep93xx_gpio_set,		\
>> -			.dbg_show	  = ep93xx_gpio_dbg_show,	\
>>  			.base		  = base_gpio,			\
>>  			.ngpio		  = 8,				\
>>  		},							\
>>


-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
@ 2011-03-31  4:03     ` Ryan Mallon
  0 siblings, 0 replies; 10+ messages in thread
From: Ryan Mallon @ 2011-03-31  4:03 UTC (permalink / raw)
  To: Grant Likely; +Cc: linux-arm-kernel, linux kernel, hartleys, Thomas Gleixner

On 03/31/2011 05:01 PM, Grant Likely wrote:
> On Tue, Mar 29, 2011 at 12:03:06PM +1300, Ryan Mallon wrote:
>> Hartley pointed out that the patch I posted to remove the irq internals
>> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
>> will print [interrupt] beside all pins which are capable of being
>> interrupts, not just those which are currently configured as interrupts.
>>
>> The best solution is just to remove the custom ep93xx gpio debugfs
>> function all together. The generic gpiolib one is good enough.
>>
>> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
> 
> Applied, thanks.
> 
> g.

This is presently sitting in rmk's patch tracking system. I take it I
should drop it from there?

~Ryan

>> ---
>>
>> diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
>> index 34e071d..c74adf9 100644
>> --- a/arch/arm/mach-ep93xx/gpio.c
>> +++ b/arch/arm/mach-ep93xx/gpio.c
>> @@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
>>  	return 0;
>>  }
>>  
>> -static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>> -{
>> -	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
>> -	u8 data_reg, data_dir_reg;
>> -	int gpio, i;
>> -
>> -	data_reg = __raw_readb(ep93xx_chip->data_reg);
>> -	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
>> -
>> -	gpio = ep93xx_chip->chip.base;
>> -	for (i = 0; i < chip->ngpio; i++, gpio++) {
>> -		int is_out = data_dir_reg & (1 << i);
>> -		int irq = gpio_to_irq(gpio);
>> -
>> -		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
>> -				chip->label, i, gpio,
>> -				gpiochip_is_requested(chip, i) ? : "",
>> -				is_out ? "out" : "in ",
>> -				(data_reg & (1<<  i)) ? "hi" : "lo",
>> -				(!is_out && irq>= 0) ? "(interrupt)" : "");
>> -	}
>> -}
>> -
>>  #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
>>  	{								\
>>  		.chip = {						\
>> @@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>>  			.direction_output = ep93xx_gpio_direction_output, \
>>  			.get		  = ep93xx_gpio_get,		\
>>  			.set		  = ep93xx_gpio_set,		\
>> -			.dbg_show	  = ep93xx_gpio_dbg_show,	\
>>  			.base		  = base_gpio,			\
>>  			.ngpio		  = 8,				\
>>  		},							\
>>


-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan@bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
  2011-03-31  4:03     ` Ryan Mallon
@ 2011-03-31  4:04       ` Grant Likely
  -1 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2011-03-31  4:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 31, 2011 at 05:03:53PM +1300, Ryan Mallon wrote:
> On 03/31/2011 05:01 PM, Grant Likely wrote:
> > On Tue, Mar 29, 2011 at 12:03:06PM +1300, Ryan Mallon wrote:
> >> Hartley pointed out that the patch I posted to remove the irq internals
> >> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
> >> will print [interrupt] beside all pins which are capable of being
> >> interrupts, not just those which are currently configured as interrupts.
> >>
> >> The best solution is just to remove the custom ep93xx gpio debugfs
> >> function all together. The generic gpiolib one is good enough.
> >>
> >> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
> > 
> > Applied, thanks.
> > 
> > g.
> 
> This is presently sitting in rmk's patch tracking system. I take it I
> should drop it from there?

Actually, no.  I missed it was under arch/arm instead of drivers/gpio.
I'll drop it from my tree.

g.

> 
> ~Ryan
> 
> >> ---
> >>
> >> diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
> >> index 34e071d..c74adf9 100644
> >> --- a/arch/arm/mach-ep93xx/gpio.c
> >> +++ b/arch/arm/mach-ep93xx/gpio.c
> >> @@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
> >>  	return 0;
> >>  }
> >>  
> >> -static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> >> -{
> >> -	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
> >> -	u8 data_reg, data_dir_reg;
> >> -	int gpio, i;
> >> -
> >> -	data_reg = __raw_readb(ep93xx_chip->data_reg);
> >> -	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
> >> -
> >> -	gpio = ep93xx_chip->chip.base;
> >> -	for (i = 0; i < chip->ngpio; i++, gpio++) {
> >> -		int is_out = data_dir_reg & (1 << i);
> >> -		int irq = gpio_to_irq(gpio);
> >> -
> >> -		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
> >> -				chip->label, i, gpio,
> >> -				gpiochip_is_requested(chip, i) ? : "",
> >> -				is_out ? "out" : "in ",
> >> -				(data_reg & (1<<  i)) ? "hi" : "lo",
> >> -				(!is_out && irq>= 0) ? "(interrupt)" : "");
> >> -	}
> >> -}
> >> -
> >>  #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
> >>  	{								\
> >>  		.chip = {						\
> >> @@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> >>  			.direction_output = ep93xx_gpio_direction_output, \
> >>  			.get		  = ep93xx_gpio_get,		\
> >>  			.set		  = ep93xx_gpio_set,		\
> >> -			.dbg_show	  = ep93xx_gpio_dbg_show,	\
> >>  			.base		  = base_gpio,			\
> >>  			.ngpio		  = 8,				\
> >>  		},							\
> >>
> 
> 
> -- 
> Bluewater Systems Ltd - ARM Technology Solution Centre
> 
> Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
> ryan at bluewatersys.com         	PO Box 13 889, Christchurch 8013
> http://www.bluewatersys.com	New Zealand
> Phone: +64 3 3779127		Freecall: Australia 1800 148 751
> Fax:   +64 3 3779135			  USA 1800 261 2934

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function
@ 2011-03-31  4:04       ` Grant Likely
  0 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2011-03-31  4:04 UTC (permalink / raw)
  To: Ryan Mallon; +Cc: linux-arm-kernel, linux kernel, hartleys, Thomas Gleixner

On Thu, Mar 31, 2011 at 05:03:53PM +1300, Ryan Mallon wrote:
> On 03/31/2011 05:01 PM, Grant Likely wrote:
> > On Tue, Mar 29, 2011 at 12:03:06PM +1300, Ryan Mallon wrote:
> >> Hartley pointed out that the patch I posted to remove the irq internals
> >> fiddling from ep93xx_gpio_dbg_show does not function as expected. It
> >> will print [interrupt] beside all pins which are capable of being
> >> interrupts, not just those which are currently configured as interrupts.
> >>
> >> The best solution is just to remove the custom ep93xx gpio debugfs
> >> function all together. The generic gpiolib one is good enough.
> >>
> >> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
> > 
> > Applied, thanks.
> > 
> > g.
> 
> This is presently sitting in rmk's patch tracking system. I take it I
> should drop it from there?

Actually, no.  I missed it was under arch/arm instead of drivers/gpio.
I'll drop it from my tree.

g.

> 
> ~Ryan
> 
> >> ---
> >>
> >> diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
> >> index 34e071d..c74adf9 100644
> >> --- a/arch/arm/mach-ep93xx/gpio.c
> >> +++ b/arch/arm/mach-ep93xx/gpio.c
> >> @@ -348,29 +348,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip,
> >>  	return 0;
> >>  }
> >>  
> >> -static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> >> -{
> >> -	struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
> >> -	u8 data_reg, data_dir_reg;
> >> -	int gpio, i;
> >> -
> >> -	data_reg = __raw_readb(ep93xx_chip->data_reg);
> >> -	data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
> >> -
> >> -	gpio = ep93xx_chip->chip.base;
> >> -	for (i = 0; i < chip->ngpio; i++, gpio++) {
> >> -		int is_out = data_dir_reg & (1 << i);
> >> -		int irq = gpio_to_irq(gpio);
> >> -
> >> -		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
> >> -				chip->label, i, gpio,
> >> -				gpiochip_is_requested(chip, i) ? : "",
> >> -				is_out ? "out" : "in ",
> >> -				(data_reg & (1<<  i)) ? "hi" : "lo",
> >> -				(!is_out && irq>= 0) ? "(interrupt)" : "");
> >> -	}
> >> -}
> >> -
> >>  #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio)			\
> >>  	{								\
> >>  		.chip = {						\
> >> @@ -379,7 +356,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> >>  			.direction_output = ep93xx_gpio_direction_output, \
> >>  			.get		  = ep93xx_gpio_get,		\
> >>  			.set		  = ep93xx_gpio_set,		\
> >> -			.dbg_show	  = ep93xx_gpio_dbg_show,	\
> >>  			.base		  = base_gpio,			\
> >>  			.ngpio		  = 8,				\
> >>  		},							\
> >>
> 
> 
> -- 
> Bluewater Systems Ltd - ARM Technology Solution Centre
> 
> Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
> ryan@bluewatersys.com         	PO Box 13 889, Christchurch 8013
> http://www.bluewatersys.com	New Zealand
> Phone: +64 3 3779127		Freecall: Australia 1800 148 751
> Fax:   +64 3 3779135			  USA 1800 261 2934

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-31  4:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 23:03 [PATCH] EP93xx: Remove ep93xx_gpio_dbg_show function Ryan Mallon
2011-03-28 23:03 ` Ryan Mallon
2011-03-28 23:53 ` H Hartley Sweeten
2011-03-28 23:53   ` H Hartley Sweeten
2011-03-31  4:01 ` Grant Likely
2011-03-31  4:01   ` Grant Likely
2011-03-31  4:03   ` Ryan Mallon
2011-03-31  4:03     ` Ryan Mallon
2011-03-31  4:04     ` Grant Likely
2011-03-31  4:04       ` Grant Likely

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.