From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH 6/6] OMAP: GPIO: remove duplicate debugfs interface
Date: Mon, 3 May 2010 16:26:17 -0700 [thread overview]
Message-ID: <1272929177-22685-7-git-send-email-khilman@deeprootsystems.com> (raw)
In-Reply-To: <1272929177-22685-1-git-send-email-khilman@deeprootsystems.com>
The generic gpiolib provides a debugfs interface to GPIOs which
provides identical (but nicer looking) data as the OMAP specific one.
This patch completely drops the OMAP specific interface
(/debug/omap_gpio) in favor of using the generic one (/debug/gpio.)
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/plat-omap/gpio.c | 107 ---------------------------------------------
1 files changed, 0 insertions(+), 107 deletions(-)
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 7eaf47e..bdef43a 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -2310,110 +2310,3 @@ static int __init omap_gpio_sysinit(void)
}
arch_initcall(omap_gpio_sysinit);
-
-
-#ifdef CONFIG_DEBUG_FS
-
-#include <linux/debugfs.h>
-#include <linux/seq_file.h>
-
-static int dbg_gpio_show(struct seq_file *s, void *unused)
-{
- unsigned i, j, gpio;
-
- for (i = 0, gpio = 0; i < gpio_bank_count; i++) {
- struct gpio_bank *bank = gpio_bank + i;
- unsigned bankwidth = 16;
- u32 mask = 1;
-
- if (bank_is_mpuio(bank))
- gpio = OMAP_MPUIO(0);
- else if (cpu_class_is_omap2() || cpu_is_omap7xx())
- bankwidth = 32;
-
- for (j = 0; j < bankwidth; j++, gpio++, mask <<= 1) {
- unsigned irq, value, is_in, irqstat;
- const char *label;
-
- label = gpiochip_is_requested(&bank->chip, j);
- if (!label)
- continue;
-
- irq = bank->virtual_irq_start + j;
- value = gpio_get_value(gpio);
- is_in = gpio_is_input(bank, mask);
-
- if (bank_is_mpuio(bank))
- seq_printf(s, "MPUIO %2d ", j);
- else
- seq_printf(s, "GPIO %3d ", gpio);
- seq_printf(s, "(%-20.20s): %s %s",
- label,
- is_in ? "in " : "out",
- value ? "hi" : "lo");
-
-/* FIXME for at least omap2, show pullup/pulldown state */
-
- irqstat = irq_desc[irq].status;
-#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
- if (is_in && ((bank->suspend_wakeup & mask)
- || irqstat & IRQ_TYPE_SENSE_MASK)) {
- char *trigger = NULL;
-
- switch (irqstat & IRQ_TYPE_SENSE_MASK) {
- case IRQ_TYPE_EDGE_FALLING:
- trigger = "falling";
- break;
- case IRQ_TYPE_EDGE_RISING:
- trigger = "rising";
- break;
- case IRQ_TYPE_EDGE_BOTH:
- trigger = "bothedge";
- break;
- case IRQ_TYPE_LEVEL_LOW:
- trigger = "low";
- break;
- case IRQ_TYPE_LEVEL_HIGH:
- trigger = "high";
- break;
- case IRQ_TYPE_NONE:
- trigger = "(?)";
- break;
- }
- seq_printf(s, ", irq-%d %-8s%s",
- irq, trigger,
- (bank->suspend_wakeup & mask)
- ? " wakeup" : "");
- }
-#endif
- seq_printf(s, "\n");
- }
-
- if (bank_is_mpuio(bank)) {
- seq_printf(s, "\n");
- gpio = 0;
- }
- }
- return 0;
-}
-
-static int dbg_gpio_open(struct inode *inode, struct file *file)
-{
- return single_open(file, dbg_gpio_show, &inode->i_private);
-}
-
-static const struct file_operations debug_fops = {
- .open = dbg_gpio_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static int __init omap_gpio_debuginit(void)
-{
- (void) debugfs_create_file("omap_gpio", S_IRUGO,
- NULL, NULL, &debug_fops);
- return 0;
-}
-late_initcall(omap_gpio_debuginit);
-#endif
--
1.7.0.2
next prev parent reply other threads:[~2010-05-03 23:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 23:26 [PATCH 0/6] OMAP GPIO updates for 2.6.35 Kevin Hilman
2010-05-03 23:26 ` [PATCH 1/6] OMAP3: GPIO fixes for off-mode Kevin Hilman
2010-05-03 23:26 ` [PATCH 2/6] OMAP3: GPIO: Only enable WAKEUPEN for edge detection GPIOs Kevin Hilman
2010-05-10 21:11 ` Tony Lindgren
2010-05-11 14:27 ` Kevin Hilman
2010-05-11 22:57 ` Tony Lindgren
2010-05-11 23:27 ` Kevin Hilman
2010-05-11 23:53 ` Tony Lindgren
2010-05-03 23:26 ` [PATCH 3/6] OMAP2/3: GPIO: generalize prepare for idle Kevin Hilman
2010-05-03 23:26 ` [PATCH 4/6] OMAP3: GPIO: disable GPIO debounce clocks on idle Kevin Hilman
2010-05-03 23:26 ` [PATCH 5/6] OMAP3: GPIO: Removed a couple of unneeded registers from context save/restore Kevin Hilman
2010-05-03 23:26 ` Kevin Hilman [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-05-11 23:30 [PATCH 0/6] OMAP GPIO updates for 2.6.35 Kevin Hilman
2010-05-11 23:30 ` [PATCH 6/6] OMAP: GPIO: remove duplicate debugfs interface Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1272929177-22685-7-git-send-email-khilman@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).