Skip to content

Commit 0835619

Browse files
committed
Merge branches 'gpio/merge' and 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6: gpio: add GPIOF_ values regardless on kconfig settings gpio: include linux/gpio.h where needed gpio/omap4: Fix missing interrupts during device wakeup due to IOPAD. * 'spi/merge' of git://git.secretlab.ca/git/linux-2.6: spi/bfin_spi: fix handling of default bits per word setting
3 parents add7944 + c001fb7 + e479c60 commit 0835619

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

arch/arm/mach-pxa/spitz_pm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/init.h>
1515
#include <linux/kernel.h>
1616
#include <linux/delay.h>
17+
#include <linux/gpio.h>
1718
#include <linux/interrupt.h>
1819
#include <linux/platform_device.h>
1920
#include <linux/apm-emulation.h>

drivers/gpio/gpio-omap.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,9 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio,
469469
+ OMAP24XX_GPIO_CLEARWKUENA);
470470
}
471471
}
472-
/* This part needs to be executed always for OMAP34xx */
473-
if (cpu_is_omap34xx() || (bank->non_wakeup_gpios & gpio_bit)) {
472+
/* This part needs to be executed always for OMAP{34xx, 44xx} */
473+
if (cpu_is_omap34xx() || cpu_is_omap44xx() ||
474+
(bank->non_wakeup_gpios & gpio_bit)) {
474475
/*
475476
* Log the edge gpio and manually trigger the IRQ
476477
* after resume if the input level changes

drivers/pcmcia/pxa2xx_vpac270.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*
1212
*/
1313

14+
#include <linux/gpio.h>
1415
#include <linux/module.h>
1516
#include <linux/platform_device.h>
1617

drivers/spi/spi_bfin5xx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,13 +681,14 @@ static void bfin_spi_pump_transfers(unsigned long data)
681681
drv_data->cs_change = transfer->cs_change;
682682

683683
/* Bits per word setup */
684-
bits_per_word = transfer->bits_per_word ? : message->spi->bits_per_word;
685-
if ((bits_per_word > 0) && (bits_per_word % 16 == 0)) {
684+
bits_per_word = transfer->bits_per_word ? :
685+
message->spi->bits_per_word ? : 8;
686+
if (bits_per_word % 16 == 0) {
686687
drv_data->n_bytes = bits_per_word/8;
687688
drv_data->len = (transfer->len) >> 1;
688689
cr_width = BIT_CTL_WORDSIZE;
689690
drv_data->ops = &bfin_bfin_spi_transfer_ops_u16;
690-
} else if ((bits_per_word > 0) && (bits_per_word % 8 == 0)) {
691+
} else if (bits_per_word % 8 == 0) {
691692
drv_data->n_bytes = bits_per_word/8;
692693
drv_data->len = transfer->len;
693694
cr_width = 0;

include/asm-generic/gpio.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,6 @@ extern int __gpio_cansleep(unsigned gpio);
170170

171171
extern int __gpio_to_irq(unsigned gpio);
172172

173-
#define GPIOF_DIR_OUT (0 << 0)
174-
#define GPIOF_DIR_IN (1 << 0)
175-
176-
#define GPIOF_INIT_LOW (0 << 1)
177-
#define GPIOF_INIT_HIGH (1 << 1)
178-
179-
#define GPIOF_IN (GPIOF_DIR_IN)
180-
#define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
181-
#define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
182-
183173
/**
184174
* struct gpio - a structure describing a GPIO with configuration
185175
* @gpio: the GPIO number

include/linux/gpio.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33

44
/* see Documentation/gpio.txt */
55

6+
/* make these flag values available regardless of GPIO kconfig options */
7+
#define GPIOF_DIR_OUT (0 << 0)
8+
#define GPIOF_DIR_IN (1 << 0)
9+
10+
#define GPIOF_INIT_LOW (0 << 1)
11+
#define GPIOF_INIT_HIGH (1 << 1)
12+
13+
#define GPIOF_IN (GPIOF_DIR_IN)
14+
#define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
15+
#define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
16+
617
#ifdef CONFIG_GENERIC_GPIO
718
#include <asm/gpio.h>
819

0 commit comments

Comments
 (0)