~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/arm/plat-omap/include/plat/gpio-switch.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * GPIO switch definitions
 
3
 *
 
4
 * Copyright (C) 2006 Nokia Corporation
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License version 2 as
 
8
 * published by the Free Software Foundation.
 
9
 */
 
10
 
 
11
#ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H
 
12
#define __ASM_ARCH_OMAP_GPIO_SWITCH_H
 
13
 
 
14
#include <linux/types.h>
 
15
 
 
16
/* Cover:
 
17
 *      high -> closed
 
18
 *      low  -> open
 
19
 * Connection:
 
20
 *      high -> connected
 
21
 *      low  -> disconnected
 
22
 * Activity:
 
23
 *      high -> active
 
24
 *      low  -> inactive
 
25
 *
 
26
 */
 
27
#define OMAP_GPIO_SWITCH_TYPE_COVER             0x0000
 
28
#define OMAP_GPIO_SWITCH_TYPE_CONNECTION        0x0001
 
29
#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY          0x0002
 
30
#define OMAP_GPIO_SWITCH_FLAG_INVERTED          0x0001
 
31
#define OMAP_GPIO_SWITCH_FLAG_OUTPUT            0x0002
 
32
 
 
33
struct omap_gpio_switch {
 
34
        const char *name;
 
35
        s16 gpio;
 
36
        unsigned flags:4;
 
37
        unsigned type:4;
 
38
 
 
39
        /* Time in ms to debounce when transitioning from
 
40
         * inactive state to active state. */
 
41
        u16 debounce_rising;
 
42
        /* Same for transition from active to inactive state. */
 
43
        u16 debounce_falling;
 
44
 
 
45
        /* notify board-specific code about state changes */
 
46
        void (* notify)(void *data, int state);
 
47
        void *notify_data;
 
48
};
 
49
 
 
50
/* Call at init time only */
 
51
extern void omap_register_gpio_switches(const struct omap_gpio_switch *tbl,
 
52
                                        int count);
 
53
 
 
54
#endif