EP93xx: Remove ep93xx_gpio_dbg_show function
PATCH 1/1 EP93xx: Remove ep93xx_gpio_dbg_show function
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.
---
arch/arm/mach-ep93xx/gpio.c +0 -24
@@ -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, \ }, \
Quoted 10 lines · Ryan Mallon
Hartley pointed out that the patch I posted to remove the irq internals fiddling from
ep93xx_gpio_dbg_showdoes 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 <[email protected]>
Grant Likely
AppliedQuoted 9 lines · Ryan Mallon
Hartley pointed out that the patch I posted to remove the irq internals fiddling from
ep93xx_gpio_dbg_showdoes 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 <[email protected]>
Applied, thanks.
g.
Quoted 45 lines
---
arch/arm/mach-ep93xx/gpio.c +0
-24@@ -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, \ }, \
Quoted 6 lines · Grant Likely
Quoted 5 lines · Ryan Mallon
Hartley pointed out that the patch I posted to remove the irq internals fiddling from
ep93xx_gpio_dbg_showdoes 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.
Quoted 8 lines
Quoted 4 lines
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 <[email protected]>Applied, thanks.
g.
This is presently sitting in rmk's patch tracking system. I take it I should drop it from there?
~Ryan
Quoted 45 lines
Quoted 45 lines
---
arch/arm/mach-ep93xx/gpio.c +0
-24@@ -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, \ }, \
Signature · 7 lines
Bluewater Systems Ltd - ARM Technology Solution Centre Ryan Mallon 5 Amuri Park, 404 Barbadoes St [email protected] 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
Quoted 10 lines · Ryan Mallon
Quoted 9 lines · Grant Likely
Quoted 8 lines · Ryan Mallon
Hartley pointed out that the patch I posted to remove the irq internals fiddling from
ep93xx_gpio_dbg_showdoes 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.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Ryan Mallon <[email protected]>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.
Quoted 58 lines
~Ryan
Quoted 45 lines
Quoted 45 lines
---
arch/arm/mach-ep93xx/gpio.c +0
-24@@ -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, \ }, \Signature · 7 lines
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