diff options
| author | Takashi Iwai <tiwai@suse.de> | 2013-04-18 16:24:31 +0200 | 
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2013-04-18 16:24:31 +0200 | 
| commit | 8dd2b66d1a961231685a3bfe5937c85d846fbf5d (patch) | |
| tree | 8117553488bf4ef09b048a4b343cf37cc16bf46d /arch/m68k/include/asm/gpio.h | |
| parent | 126825e7ea271ae8e3172e10ca1fc22c908b5385 (diff) | |
| parent | 24568ea4bef5ab8106206eddf5512434421c00ed (diff) | |
| download | olio-linux-3.10-8dd2b66d1a961231685a3bfe5937c85d846fbf5d.tar.xz olio-linux-3.10-8dd2b66d1a961231685a3bfe5937c85d846fbf5d.zip  | |
Merge tag 'asoc-v3.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More updates for v3.10
The main additional change here is Lars-Peter's DMA work plus the
platform conversions which have been tested - getting this in mainline
will make life easier for development after the merge window.  These
factor a large chunk of code out of the drivers for the platforms using
dmaengine, greatly simplifying development.
Diffstat (limited to 'arch/m68k/include/asm/gpio.h')
| -rw-r--r-- | arch/m68k/include/asm/gpio.h | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h index 4395ffc51fd..8cc83431805 100644 --- a/arch/m68k/include/asm/gpio.h +++ b/arch/m68k/include/asm/gpio.h @@ -86,4 +86,24 @@ static inline int gpio_cansleep(unsigned gpio)  	return gpio < MCFGPIO_PIN_MAX ? 0 : __gpio_cansleep(gpio);  } +static inline int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) +{ +	int err; + +	err = gpio_request(gpio, label); +	if (err) +		return err; + +	if (flags & GPIOF_DIR_IN) +		err = gpio_direction_input(gpio); +	else +		err = gpio_direction_output(gpio, +			(flags & GPIOF_INIT_HIGH) ? 1 : 0); + +	if (err) +		gpio_free(gpio); + +	return err; +} +  #endif  |