Re: Latest gpio gumph

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Haavard Skinnemoen
Date: Tuesday, June 10, 2008 - 4:58 am

David Brownell <david-b@pacbell.net> wrote:

Applied the patch below. Thanks.

Haavard

From bab0d89419e2d30199420da0af29a8b5662af018 Mon Sep 17 00:00:00 2001
From: David Brownell <dbrownell@users.sourceforge.net>
Date: Tue, 10 Jun 2008 13:55:52 +0200
Subject: [PATCH] avr32: minor GPIO handling updates

On the odd chance some code uses a pin as a GPIO IRQ without calling
gpio_request() or gpio_direction_input(), the debug dump should still
show its pin status.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
---
 arch/avr32/mach-at32ap/pio.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 38a8fa3..60da03b 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -318,6 +318,8 @@ static void pio_bank_show(struct seq_file *s, struct gpio_chip *chip)
 		const char *label;
 
 		label = gpiochip_is_requested(chip, i);
+		if (!label && (imr & mask))
+			label = "[irq]";
 		if (!label)
 			continue;
 
-- 
1.5.5.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Latest gpio gumph, Ben Nizette, (Tue May 27, 7:41 pm)
Re: Latest gpio gumph, David Brownell, (Tue May 27, 9:44 pm)
Re: Latest gpio gumph, Ben Nizette, (Tue May 27, 10:13 pm)
Re: Latest gpio gumph, Haavard Skinnemoen, (Wed May 28, 1:14 am)
Re: Latest gpio gumph, David Brownell, (Wed May 28, 2:01 am)
Re: Latest gpio gumph, Haavard Skinnemoen, (Wed May 28, 2:21 am)
Re: Latest gpio gumph, David Brownell, (Thu May 29, 8:18 pm)
Re: Latest gpio gumph, Haavard Skinnemoen, (Tue Jun 10, 4:58 am)