aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-12-14 18:14:51 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-12 12:39:17 -0400
commitd009559a4215c71694b1a29ec0e520453087a9f6 (patch)
treec68003f0d896cd1eeeaceef8d7206c40a98c165d /arch/arm
parentc872670799d5a41fe2c1f2ccf7c531b5661dcfba (diff)
OMAP: GPIO: remove duplicate debugfs interface
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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-omap/gpio.c107
1 files changed, 0 insertions, 107 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index b895cc9c6b78..955597fd6d35 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)
2310} 2310}
2311 2311
2312arch_initcall(omap_gpio_sysinit); 2312arch_initcall(omap_gpio_sysinit);
2313
2314
2315#ifdef CONFIG_DEBUG_FS
2316
2317#include <linux/debugfs.h>
2318#include <linux/seq_file.h>
2319
2320static int dbg_gpio_show(struct seq_file *s, void *unused)
2321{
2322 unsigned i, j, gpio;
2323
2324 for (i = 0, gpio = 0; i < gpio_bank_count; i++) {
2325 struct gpio_bank *bank = gpio_bank + i;
2326 unsigned bankwidth = 16;
2327 u32 mask = 1;
2328
2329 if (bank_is_mpuio(bank))
2330 gpio = OMAP_MPUIO(0);
2331 else if (cpu_class_is_omap2() || cpu_is_omap7xx())
2332 bankwidth = 32;
2333
2334 for (j = 0; j < bankwidth; j++, gpio++, mask <<= 1) {
2335 unsigned irq, value, is_in, irqstat;
2336 const char *label;
2337
2338 label = gpiochip_is_requested(&bank->chip, j);
2339 if (!label)
2340 continue;
2341
2342 irq = bank->virtual_irq_start + j;
2343 value = gpio_get_value(gpio);
2344 is_in = gpio_is_input(bank, mask);
2345
2346 if (bank_is_mpuio(bank))
2347 seq_printf(s, "MPUIO %2d ", j);
2348 else
2349 seq_printf(s, "GPIO %3d ", gpio);
2350 seq_printf(s, "(%-20.20s): %s %s",
2351 label,
2352 is_in ? "in " : "out",
2353 value ? "hi" : "lo");
2354
2355/* FIXME for at least omap2, show pullup/pulldown state */
2356
2357 irqstat = irq_desc[irq].status;
2358#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
2359 if (is_in && ((bank->suspend_wakeup & mask)
2360 || irqstat & IRQ_TYPE_SENSE_MASK)) {
2361 char *trigger = NULL;
2362
2363 switch (irqstat & IRQ_TYPE_SENSE_MASK) {
2364 case IRQ_TYPE_EDGE_FALLING:
2365 trigger = "falling";
2366 break;
2367 case IRQ_TYPE_EDGE_RISING:
2368 trigger = "rising";
2369 break;
2370 case IRQ_TYPE_EDGE_BOTH:
2371 trigger = "bothedge";
2372 break;
2373 case IRQ_TYPE_LEVEL_LOW:
2374 trigger = "low";
2375 break;
2376 case IRQ_TYPE_LEVEL_HIGH:
2377 trigger = "high";
2378 break;
2379 case IRQ_TYPE_NONE:
2380 trigger = "(?)";
2381 break;
2382 }
2383 seq_printf(s, ", irq-%d %-8s%s",
2384 irq, trigger,
2385 (bank->suspend_wakeup & mask)
2386 ? " wakeup" : "");
2387 }
2388#endif
2389 seq_printf(s, "\n");
2390 }
2391
2392 if (bank_is_mpuio(bank)) {
2393 seq_printf(s, "\n");
2394 gpio = 0;
2395 }
2396 }
2397 return 0;
2398}
2399
2400static int dbg_gpio_open(struct inode *inode, struct file *file)
2401{
2402 return single_open(file, dbg_gpio_show, &inode->i_private);
2403}
2404
2405static const struct file_operations debug_fops = {
2406 .open = dbg_gpio_open,
2407 .read = seq_read,
2408 .llseek = seq_lseek,
2409 .release = single_release,
2410};
2411
2412static int __init omap_gpio_debuginit(void)
2413{
2414 (void) debugfs_create_file("omap_gpio", S_IRUGO,
2415 NULL, NULL, &debug_fops);
2416 return 0;
2417}
2418late_initcall(omap_gpio_debuginit);
2419#endif