linux-kernel-test/include/asm-arm/arch-pxa
eric miao 7facc2f937 [ARM] pxa: add MFP-alike pin configuration support for pxa{25x, 27x}
Pin configuration on pxa{25x,27x} has now separated from generic GPIO
into dedicated mfp-pxa2xx.c by this patch. The name "mfp" is borrowed
from pxa3xx and is used here to alert the difference between the two
concepts: pin configuration and generic GPIOs.  A GPIO can be called
a "GPIO" _only_ when the corresponding pin is configured so.

A pin configuration on pxa{25x,27x} is composed of:

    - alternate function selection (or pin mux as commonly called)
    - low power state or sleep state
    - wakeup enabling from low power mode

The following MFP_xxx bit definitions in mfp.h are re-used:

    - MFP_PIN(x)
    - MFP_AFx
    - MFP_LPM_DRIVE_{LOW, HIGH}
    - MFP_LPM_EDGE_*

Selecting alternate function on pxa{25x, 27x} involves configuration
of GPIO direction register GPDRx, so a new bit and MFP_DIR_{IN, OUT}
are introduced. And pin configurations are defined by the following
two macros:

    - MFP_CFG_IN  : for input alternate functions
    - MFP_CFG_OUT : for output alternate functions

Every configuration should provide a low power state if it configured
as output using MFP_CFG_OUT().  As a general guideline, the low power
state should be decided to minimize the overall power dissipation. As
an example, it is better to drive the pin as high level in low power
mode if the GPIO is configured as an active low chip select.

Pins configured as GPIO are defined by MFP_CFG_IN(). This is to avoid
side effects when it is firstly configured as output.  The actual
direction of the GPIO is configured by gpio_direction_{input, output}

Wakeup enabling on pxa{25x, 27x} is actually GPIO based wakeup, thus
the device based enable_irq_wake() mechanism is not applicable here.

E.g.  invoking enable_irq_wake() with a GPIO IRQ as in the following
code to enable OTG wakeup is by no means portable and intuitive, and
it is valid _only_ when GPIO35 is configured as USB_P2_1:

    enable_irq_wake( gpio_to_irq(35) );

To make things worse, not every GPIO is able to wakeup the system.
Only a small number of them can, on either rising or falling edge,
or when level is high (for keypad GPIOs).

Thus, another new bit is introduced to indicate that the GPIO will
wakeup the system:

    - MFP_LPM_WAKEUP_ENABLE

The following macros can be used in platform code, and be OR'ed to
the GPIO configuration to enable its wakeup:

    - WAKEUP_ON_EDGE_{RISE, FALL, BOTH}
    - WAKEUP_ON_LEVEL_HIGH

The WAKEUP_ON_LEVEL_HIGH is used for keypad GPIOs _only_, there is
no edge settings for those GPIOs.

These WAKEUP_ON_* flags OR'ed on wrong GPIOs will be ignored in case
that platform code author is careless enough.

The tradeoff here is that the wakeup source is fully determined by
the platform configuration, instead of enable_irq_wake().

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19 11:29:04 +01:00
..
akita.h
audio.h [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
bitfield.h
cm-x270.h [ARM] 4576/1: CM-X270 machine support 2007-10-15 18:53:57 +01:00
colibri.h [ARM] 4762/1: Basic support for Toradex Colibri module 2008-01-28 13:13:27 +00:00
corgi.h [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix 2008-01-28 13:13:25 +00:00
debug-macro.S
dma.h [ARM] 4576/1: CM-X270 machine support 2007-10-15 18:53:57 +01:00
entry-macro.S [ARM] 4840/1: pxa: fix the typo in get_irqnr_and_base 2008-02-29 22:47:23 +00:00
gpio.h gpiolib support for the PXA architecture 2008-02-05 09:44:13 -08:00
hardware.h [ARM] pxa: silence warnings from cpu_is_xxx() macros 2008-01-10 12:33:54 +00:00
i2c.h i2c-pxa: Add polling transfer 2008-01-27 18:14:50 +01:00
idp.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
io.h [ARM] 3631/1: Remove legacy __mem_isa() definitions 2006-06-24 10:34:48 +01:00
irda.h
irqs.h [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module 2008-01-28 13:13:20 +00:00
littleton.h [ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform) 2008-01-28 13:13:17 +00:00
lpd270.h
lubbock.h
magician.h [ARM] 4664/1: Add basic support for HTC Magician PDA phones 2008-01-28 13:13:16 +00:00
mainstone.h
memory.h [ARM] 4576/1: CM-X270 machine support 2007-10-15 18:53:57 +01:00
mfp-pxa2xx.h [ARM] pxa: add MFP-alike pin configuration support for pxa{25x, 27x} 2008-04-19 11:29:04 +01:00
mfp-pxa3xx.h [ARM] pxa: make MFP configuration processor independent 2008-01-26 15:07:56 +00:00
mfp-pxa25x.h [ARM] pxa: add MFP-alike pin configuration support for pxa{25x, 27x} 2008-04-19 11:29:04 +01:00
mfp-pxa27x.h [ARM] pxa: add MFP-alike pin configuration support for pxa{25x, 27x} 2008-04-19 11:29:04 +01:00
mfp-pxa300.h [ARM] pxa: introduce a new file mfp-pxa3xx.h for common pin configurations 2008-01-26 15:07:56 +00:00
mfp-pxa320.h [ARM] pxa: introduce a new file mfp-pxa3xx.h for common pin configurations 2008-01-26 15:07:56 +00:00
mfp.h [ARM] pxa: make MFP configuration processor independent 2008-01-26 15:07:56 +00:00
mmc.h [ARM] pxa: mmc: add 3rd host controller support for pxa310 2008-01-26 15:07:53 +00:00
mtd-xip.h
ohci.h [ARM] 3547/1: PXA-OHCI: Allow platforms to specify a power budget 2006-06-08 22:44:07 +01:00
pcm027.h [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module 2008-01-28 13:13:20 +00:00
pcm990_baseboard.h [ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270 2008-01-28 13:13:24 +00:00
pm.h PM: Move definition of struct pm_ops to suspend.h 2007-10-18 14:37:18 -07:00
poodle.h [ARM] 3594/1: Poodle: Add touchscreen support + other updates 2006-06-19 20:46:05 +01:00
pxa2xx_spi.h [ARM] pxa: make pxa2xx_spi driver use ssp_request()/ssp_free() 2008-01-26 15:07:52 +00:00
pxa2xx-gpio.h [ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.h 2008-04-19 11:29:04 +01:00
pxa2xx-regs.h [ARM] pxa: move memory controller registers into pxa2xx-regs.h 2008-01-26 15:07:54 +00:00
pxa3xx-regs.h [ARM] 4830/1: Add support for the CLK_POUT pin on PXA3xx CPUs 2008-04-19 11:29:02 +01:00
pxa27x_keypad.h Input: pxa27x_keypad - add debounce_interval to the keypad platform data 2008-01-31 00:59:23 -05:00
pxa-regs.h [ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.h 2008-04-19 11:29:04 +01:00
pxafb.h pxafb: Add support for other palette formats 2007-10-16 09:43:15 -07:00
regs-ssp.h spi: pxa2xx_spi clock polarity fix 2008-02-23 17:12:14 -08:00
sharpsl.h [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix 2008-01-28 13:13:25 +00:00
spitz.h [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix 2008-01-28 13:13:25 +00:00
ssp.h [ARM] pxa: define "struct ssp_device" and add ssp_request()/ssp_free() 2008-01-26 15:07:51 +00:00
system.h [ARM] 3593/1: Add reboot and shutdown handlers for Zaurus handhelds 2006-06-19 19:57:12 +01:00
timex.h [ARM] pxa: PXA3xx base support 2007-10-15 18:53:43 +01:00
tosa.h Input: add Tosa keyboard driver 2008-01-21 01:11:07 -05:00
trizeps4.h [ARM] 3666/1: TRIZEPS4 [1/5] core 2006-06-29 16:25:37 +01:00
udc.h USB: pxa2xx_udc: use generic gpio layer 2007-07-12 16:34:42 -07:00
uncompress.h [ARM] 4718/1: Fix redefinition warnings in PXA uncompressor code 2008-01-26 15:07:52 +00:00
vmalloc.h
zylonite.h [ARM] pxa: mmc: add 1st host controller support for pxa3xx 2008-01-26 15:07:53 +00:00