Commit 7270f33b authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

use standard gpio get/set calls (OMAP tree only)

This patch replaces some legacy OMAP GPIO calls with the "new" (not
really, any more!) calls that work on most platforms.

The calls addressed by this patch are the simple ones to get and set
values ... for code that has NOT merged to mainline.

Except for the Documentation file, all of these changes were performed
by a simple SED script.  A few "if() set() else set()" branches were
merged by hand.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent a47ac925
......@@ -9,6 +9,21 @@ or less GPIOs) to other OMAP processors as well.
If anything is missing, is wrong, needs extension or update, please send
update to Linux-omap-open-source@linux.omap.com.
*************************************************************
NOTICE: these OMAP-specific interfaces are deprecated/obsolete.
See Documentation/gpio.txt for information on the standard
cross-platform GPIO interface. All new code should use those
calls instead of the ones described here.
The only exception to that policy is the omap_cfg_reg() call,
which isn't a GPIO-specific interface; it configures how chip
functions are multiplexed to pins, with GPIO being only one
of those functions.
*************************************************************
I. GPIO Modules/Banks
---------------------
......
......@@ -227,7 +227,7 @@ static void ads7846_dev_init(void)
static int ads7846_get_pendown_state(void)
{
return !omap_get_gpio_datain(TS_GPIO);
return !gpio_get_value(TS_GPIO);
}
static struct ads7846_platform_data tsc2046_config __initdata = {
......@@ -421,7 +421,7 @@ static void __init omap_2430sdp_init(void)
/* turn off secondary LCD backlight */
omap_set_gpio_direction(SECONDARY_LCD_GPIO, 0);
omap_set_gpio_dataout(SECONDARY_LCD_GPIO, 0);
gpio_set_value(SECONDARY_LCD_GPIO, 0);
}
static void __init omap_2430sdp_map_io(void)
......
......@@ -179,7 +179,7 @@ static void ads7846_dev_init(void)
static int ads7846_get_pendown_state(void)
{
return !omap_get_gpio_datain(ts_gpio);
return !gpio_get_value(ts_gpio);
}
/*
......
......@@ -110,7 +110,7 @@ static void ads7846_dev_init(void)
static int ads7846_get_pendown_state(void)
{
return !omap_get_gpio_datain(ts_gpio);
return !gpio_get_value(ts_gpio);
}
/*
......
......@@ -172,7 +172,7 @@ static int tcm825x_power_on(void)
retu_write_reg(RETU_REG_CTRL_SET, 0x0080);
msleep(1);
omap_set_gpio_dataout(N800_CAM_SENSOR_RESET_GPIO, 1);
gpio_set_value(N800_CAM_SENSOR_RESET_GPIO, 1);
msleep(1);
saturated_count = 0;
......@@ -185,7 +185,7 @@ static int tcm825x_power_off(void)
{
int ret;
omap_set_gpio_dataout(N800_CAM_SENSOR_RESET_GPIO, 0);
gpio_set_value(N800_CAM_SENSOR_RESET_GPIO, 0);
msleep(1);
/* Set VSim1 off */
......@@ -363,7 +363,7 @@ void __init n800_cam_init(void)
return;
}
omap_set_gpio_dataout(N800_CAM_SENSOR_RESET_GPIO, 0);
gpio_set_value(N800_CAM_SENSOR_RESET_GPIO, 0);
omap_set_gpio_direction(N800_CAM_SENSOR_RESET_GPIO, 0);
sensor_okay = 1;
......
......@@ -42,10 +42,7 @@ static int n800_mmc_switch_slot(struct device *dev, int slot)
#ifdef CONFIG_MMC_DEBUG
dev_dbg(dev, "Choose slot %d\n", slot + 1);
#endif
if (slot == 0)
omap_set_gpio_dataout(slot_switch_gpio, 0);
else
omap_set_gpio_dataout(slot_switch_gpio, 1);
gpio_set_value(slot_switch_gpio, slot);
return 0;
}
......@@ -125,14 +122,14 @@ static void nokia_mmc_set_power_internal(struct device *dev,
power_on ? "on" : "off");
if (power_on) {
omap_set_gpio_dataout(n810_slot2_pw_vddf, 1);
gpio_set_value(n810_slot2_pw_vddf, 1);
udelay(30);
omap_set_gpio_dataout(n810_slot2_pw_vdd, 1);
gpio_set_value(n810_slot2_pw_vdd, 1);
udelay(100);
} else {
omap_set_gpio_dataout(n810_slot2_pw_vdd, 0);
gpio_set_value(n810_slot2_pw_vdd, 0);
msleep(50);
omap_set_gpio_dataout(n810_slot2_pw_vddf, 0);
gpio_set_value(n810_slot2_pw_vddf, 0);
msleep(50);
}
}
......@@ -349,18 +346,18 @@ void __init n800_mmc_init(void)
if (omap_request_gpio(slot_switch_gpio) < 0)
BUG();
omap_set_gpio_dataout(slot_switch_gpio, 0);
gpio_set_value(slot_switch_gpio, 0);
omap_set_gpio_direction(slot_switch_gpio, 0);
if (machine_is_nokia_n810()) {
if (omap_request_gpio(n810_slot2_pw_vddf) < 0)
BUG();
omap_set_gpio_dataout(n810_slot2_pw_vddf, 0);
gpio_set_value(n810_slot2_pw_vddf, 0);
omap_set_gpio_direction(n810_slot2_pw_vddf, 0);
if (omap_request_gpio(n810_slot2_pw_vdd) < 0)
BUG();
omap_set_gpio_dataout(n810_slot2_pw_vdd, 0);
gpio_set_value(n810_slot2_pw_vdd, 0);
omap_set_gpio_direction(n810_slot2_pw_vdd, 0);
}
......
......@@ -99,12 +99,12 @@ static int tusb_set_power(int state)
int i, retval = 0;
if (state) {
omap_set_gpio_dataout(GPIO_TUSB_ENABLE, 1);
gpio_set_value(GPIO_TUSB_ENABLE, 1);
msleep(1);
/* Wait until TUSB6010 pulls INT pin down */
i = 100;
while (i && omap_get_gpio_datain(GPIO_TUSB_INT)) {
while (i && gpio_get_value(GPIO_TUSB_INT)) {
msleep(1);
i--;
}
......@@ -114,7 +114,7 @@ static int tusb_set_power(int state)
retval = -ENODEV;
}
} else {
omap_set_gpio_dataout(GPIO_TUSB_ENABLE, 0);
gpio_set_value(GPIO_TUSB_ENABLE, 0);
msleep(10);
}
......
......@@ -134,7 +134,7 @@ void __init nokia_n800_init_irq(void)
}
omap_set_gpio_direction(N800_STI_GPIO, 0);
omap_set_gpio_dataout(N800_STI_GPIO, 0);
gpio_set_value(N800_STI_GPIO, 0);
#endif
}
......@@ -178,7 +178,7 @@ static void mipid_shutdown(struct mipid_platform_data *pdata)
{
if (pdata->nreset_gpio != -1) {
pr_info("shutdown LCD\n");
omap_set_gpio_dataout(pdata->nreset_gpio, 0);
gpio_set_value(pdata->nreset_gpio, 0);
msleep(120);
}
}
......@@ -232,12 +232,12 @@ static void blizzard_power_up(struct device *dev)
msleep(10);
blizzard_enable_clocks(1);
omap_set_gpio_dataout(N800_BLIZZARD_POWERDOWN_GPIO, 1);
gpio_set_value(N800_BLIZZARD_POWERDOWN_GPIO, 1);
}
static void blizzard_power_down(struct device *dev)
{
omap_set_gpio_dataout(N800_BLIZZARD_POWERDOWN_GPIO, 0);
gpio_set_value(N800_BLIZZARD_POWERDOWN_GPIO, 0);
blizzard_enable_clocks(0);
/* Vcore to 1.005V */
......@@ -259,7 +259,7 @@ static void __init blizzard_dev_init(void)
if (r < 0)
return;
omap_set_gpio_direction(N800_BLIZZARD_POWERDOWN_GPIO, 0);
omap_set_gpio_dataout(N800_BLIZZARD_POWERDOWN_GPIO, 1);
gpio_set_value(N800_BLIZZARD_POWERDOWN_GPIO, 1);
blizzard_get_clocks();
omapfb_set_ctrl_platform_data(&n800_blizzard_data);
......@@ -341,7 +341,7 @@ static int __init tea5761_dev_init(void)
omap_set_gpio_direction(enable_gpio, 0);
udelay(50);
omap_set_gpio_dataout(enable_gpio, 1);
gpio_set_value(enable_gpio, 1);
}
return 0;
......
......@@ -214,7 +214,7 @@ static void ads7846_dev_init(void)
static int ads7846_get_pendown_state(void)
{
return !omap_get_gpio_datain(OMAP2_EVM_TS_GPIO);
return !gpio_get_value(OMAP2_EVM_TS_GPIO);
}
struct ads7846_platform_data ads7846_config = {
......
......@@ -184,7 +184,7 @@ static void ads7846_dev_init(void)
static int ads7846_get_pendown_state(void)
{
return !omap_get_gpio_datain(OMAP3_EVM_TS_GPIO);
return !gpio_get_value(OMAP3_EVM_TS_GPIO);
}
struct ads7846_platform_data ads7846_config = {
......
......@@ -106,7 +106,7 @@ static int gpio_sw_get_state(struct gpio_switch *sw)
{
int state;
state = omap_get_gpio_datain(sw->gpio);
state = gpio_get_value(sw->gpio);
if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED)
state = !state;
......@@ -139,7 +139,7 @@ static ssize_t gpio_sw_state_store(struct device *dev,
if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED)
enable = !enable;
omap_set_gpio_dataout(sw->gpio, enable);
gpio_set_value(sw->gpio, enable);
return count;
}
......@@ -190,7 +190,7 @@ static irqreturn_t gpio_sw_irq_handler(int irq, void *arg)
int state;
if (!sw->both_edges) {
if (omap_get_gpio_datain(sw->gpio))
if (gpio_get_value(sw->gpio))
set_irq_type(OMAP_GPIO_IRQ(sw->gpio), IRQ_TYPE_EDGE_FALLING);
else
set_irq_type(OMAP_GPIO_IRQ(sw->gpio), IRQ_TYPE_EDGE_RISING);
......@@ -305,7 +305,7 @@ static int __init new_switch(struct gpio_switch *sw)
trigger = IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING;
sw->both_edges = 1;
} else {
if (omap_get_gpio_datain(sw->gpio))
if (gpio_get_value(sw->gpio))
trigger = IRQF_TRIGGER_FALLING;
else
trigger = IRQF_TRIGGER_RISING;
......@@ -465,7 +465,7 @@ static void __init report_initial_state(void)
list_for_each_entry(sw, &gpio_switches, node) {
int state;
state = omap_get_gpio_datain(sw->gpio);
state = gpio_get_value(sw->gpio);
if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED)
state = !state;
if (sw->notify != NULL)
......
......@@ -181,9 +181,9 @@ static void brf6150_disable_pm_tx(struct brf6150_info *info)
{
if (info->pm_enabled) {
info->tx_pm_enabled = 0;
omap_set_gpio_dataout(info->btinfo->bt_wakeup_gpio, 1);
gpio_set_value(info->btinfo->bt_wakeup_gpio, 1);
}
if (omap_get_gpio_datain(info->btinfo->host_wakeup_gpio))
if (gpio_get_value(info->btinfo->host_wakeup_gpio))
tasklet_schedule(&info->tx_task);
}
......@@ -193,7 +193,7 @@ static void brf6150_pm_timer(unsigned long data)
info = (struct brf6150_info *)data;
if (info->tx_pm_enabled && info->rx_pm_enabled && !test_bit(HCI_INQUIRY, &info->hdev->flags))
omap_set_gpio_dataout(info->btinfo->bt_wakeup_gpio, 0);
gpio_set_value(info->btinfo->bt_wakeup_gpio, 0);
else
mod_timer(&info->pm_timer, jiffies + msecs_to_jiffies(PM_TIMEOUT));
}
......@@ -624,7 +624,7 @@ static irqreturn_t brf6150_wakeup_interrupt(int irq, void *dev_inst)
unsigned long flags;
spin_lock_irqsave(&info->lock, flags);
should_wakeup = omap_get_gpio_datain(info->btinfo->host_wakeup_gpio);
should_wakeup = gpio_get_value(info->btinfo->host_wakeup_gpio);
NBT_DBG_POWER("gpio interrupt %d\n", should_wakeup);
if (should_wakeup) {
clk_enable(info->uart_ck);
......@@ -671,14 +671,14 @@ static int brf6150_init_uart(struct brf6150_info *info)
static int brf6150_reset(struct brf6150_info *info)
{
omap_set_gpio_dataout(info->btinfo->bt_wakeup_gpio, 0);
omap_set_gpio_dataout(info->btinfo->reset_gpio, 0);
gpio_set_value(info->btinfo->bt_wakeup_gpio, 0);
gpio_set_value(info->btinfo->reset_gpio, 0);
current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout(msecs_to_jiffies(10));
omap_set_gpio_dataout(info->btinfo->bt_wakeup_gpio, 1);
gpio_set_value(info->btinfo->bt_wakeup_gpio, 1);
current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout(msecs_to_jiffies(100));
omap_set_gpio_dataout(info->btinfo->reset_gpio, 1);
gpio_set_value(info->btinfo->reset_gpio, 1);
current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout(msecs_to_jiffies(100));
......@@ -786,7 +786,7 @@ static int brf6150_hci_close(struct hci_dev *hdev)
brf6150_hci_flush(hdev);
clk_disable(info->uart_ck);
del_timer_sync(&info->pm_timer);
omap_set_gpio_dataout(info->btinfo->bt_wakeup_gpio, 0);
gpio_set_value(info->btinfo->bt_wakeup_gpio, 0);
set_irq_type(OMAP_GPIO_IRQ(info->btinfo->host_wakeup_gpio), IRQ_TYPE_NONE);
return 0;
......
......@@ -102,7 +102,7 @@ static void hci_h4p_enable_tx(struct hci_h4p_info *info)
if (info->tx_pm_enabled) {
info->tx_pm_enabled = 0;
hci_h4p_set_clk(info, &info->tx_clocks_en, 1);
omap_set_gpio_dataout(info->bt_wakeup_gpio, 1);
gpio_set_value(info->bt_wakeup_gpio, 1);
}
}
......@@ -115,7 +115,7 @@ static void hci_h4p_tx_pm_timer(unsigned long data)
info = (struct hci_h4p_info *)data;
if (hci_h4p_inb(info, UART_LSR) & UART_LSR_TEMT) {
omap_set_gpio_dataout(info->bt_wakeup_gpio, 0);
gpio_set_value(info->bt_wakeup_gpio, 0);
hci_h4p_set_clk(info, &info->tx_clocks_en, 0);
info->tx_pm_enabled = 1;
}
......@@ -527,7 +527,7 @@ static irqreturn_t hci_h4p_wakeup_interrupt(int irq, void *dev_inst)
if (!test_bit(HCI_RUNNING, &hdev->flags))
return IRQ_HANDLED;
should_wakeup = omap_get_gpio_datain(info->host_wakeup_gpio);
should_wakeup = gpio_get_value(info->host_wakeup_gpio);
NBT_DBG_POWER("gpio interrupt %d\n", should_wakeup);
if (should_wakeup) {
hci_h4p_enable_rx(info);
......@@ -545,10 +545,10 @@ static int hci_h4p_reset(struct hci_h4p_info *info)
hci_h4p_init_uart(info);
hci_h4p_set_rts(info, 0);
omap_set_gpio_dataout(info->reset_gpio, 0);
gpio_set_value(info->reset_gpio, 0);
msleep(100);
omap_set_gpio_dataout(info->bt_wakeup_gpio, 1);
omap_set_gpio_dataout(info->reset_gpio, 1);
gpio_set_value(info->bt_wakeup_gpio, 1);
gpio_set_value(info->reset_gpio, 1);
msleep(100);
err = hci_h4p_wait_for_cts(info, 1, 10);
......@@ -646,8 +646,8 @@ err_clean:
hci_h4p_reset_uart(info);
hci_h4p_set_clk(info, &info->tx_clocks_en, 0);
hci_h4p_set_clk(info, &info->rx_clocks_en, 0);
omap_set_gpio_dataout(info->reset_gpio, 0);
omap_set_gpio_dataout(info->bt_wakeup_gpio, 0);
gpio_set_value(info->reset_gpio, 0);
gpio_set_value(info->bt_wakeup_gpio, 0);
skb_queue_purge(&fw_queue);
kfree_skb(neg_cmd_skb);
neg_cmd_skb = NULL;
......@@ -675,8 +675,8 @@ static int hci_h4p_hci_close(struct hci_dev *hdev)
hci_h4p_reset_uart(info);
hci_h4p_set_clk(info, &info->tx_clocks_en, 0);
hci_h4p_set_clk(info, &info->rx_clocks_en, 0);
omap_set_gpio_dataout(info->reset_gpio, 0);
omap_set_gpio_dataout(info->bt_wakeup_gpio, 0);
gpio_set_value(info->reset_gpio, 0);
gpio_set_value(info->bt_wakeup_gpio, 0);
kfree_skb(info->rx_skb);
return 0;
......@@ -944,7 +944,7 @@ static int hci_h4p_probe(struct platform_device *pdev)
dev_err(info->dev, "failed to register hci_h4p hci device\n");
goto cleanup_irq;
}
omap_set_gpio_dataout(info->reset_gpio, 0);
gpio_set_value(info->reset_gpio, 0);
return 0;
......@@ -952,7 +952,7 @@ cleanup_irq:
free_irq(irq, (void *)info);
free_irq(OMAP_GPIO_IRQ(info->host_wakeup_gpio), (void *)info);
cleanup:
omap_set_gpio_dataout(info->reset_gpio, 0);
gpio_set_value(info->reset_gpio, 0);
omap_free_gpio(info->reset_gpio);
omap_free_gpio(info->bt_wakeup_gpio);
omap_free_gpio(info->host_wakeup_gpio);
......
......@@ -102,28 +102,28 @@ static u8 cbus_receive_bit(struct cbus_host *host, u32 base)
#else
#define cbus_set_gpio_direction(base, gpio, is_input) omap_set_gpio_direction(gpio, is_input)
#define cbus_set_gpio_dataout(base, gpio, enable) omap_set_gpio_dataout(gpio, enable)
#define cbus_get_gpio_datain(base, int, gpio) omap_get_gpio_datain(gpio)
#define cbus_set_gpio_dataout(base, gpio, enable) gpio_set_value(gpio, enable)
#define cbus_get_gpio_datain(base, int, gpio) gpio_get_value(gpio)
static void _cbus_send_bit(struct cbus_host *host, int bit, int set_to_input)
{
omap_set_gpio_dataout(host->dat_gpio, bit ? 1 : 0);
omap_set_gpio_dataout(host->clk_gpio, 1);
gpio_set_value(host->dat_gpio, bit ? 1 : 0);
gpio_set_value(host->clk_gpio, 1);
/* The data bit is read on the rising edge of CLK */
if (set_to_input)
omap_set_gpio_direction(host->dat_gpio, 1);
omap_set_gpio_dataout(host->clk_gpio, 0);
gpio_set_value(host->clk_gpio, 0);
}
static u8 _cbus_receive_bit(struct cbus_host *host)
{
u8 ret;
omap_set_gpio_dataout(host->clk_gpio, 1);
ret = omap_get_gpio_datain(host->dat_gpio);
omap_set_gpio_dataout(host->clk_gpio, 0);
gpio_set_value(host->clk_gpio, 1);
ret = gpio_get_value(host->dat_gpio);
gpio_set_value(host->clk_gpio, 0);
return ret;
}
......@@ -260,15 +260,15 @@ int __init cbus_bus_init(void)
if ((ret = omap_request_gpio(chost->sel_gpio)) < 0)
goto exit3;
omap_set_gpio_dataout(chost->clk_gpio, 0);
omap_set_gpio_dataout(chost->sel_gpio, 1);
gpio_set_value(chost->clk_gpio, 0);
gpio_set_value(chost->sel_gpio, 1);
omap_set_gpio_direction(chost->clk_gpio, 0);
omap_set_gpio_direction(chost->dat_gpio, 1);
omap_set_gpio_direction(chost->sel_gpio, 0);
omap_set_gpio_dataout(chost->clk_gpio, 1);
omap_set_gpio_dataout(chost->clk_gpio, 0);
gpio_set_value(chost->clk_gpio, 1);
gpio_set_value(chost->clk_gpio, 0);
cbus_host = chost;
......
......@@ -27,11 +27,7 @@ static void omap_set_led_gpio(struct led_classdev *led_cdev,
struct omap_led_config *led_dev;
led_dev = container_of(led_cdev, struct omap_led_config, cdev);
if (value)
omap_set_gpio_dataout(led_dev->gpio, 1);
else
omap_set_gpio_dataout(led_dev->gpio, 0);
gpio_set_value(led_dev->gpio, value);
}
static void omap_configure_led_gpio(int gpio)
......
......@@ -161,10 +161,10 @@ static int __devinit tsc2301_probe(struct spi_device *spi)
r = omap_request_gpio(tsc->reset_gpio);
if (r < 0)
goto err1;
omap_set_gpio_dataout(tsc->reset_gpio, 1);
gpio_set_value(tsc->reset_gpio, 1);
omap_set_gpio_direction(tsc->reset_gpio, 0);
mdelay(1);
omap_set_gpio_dataout(tsc->reset_gpio, 0);
gpio_set_value(tsc->reset_gpio, 0);
#endif
} else
tsc->reset_gpio = -1;
......
......@@ -229,8 +229,8 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
omap_set_gpio_direction(EXT_PHY_RESET_GPIO_PORT1, 0);
omap_request_gpio(EXT_PHY_RESET_GPIO_PORT2);
omap_set_gpio_direction(EXT_PHY_RESET_GPIO_PORT2, 0);
omap_set_gpio_dataout(EXT_PHY_RESET_GPIO_PORT1, 0);
omap_set_gpio_dataout(EXT_PHY_RESET_GPIO_PORT2, 0);
gpio_set_value(EXT_PHY_RESET_GPIO_PORT1, 0);
gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 0);
/* Hold the PHY in RESET for enough time till DIR is high */
udelay(EXT_PHY_RESET_DELAY);
#endif
......@@ -309,8 +309,8 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
* Hold the PHY in RESET for enough time till PHY is settled and ready
*/
udelay(EXT_PHY_RESET_DELAY);
omap_set_gpio_dataout(EXT_PHY_RESET_GPIO_PORT1, 1);
omap_set_gpio_dataout(EXT_PHY_RESET_GPIO_PORT2, 1);
gpio_set_value(EXT_PHY_RESET_GPIO_PORT1, 1);
gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 1);
#endif
#ifdef VBUS_INTERNAL_CHARGEPUMP_HACK
......
......@@ -101,8 +101,8 @@ static int sdp2430_panel_enable(struct lcd_panel *panel)
grp_val = ENABLE_VAUX2_DEV_GRP;
}
omap_set_gpio_dataout(enable_gpio, 1);
omap_set_gpio_dataout(backlight_gpio, 1);
gpio_set_value(enable_gpio, 1);
gpio_set_value(backlight_gpio, 1);
if (0 != t2_out(PM_RECEIVER, ded_val, ded_reg))
return -EIO;
......@@ -114,8 +114,8 @@ static int sdp2430_panel_enable(struct lcd_panel *panel)
static void sdp2430_panel_disable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(enable_gpio, 0);
omap_set_gpio_dataout(backlight_gpio, 0);
gpio_set_value(enable_gpio, 0);
gpio_set_value(backlight_gpio, 0);
if (omap_rev() > OMAP3430_REV_ES1_0) {
t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
......
......@@ -64,11 +64,11 @@ static int omap2evm_panel_init(struct lcd_panel *panel,
omap_set_gpio_direction(LCD_PANEL_QVGA, 0);
omap_set_gpio_direction(LCD_PANEL_RESB, 0);
omap_set_gpio_dataout(LCD_PANEL_RESB, 1);
omap_set_gpio_dataout(LCD_PANEL_INI, 1);
omap_set_gpio_dataout(LCD_PANEL_QVGA, 0);
omap_set_gpio_dataout(LCD_PANEL_LR, 1);
omap_set_gpio_dataout(LCD_PANEL_UD, 1);
gpio_set_value(LCD_PANEL_RESB, 1);
gpio_set_value(LCD_PANEL_INI, 1);
gpio_set_value(LCD_PANEL_QVGA, 0);
gpio_set_value(LCD_PANEL_LR, 1);
gpio_set_value(LCD_PANEL_UD, 1);
twl4030_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN);
twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
......@@ -84,13 +84,13 @@ static void omap2evm_panel_cleanup(struct lcd_panel *panel)
static int omap2evm_panel_enable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 0);
gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0);
return 0;
}
static void omap2evm_panel_disable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 1);
gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1);
}
static unsigned long omap2evm_panel_get_caps(struct lcd_panel *panel)
......
......@@ -48,13 +48,13 @@ static void omap3beagle_panel_cleanup(struct lcd_panel *panel)
static int omap3beagle_panel_enable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 1);
gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1);
return 0;
}
static void omap3beagle_panel_disable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 0);
gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0);
}
static unsigned long omap3beagle_panel_get_caps(struct lcd_panel *panel)
......
......@@ -71,11 +71,11 @@ static int omap3evm_panel_init(struct lcd_panel *panel,
twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
bklight_level = 100;
omap_set_gpio_dataout(LCD_PANEL_RESB, 1);
omap_set_gpio_dataout(LCD_PANEL_INI, 1);
omap_set_gpio_dataout(LCD_PANEL_QVGA, 0);
omap_set_gpio_dataout(LCD_PANEL_LR, 1);
omap_set_gpio_dataout(LCD_PANEL_UD, 1);
gpio_set_value(LCD_PANEL_RESB, 1);
gpio_set_value(LCD_PANEL_INI, 1);
gpio_set_value(LCD_PANEL_QVGA, 0);
gpio_set_value(LCD_PANEL_LR, 1);
gpio_set_value(LCD_PANEL_UD, 1);
return 0;
}
......@@ -86,13 +86,13 @@ static void omap3evm_panel_cleanup(struct lcd_panel *panel)
static int omap3evm_panel_enable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 0);
gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0);
return 0;
}
static void omap3evm_panel_disable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 1);
gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1);
}
static unsigned long omap3evm_panel_get_caps(struct lcd_panel *panel)
......
......@@ -166,9 +166,9 @@ static int p2_panel_enable(struct lcd_panel *panel)
/* thwack the reset line */
omap_set_gpio_direction(19, 0);
omap_set_gpio_dataout(19, 0);
gpio_set_value(19, 0);
mdelay(2);
omap_set_gpio_dataout(19, 1);
gpio_set_value(19, 1);
/* bits 31:28 -> 0 LCD_PXL_15 .. 12 */
value = omap_readl(OMAP730_IO_CONF_3) & 0x0FFFFFFF;
......@@ -258,7 +258,7 @@ static int p2_panel_enable(struct lcd_panel *panel)
/* enable backlight */
omap_set_gpio_direction(134, 0);
omap_set_gpio_dataout(134, 1);
gpio_set_value(134, 1);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment