Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123727
b: refs/heads/master
c: e918edf
h: refs/heads/master
i:
  123725: c420db3
  123723: 2dab154
  123719: f353a07
  123711: a82f973
v: v3
  • Loading branch information
David Brownell authored and Tony Lindgren committed Dec 11, 2008
1 parent 7666c2a commit 72cdc9f
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 37 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40e3925ba15b604c9ff87154d77a914221d11cdc
refs/heads/master: e918edf7c2f2270dcf18cdcbdf86174a013a124e
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ static void __init h2_init(void)
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A);
if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) {
omap_set_gpio_direction(H2_IRDA_FIRSEL_GPIO_PIN, 0);
gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0);
h2_irda_data.transceiver_mode = h2_transceiver_mode;
}
#endif
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/arm/mach-omap1/board-palmz71.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ palmz71_gpio_setup(int early)
{
if (early) {
/* Only set GPIO1 so we have a working serial */
gpio_set_value(1, 1);
omap_set_gpio_direction(1, 0);
gpio_direction_output(1, 1);
} else {
/* Set MMC/SD host WP pin as input */
if (omap_request_gpio(PALMZ71_MMC_WP_GPIO)) {
Expand Down
11 changes: 3 additions & 8 deletions trunk/arch/arm/mach-omap1/board-sx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,9 @@ static void __init omap_sx1_init(void)
omap_request_gpio(1); /* A_IRDA_OFF */
omap_request_gpio(11); /* A_SWITCH */
omap_request_gpio(15); /* A_USB_ON */
omap_set_gpio_direction(1, 0);/* gpio1 -> output */
omap_set_gpio_direction(11, 0);/* gpio11 -> output */
omap_set_gpio_direction(15, 0);/* gpio15 -> output */
/* set GPIO data */
gpio_set_value(1, 1);/*A_IRDA_OFF = 1 */
gpio_set_value(11, 0);/*A_SWITCH = 0 */
gpio_set_value(15, 0);/*A_USB_ON = 0 */

gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */
gpio_direction_output(11, 0); /*A_SWITCH = 0 */
gpio_direction_output(15, 0); /*A_USB_ON = 0 */
}
/*----------------------------------------*/
static void __init omap_sx1_init_irq(void)
Expand Down
9 changes: 3 additions & 6 deletions trunk/arch/arm/mach-omap1/board-voiceblue.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,15 @@ static void __init voiceblue_init(void)
omap_request_gpio(0);
/* smc91x reset */
omap_request_gpio(7);
omap_set_gpio_direction(7, 0);
gpio_set_value(7, 1);
gpio_direction_output(7, 1);
udelay(2); /* wait at least 100ns */
gpio_set_value(7, 0);
mdelay(50); /* 50ms until PHY ready */
/* smc91x interrupt pin */
omap_request_gpio(8);
/* 16C554 reset*/
omap_request_gpio(6);
omap_set_gpio_direction(6, 0);
gpio_set_value(6, 0);
gpio_direction_output(6, 0);
/* 16C554 interrupt pins */
omap_request_gpio(12);
omap_request_gpio(13);
Expand Down Expand Up @@ -244,8 +242,7 @@ static int wdt_gpio_state;

void voiceblue_wdt_enable(void)
{
omap_set_gpio_direction(0, 0);
gpio_set_value(0, 0);
gpio_direction_output(0, 0);
gpio_set_value(0, 1);
gpio_set_value(0, 0);
wdt_gpio_state = 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-omap1/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ omap_leds_init(void)
*/
omap_cfg_reg(P18_1610_GPIO3);
if (omap_request_gpio(3) == 0)
omap_set_gpio_direction(3, 0);
gpio_direction_output(3, 1);
else
printk(KERN_WARNING "LED: can't get GPIO3/red?\n");

omap_cfg_reg(MPUIO4);
if (omap_request_gpio(OMAP_MPUIO(4)) == 0)
omap_set_gpio_direction(OMAP_MPUIO(4), 0);
gpio_direction_output(OMAP_MPUIO(4), 1);
else
printk(KERN_WARNING "LED: can't get MPUIO4/green?\n");
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/arm/mach-omap2/board-apollon.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ static void __init apollon_usb_init(void)
/* DEVICE_SUSPEND */
omap_cfg_reg(P21_242X_GPIO12);
omap_request_gpio(12);
omap_set_gpio_direction(12, 0); /* OUT */
gpio_set_value(12, 0);
gpio_direction_output(12, 0);
}

static void __init omap_apollon_init(void)
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/arm/plat-omap/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,19 +333,6 @@ static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input)
__raw_writel(l, reg);
}

void omap_set_gpio_direction(int gpio, int is_input)
{
struct gpio_bank *bank;
unsigned long flags;

if (check_gpio(gpio) < 0)
return;
bank = get_gpio_bank(gpio);
spin_lock_irqsave(&bank->lock, flags);
_set_gpio_direction(bank, get_gpio_index(gpio), is_input);
spin_unlock_irqrestore(&bank->lock, flags);
}

static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
{
void __iomem *reg = bank->base;
Expand Down Expand Up @@ -1741,7 +1728,6 @@ static int __init omap_gpio_sysinit(void)

EXPORT_SYMBOL(omap_request_gpio);
EXPORT_SYMBOL(omap_free_gpio);
EXPORT_SYMBOL(omap_set_gpio_direction);

arch_initcall(omap_gpio_sysinit);

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/plat-omap/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
extern int omap_gpio_init(void); /* Call from board init only */
extern int omap_request_gpio(int gpio);
extern void omap_free_gpio(int gpio);
extern void omap_set_gpio_direction(int gpio, int is_input);
extern void omap2_gpio_prepare_for_retention(void);
extern void omap2_gpio_resume_after_retention(void);
extern void omap_set_gpio_debounce(int gpio, int enable);
Expand Down

0 comments on commit 72cdc9f

Please sign in to comment.