Diff
Modified: trunk/arch/blackfin/kernel/bfin_gpio.c (4087 => 4088)
--- trunk/arch/blackfin/kernel/bfin_gpio.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/arch/blackfin/kernel/bfin_gpio.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -229,6 +229,11 @@
}
#endif
+void gpio_error(unsigned gpio)
+{
+ printk(KERN_ERR "bfin-gpio: GPIO %d wasn't requested!\n", gpio);
+}
+
static void set_label(unsigned short ident, const char *label)
{
@@ -1034,7 +1039,7 @@
* MODIFICATION HISTORY :
**************************************************************/
-int gpio_request(unsigned short gpio, const char *label)
+int gpio_request(unsigned gpio, const char *label)
{
unsigned long flags;
@@ -1081,7 +1086,7 @@
}
EXPORT_SYMBOL(gpio_request);
-void gpio_free(unsigned short gpio)
+void gpio_free(unsigned gpio)
{
unsigned long flags;
@@ -1091,7 +1096,7 @@
local_irq_save(flags);
if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
- printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio);
+ gpio_error(gpio);
dump_stack();
local_irq_restore(flags);
return;
@@ -1107,34 +1112,47 @@
}
EXPORT_SYMBOL(gpio_free);
+
#ifdef BF548_FAMILY
-void gpio_direction_input(unsigned short gpio)
+int gpio_direction_input(unsigned gpio)
{
unsigned long flags;
- BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+ if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
+ gpio_error(gpio);
+ return -EINVAL;
+ }
+
local_irq_save(flags);
gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio);
gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio);
local_irq_restore(flags);
+
+ return 0;
}
EXPORT_SYMBOL(gpio_direction_input);
-void gpio_direction_output(unsigned short gpio)
+int gpio_direction_output(unsigned gpio, int value)
{
unsigned long flags;
- BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+ if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
+ gpio_error(gpio);
+ return -EINVAL;
+ }
local_irq_save(flags);
gpio_array[gpio_bank(gpio)]->port_inen &= ~gpio_bit(gpio);
+ gpio_set_value(gpio, value);
gpio_array[gpio_bank(gpio)]->port_dir_set = gpio_bit(gpio);
local_irq_restore(flags);
+
+ return 0;
}
EXPORT_SYMBOL(gpio_direction_output);
-void gpio_set_value(unsigned short gpio, unsigned short arg)
+void gpio_set_value(unsigned gpio, int arg)
{
if (arg)
gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio);
@@ -1144,7 +1162,7 @@
}
EXPORT_SYMBOL(gpio_set_value);
-unsigned short gpio_get_value(unsigned short gpio)
+int gpio_get_value(unsigned gpio)
{
return (1 & (gpio_array[gpio_bank(gpio)]->port_data >> gpio_sub_n(gpio)));
}
@@ -1152,31 +1170,42 @@
#else
-void gpio_direction_input(unsigned short gpio)
+int gpio_direction_input(unsigned gpio)
{
unsigned long flags;
- BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+ if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
+ gpio_error(gpio);
+ return -EINVAL;
+ }
local_irq_save(flags);
gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio);
gpio_bankb[gpio_bank(gpio)]->inen |= gpio_bit(gpio);
AWA_DUMMY_READ(inen);
local_irq_restore(flags);
+
+ return 0;
}
EXPORT_SYMBOL(gpio_direction_input);
-void gpio_direction_output(unsigned short gpio)
+int gpio_direction_output(unsigned gpio, int value)
{
unsigned long flags;
- BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+ if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
+ gpio_error(gpio);
+ return -EINVAL;
+ }
local_irq_save(flags);
gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
+ gpio_set_value(gpio, value);
gpio_bankb[gpio_bank(gpio)]->dir |= gpio_bit(gpio);
AWA_DUMMY_READ(dir);
local_irq_restore(flags);
+
+ return 0;
}
EXPORT_SYMBOL(gpio_direction_output);
Modified: trunk/arch/blackfin/mach-bf527/boards/ezkit.c (4087 => 4088)
--- trunk/arch/blackfin/mach-bf527/boards/ezkit.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/arch/blackfin/mach-bf527/boards/ezkit.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -317,12 +317,7 @@
void sl811_port_power(struct device *dev, int is_on)
{
gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
- gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS);
-
- if (is_on)
- gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
- else
- gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
+ gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
}
#endif
Modified: trunk/arch/blackfin/mach-bf537/boards/generic_board.c (4087 => 4088)
--- trunk/arch/blackfin/mach-bf537/boards/generic_board.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/arch/blackfin/mach-bf537/boards/generic_board.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -205,12 +205,8 @@
void sl811_port_power(struct device *dev, int is_on)
{
gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
- gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS);
+ gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
- if (is_on)
- gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
- else
- gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
}
#endif
Modified: trunk/arch/blackfin/mach-bf537/boards/pnav10.c (4087 => 4088)
--- trunk/arch/blackfin/mach-bf537/boards/pnav10.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/arch/blackfin/mach-bf537/boards/pnav10.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -134,12 +134,8 @@
void sl811_port_power(struct device *dev, int is_on)
{
gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
- gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS);
+ gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
- if (is_on)
- gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
- else
- gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
}
#endif
Modified: trunk/drivers/char/ad9960.c (4087 => 4088)
--- trunk/drivers/char/ad9960.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/char/ad9960.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -666,8 +666,7 @@
return -EFAULT;
}
- gpio_direction_output(CONFIG_AD9960_TX_RX_PIN);
- gpio_set_value(CONFIG_AD9960_TX_RX_PIN, 1);
+ gpio_direction_output(CONFIG_AD9960_TX_RX_PIN, 1);
bfin_write_TIMER0_CONFIG(bfin_read_TIMER0_CONFIG() | OUT_DIS);
SSYNC();
Modified: trunk/drivers/char/bfin_pflags.c (4087 => 4088)
--- trunk/drivers/char/bfin_pflags.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/char/bfin_pflags.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -254,14 +254,11 @@
switch (*buf) {
case '0':
- gpio_set_value(minor, 0);
+ gpio_direction_output(minor, 0);
break;
case '1':
- gpio_set_value(minor, 1);
+ gpio_direction_output(minor, 1);
break;
- case 'T':
- set_gpio_toggle(minor);
- break;
default:
return -EINVAL;
}
Modified: trunk/drivers/char/bfin_ppifcd.c (4087 => 4088)
--- trunk/drivers/char/bfin_ppifcd.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/char/bfin_ppifcd.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -288,8 +288,7 @@
return -EFAULT;
}
- gpio_direction_output(pdev->ppi_trigger_gpio);
- gpio_set_value(pdev->ppi_trigger_gpio, 0);
+ gpio_direction_output(pdev->ppi_trigger_gpio, 0);
break;
}
case CMD_PPI_GET_ALLCONFIG:
Modified: trunk/drivers/char/bfin_sport.c (4087 => 4088)
--- trunk/drivers/char/bfin_sport.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/char/bfin_sport.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -693,15 +693,13 @@
case ENABLE_AD73311:
#define GPIO_SE 4
gpio_request(GPIO_SE, "AD73311 SE");
- gpio_direction_output(GPIO_SE);
+ gpio_direction_output(GPIO_SE, arg);
- if (arg == 0) { /* Disable ad73311 */
- /* Pull down SE pin on AD73311 */
- gpio_set_value(GPIO_SE, 0);
- } else if (arg == 1) { /* Enable ad73311 */
- gpio_set_value(GPIO_SE, 1);
- }
- break;
+ /* arg = 0 Disable ad73311 Pull down SE pin on AD73311
+ * arg = 1 Enable ad73311
+ */
+ break;
+
default:
return -EINVAL;
}
Modified: trunk/drivers/char/can4linux/bf537funcs.c (4087 => 4088)
--- trunk/drivers/char/can4linux/bf537funcs.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/char/can4linux/bf537funcs.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -8,7 +8,7 @@
*
*
* Copyright (c) 2003-2006 port GmbH Halle/Saale
- * (c) 2006 Heinz-J\xFCrgen Oertel ([EMAIL PROTECTED])
+ * (c) 2006 Heinz-J�rgen Oertel ([EMAIL PROTECTED])
*------------------------------------------------------------------
* $Header: /cvsroot/uclinux533/uClinux-dist/linux-2.6.x/drivers/char/can4linux/bf537funcs.c,v 1.3 2006/06/28 01:51:33 magicyang Exp $
*
@@ -717,7 +717,7 @@
peripheral_free_list(bfin_can_pin_req);
return -EBUSY;
}
- gpio_direction_output(TIME_MEASURE_GPIO);
+ gpio_direction_output(TIME_MEASURE_GPIO, 0);
#endif
/* Request the controllers address space */
@@ -772,27 +772,24 @@
int err=0;
DBGin("Can_RequestIrq");
- /*
+ /*
+ *int request_irq(unsigned int irq, // interrupt number
+ * void (*handler)(int, void *, struct pt_regs *), // pointer to ISR
+ * irq, dev_id, registers on stack
+ * unsigned long irqflags, const char *devname,
+ * void *dev_id);
+ *
+ * dev_id - The device ID of this handler (see below).
+ * This parameter is usually set to NULL,
+ * but should be non-null if you wish to do IRQ sharing.
+ * This doesn't matter when hooking the
+ * interrupt, but is required so that, when free_irq() is
+ * called, the correct driver is unhooked. Since this is a
+ * void *, it can point to anything (such as a device-spe�
+ * cific structure, or even empty space), but make sure you
+ * pass the same pointer to free_irq()
+ */
- int request_irq(unsigned int irq, // interrupt number
- void (*handler)(int, void *, struct pt_regs *), // pointer to ISR
- irq, dev_id, registers on stack
- unsigned long irqflags, const char *devname,
- void *dev_id);
-
- dev_id - The device ID of this handler (see below).
- This parameter is usually set to NULL,
- but should be non-null if you wish to do IRQ sharing.
- This doesn't matter when hooking the
- interrupt, but is required so that, when free_irq() is
- called, the correct driver is unhooked. Since this is a
- void *, it can point to anything (such as a device-spe\xAD
- cific structure, or even empty space), but make sure you
- pass the same pointer to free_irq().
-
- */
-
-
/* we don't need to share the Interrupt with any other driver
* request_irq doeas not need the IRQF_SHARED flag */
err |= request_irq(irq, handler, IRQF_DISABLED, \
@@ -874,13 +871,13 @@
* |||||||||||________________________
*
*
- * Interruot Latency from CAN EOF to Strt ISR app. 6 \xB5s
- * Within the ISR, it takes about 7\xB5s to call do_gettimeofday()
+ * Interruot Latency from CAN EOF to Strt ISR app. 6 �s
+ * Within the ISR, it takes about 7�s to call do_gettimeofday()
* Using the set_led() and reset_led() functions takes app. 200ns
* for each call.
- * The receive ISR lasts for about 15 \xB5s (without do_gettimeofday())
+ * The receive ISR lasts for about 15 �s (without do_gettimeofday())
* Another time consuming thing is wake_up_interruptible()
- * which takes about 10\xB5s
+ * which takes about 10�s
*
* #define IRQ_CAN_RX 22
* #define IRQ_CAN_TX 23
@@ -995,7 +992,7 @@
/* Getting a precises time takes a lot of time
- * (additional 7 \xB5s of ISR time )
+ * (additional 7 �s of ISR time )
* if a time stamp is not needed, it can be switched of
* by ioctl() */
if(timestamp[minor]) {
Modified: trunk/drivers/i2c/busses/i2c-gpio.c (4087 => 4088)
--- trunk/drivers/i2c/busses/i2c-gpio.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/i2c/busses/i2c-gpio.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -24,8 +24,7 @@
if (state)
gpio_direction_input(pdata->sda_pin);
else {
- gpio_direction_output(pdata->sda_pin);
- gpio_set_value(pdata->sda_pin, 0);
+ gpio_direction_output(pdata->sda_pin, 0);
}
}
@@ -50,8 +49,7 @@
gpio_direction_input(pdata->scl_pin);
else {
- gpio_direction_output(pdata->sda_pin);
- gpio_set_value(pdata->sda_pin, 0);
+ gpio_direction_output(pdata->sda_pin, 0);
}
}
@@ -109,8 +107,7 @@
goto err_request_scl;
if (pdata->sda_is_open_drain) {
- gpio_direction_output(pdata->sda_pin);
- gpio_set_value(pdata->scl_pin, 1);
+ gpio_direction_output(pdata->sda_pin, 1);
bit_data->setsda = i2c_gpio_setsda_val;
} else {
gpio_direction_input(pdata->sda_pin);
@@ -118,8 +115,7 @@
}
if (pdata->scl_is_open_drain || pdata->scl_is_output_only) {
- gpio_direction_output(pdata->scl_pin);
- gpio_set_value(pdata->scl_pin, 1);
+ gpio_direction_output(pdata->scl_pin, 1);
bit_data->setscl = i2c_gpio_setscl_val;
} else {
gpio_direction_input(pdata->scl_pin);
Modified: trunk/drivers/media/video/blackfin/blackfin_cam.c (4087 => 4088)
--- trunk/drivers/media/video/blackfin/blackfin_cam.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/media/video/blackfin/blackfin_cam.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -1434,20 +1434,17 @@
return;
}
- gpio_direction_output(bcap_LEDS);
+ gpio_direction_output(bcap_LEDS, 1);
/* this will flash the LEDs to say hello */
- gpio_set_value(bcap_LEDS, 1);
mdelay(1);
gpio_set_value(bcap_LEDS, 0);
/* Set trigger mode */
- gpio_direction_output(bcap_TRIGGER);
- gpio_set_value(bcap_TRIGGER, 0);
+ gpio_direction_output(bcap_TRIGGER, 0);
/* Take out of standby mode */
- gpio_direction_output(bcap_STANDBY);
- gpio_set_value(bcap_STANDBY, 0);
+ gpio_direction_output(bcap_STANDBY, 0);
#endif
@@ -1494,8 +1491,7 @@
return -EBUSY;
}
- gpio_direction_output(GPIO_3);
- gpio_set_value(bcap_FS3, 0);
+ gpio_direction_output(bcap_FS3, 0);
#endif
err = setup_pin_mux(1);
Modified: trunk/drivers/media/video/blackfin/vs6624.c (4087 => 4088)
--- trunk/drivers/media/video/blackfin/vs6624.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/media/video/blackfin/vs6624.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -152,8 +152,7 @@
SENSOR_NAME, VS6624_PWDN);
return -EFAULT;
}
- gpio_direction_output(VS6624_PWDN);
- gpio_set_value(VS6624_PWDN, 1);
+ gpio_direction_output(VS6624_PWDN, 1);
mdelay(100);
} else {
gpio_direction_input(VS6624_PWDN);
Modified: trunk/drivers/mmc/spi_mmc/bfin_pio_spi.c (4087 => 4088)
--- trunk/drivers/mmc/spi_mmc/bfin_pio_spi.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/mmc/spi_mmc/bfin_pio_spi.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -123,7 +123,7 @@
printk(KERN_ERR DRV_NAME":bfin_pio_spi: Failed ro request GPIO_%d\n",
spi_ssel);
}
- gpio_direction_output(spi_ssel);
+ gpio_direction_output(spi_ssel, 1);
write_BAUD(0x0100);
Modified: trunk/drivers/mtd/maps/bf5xx-flash.c (4087 => 4088)
--- trunk/drivers/mtd/maps/bf5xx-flash.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/mtd/maps/bf5xx-flash.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -97,9 +97,8 @@
printk(KERN_ERR "BF5xx flash: Failed ro request GPIO_%d\n", CONFIG_ENET_FLASH_PIN);
return -EBUSY;
}
- gpio_direction_output(CONFIG_ENET_FLASH_PIN);
- return 0;
+ return gpio_direction_output(CONFIG_ENET_FLASH_PIN, 1);
}
#else
static inline int setup_pfpins(void) {return 0;}
Modified: trunk/drivers/usb/gadget/net2272.c (4087 => 4088)
--- trunk/drivers/usb/gadget/net2272.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/usb/gadget/net2272.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -2516,10 +2516,8 @@
gpio_free(GPIO_0);
return -EBUSY;
}
- gpio_direction_output(GPIO_0);
- gpio_direction_output(GPIO_1);
- gpio_set_value(GPIO_0, 0);
- gpio_set_value(GPIO_1, 1);
+ gpio_direction_output(GPIO_0, 0);
+ gpio_direction_output(GPIO_1, 1);
#endif
#if defined(CONFIG_BF533) || defined(CONFIG_BF561)
@@ -2529,9 +2527,8 @@
gpio_free(GPIO_1);
return -EBUSY;
}
- gpio_direction_output(GPIO_11);
+ gpio_direction_output(GPIO_11, 0);
/* Reset USB Chip */
- gpio_set_value(GPIO_11, 0);
/* Hold it for 2ms */
mdelay(2);
gpio_set_value(GPIO_11, 1);
@@ -2543,9 +2540,8 @@
return -EBUSY;
}
- gpio_direction_output(GPIO_6);
+ gpio_direction_output(GPIO_6, 0);
/* Reset USB Chip */
- gpio_set_value(GPIO_6, 0);
/* Hold it for 2ms */
mdelay(2);
gpio_set_value(GPIO_6, 1);
@@ -2556,8 +2552,7 @@
printk(KERN_ERR "net2272: Failed ro request GPIO_%d\n", GPIO_47);
return -EBUSY;
}
- gpio_direction_output(GPIO_47);
- gpio_set_value(GPIO_47, 0);
+ gpio_direction_output(GPIO_47, 0);
#endif
}
#endif
Modified: trunk/drivers/usb/musb/blackfin.c (4087 => 4088)
--- trunk/drivers/usb/musb/blackfin.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/usb/musb/blackfin.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -366,7 +366,7 @@
GPIO_USB_VRSEL);
return -ENODEV;
}
- gpio_direction_output(GPIO_USB_VRSEL);
+ gpio_direction_output(GPIO_USB_VRSEL, 0);
/* Anomaly #05000346 */
bfin_write_USB_APHY_CALIB(0x5411);
Modified: trunk/drivers/video/bf537-lq035.c (4087 => 4088)
--- trunk/drivers/video/bf537-lq035.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/video/bf537-lq035.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -439,11 +439,9 @@
return -EFAULT;
}
- gpio_direction_output(UD);
- gpio_direction_output(LBR);
+ gpio_direction_output(UD, 0);
+ gpio_direction_output(LBR, 1);
- gpio_set_value(UD,0);
- gpio_set_value(LBR,1);
#endif
if (gpio_request(MOD, DRIVER_NAME)) {
@@ -455,8 +453,7 @@
return -EFAULT;
}
- gpio_direction_output(MOD);
- gpio_set_value(MOD,1);
+ gpio_direction_output(MOD, 1);
SSYNC();
return 0;
Modified: trunk/drivers/video/bf54x-lq043.c (4087 => 4088)
--- trunk/drivers/video/bf54x-lq043.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/video/bf54x-lq043.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -264,8 +264,7 @@
}
}
- gpio_direction_output(disp);
- gpio_set_value(disp, 1);
+ gpio_direction_output(disp, 1);
return 0;
}
Modified: trunk/drivers/video/bfin_adv7393fb.c (4087 => 4088)
--- trunk/drivers/video/bfin_adv7393fb.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/video/bfin_adv7393fb.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -588,8 +588,7 @@
return -EBUSY;
}
- gpio_direction_output(GPIO_3);
- gpio_set_value(GPIO_3, 0);
+ gpio_direction_output(GPIO_3, 0);
#endif
Modified: trunk/drivers/video/hitachi-tx09.c (4087 => 4088)
--- trunk/drivers/video/hitachi-tx09.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/video/hitachi-tx09.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -351,10 +351,8 @@
return -EFAULT;
}
- gpio_set_value(PCI_PIN, 0);
+ gpio_direction_output(PCI_PIN, 0);
SSYNC();
- gpio_direction_output(PCI_PIN);
- SSYNC();
} else {
peripheral_free_list(ppi_req);
peripheral_free_list(tmr_req);
Modified: trunk/drivers/zaptel/bfsi-spi-framework.c (4087 => 4088)
--- trunk/drivers/zaptel/bfsi-spi-framework.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/zaptel/bfsi-spi-framework.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -542,9 +542,8 @@
PRINTK("Error: cannot set reset to this bit! \n");
gpio_request(reset_port[reset_bit], "bfsi: RESET");
PRINTK("toggle reset\n");
- gpio_direction_output(reset_port[reset_bit]);
+ gpio_direction_output(reset_port[reset_bit], 0);
PRINTK("set reset bit OK! \n");
- gpio_set_value(reset_port[reset_bit],0);
udelay(100);
gpio_set_value(reset_port[reset_bit],1);
Modified: trunk/drivers/zaptel/bfsi.c (4087 => 4088)
--- trunk/drivers/zaptel/bfsi.c 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/drivers/zaptel/bfsi.c 2008-01-10 11:57:13 UTC (rev 4088)
@@ -385,9 +385,8 @@
}
gpio_request(reset_port[reset_bit], "bfsi: RESET");
PRINTK("toggle reset\n");
- gpio_direction_output(reset_port[reset_bit]);
+ gpio_direction_output(reset_port[reset_bit], 0);
PRINTK("set reset bit OK! \n");
- gpio_set_value(reset_port[reset_bit],0);
udelay(100);
gpio_set_value(reset_port[reset_bit],1);
Modified: trunk/include/asm-blackfin/gpio.h (4087 => 4088)
--- trunk/include/asm-blackfin/gpio.h 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/include/asm-blackfin/gpio.h 2008-01-10 11:57:13 UTC (rev 4088)
@@ -426,19 +426,19 @@
* MODIFICATION HISTORY :
**************************************************************/
-int gpio_request(unsigned short, const char *);
-void gpio_free(unsigned short);
+int gpio_request(unsigned, const char *);
+void gpio_free(unsigned);
-void gpio_set_value(unsigned short gpio, unsigned short arg);
-unsigned short gpio_get_value(unsigned short gpio);
+void gpio_set_value(unsigned gpio, int arg);
+int gpio_get_value(unsigned gpio);
#ifndef BF548_FAMILY
#define gpio_get_value(gpio) get_gpio_data(gpio)
#define gpio_set_value(gpio, value) set_gpio_data(gpio, value)
#endif
-void gpio_direction_input(unsigned short gpio);
-void gpio_direction_output(unsigned short gpio);
+int gpio_direction_input(unsigned gpio);
+int gpio_direction_output(unsigned gpio, int value);
#include <asm-generic/gpio.h> /* cansleep wrappers */
#include <asm/irq.h>
Modified: trunk/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h (4087 => 4088)
--- trunk/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h 2008-01-10 11:57:13 UTC (rev 4088)
@@ -163,7 +163,7 @@
if (uart->rts_pin >= 0) {
gpio_request(uart->rts_pin, DRIVER_NAME);
- gpio_direction_output(uart->rts_pin);
+ gpio_direction_output(uart->rts_pin, 0);
}
#endif
}
Modified: trunk/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h (4087 => 4088)
--- trunk/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h 2008-01-10 11:57:13 UTC (rev 4088)
@@ -131,7 +131,7 @@
}
if (uart->rts_pin >= 0) {
gpio_request(uart->rts_pin, DRIVER_NAME);
- gpio_direction_input(uart->rts_pin);
+ gpio_direction_input(uart->rts_pin, 0);
}
#endif
}
Modified: trunk/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h (4087 => 4088)
--- trunk/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h 2008-01-10 11:57:13 UTC (rev 4088)
@@ -163,7 +163,7 @@
if (uart->rts_pin >= 0) {
gpio_request(uart->rts_pin, DRIVER_NAME);
- gpio_direction_output(uart->rts_pin);
+ gpio_direction_output(uart->rts_pin, 0);
}
#endif
}
Modified: trunk/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h (4087 => 4088)
--- trunk/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h 2008-01-10 11:57:13 UTC (rev 4088)
@@ -187,7 +187,7 @@
if (uart->rts_pin >= 0) {
gpio_request(uart->rts_pin, DRIVER_NAME);
- gpio_direction_output(uart->rts_pin);
+ gpio_direction_output(uart->rts_pin, 0);
}
#endif
}
Modified: trunk/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h (4087 => 4088)
--- trunk/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h 2008-01-10 11:11:30 UTC (rev 4087)
+++ trunk/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h 2008-01-10 11:57:13 UTC (rev 4088)
@@ -131,7 +131,7 @@
}
if (uart->rts_pin >= 0) {
gpio_request(uart->rts_pin, DRIVER_NAME);
- gpio_direction_input(uart->rts_pin);
+ gpio_direction_input(uart->rts_pin, 0);
}
#endif
}