summaryrefslogtreecommitdiffstats
path: root/drivers/video/via/via-gpio.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2010-04-22 14:36:04 -0600
committerJonathan Corbet <corbet@lwn.net>2010-05-07 17:16:03 -0600
commit75b035ace904761b8a340b524533a36e37313b29 (patch)
tree557cb425b40aeb71c5064529a5fbae5c7aa32ffc /drivers/video/via/via-gpio.c
parentc389874805a6849e3e347fc0e13fa170d80840c1 (diff)
downloadtalos-obmc-linux-75b035ace904761b8a340b524533a36e37313b29.tar.gz
talos-obmc-linux-75b035ace904761b8a340b524533a36e37313b29.zip
viafb: Convert GPIO and i2c to the new indexed port ops
Also add low-level locking to the i2c driver. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/video/via/via-gpio.c')
-rw-r--r--drivers/video/via/via-gpio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/video/via/via-gpio.c b/drivers/video/via/via-gpio.c
index e119d2103730..6b361177bf03 100644
--- a/drivers/video/via/via-gpio.c
+++ b/drivers/video/via/via-gpio.c
@@ -91,13 +91,13 @@ static void via_gpio_set(struct gpio_chip *chip, unsigned int nr,
spin_lock_irqsave(&cfg->vdev->reg_lock, flags);
gpio = cfg->active_gpios[nr];
- reg = viafb_read_reg(VIASR, gpio->vg_port_index);
+ reg = via_read_reg(VIASR, gpio->vg_port_index);
reg |= 0x40 << gpio->vg_mask_shift; /* output enable */
if (value)
reg |= 0x10 << gpio->vg_mask_shift;
else
reg &= ~(0x10 << gpio->vg_mask_shift);
- viafb_write_reg(gpio->vg_port_index, VIASR, reg);
+ via_write_reg(VIASR, gpio->vg_port_index, reg);
spin_unlock_irqrestore(&cfg->vdev->reg_lock, flags);
}
@@ -122,8 +122,8 @@ static int via_gpio_dir_input(struct gpio_chip *chip, unsigned int nr)
spin_lock_irqsave(&cfg->vdev->reg_lock, flags);
gpio = cfg->active_gpios[nr];
- viafb_write_reg_mask(gpio->vg_port_index, VIASR, 0,
- 0x40 << gpio->vg_mask_shift);
+ via_write_reg_mask(VIASR, gpio->vg_port_index, 0,
+ 0x40 << gpio->vg_mask_shift);
spin_unlock_irqrestore(&cfg->vdev->reg_lock, flags);
return 0;
}
@@ -139,7 +139,7 @@ static int via_gpio_get(struct gpio_chip *chip, unsigned int nr)
spin_lock_irqsave(&cfg->vdev->reg_lock, flags);
gpio = cfg->active_gpios[nr];
- reg = viafb_read_reg(VIASR, gpio->vg_port_index);
+ reg = via_read_reg(VIASR, gpio->vg_port_index);
spin_unlock_irqrestore(&cfg->vdev->reg_lock, flags);
return reg & (0x04 << gpio->vg_mask_shift);
}
@@ -164,12 +164,12 @@ static struct viafb_gpio_cfg gpio_config = {
*/
static void viafb_gpio_enable(struct viafb_gpio *gpio)
{
- viafb_write_reg_mask(gpio->vg_port_index, VIASR, 0x02, 0x02);
+ via_write_reg_mask(VIASR, gpio->vg_port_index, 0x02, 0x02);
}
static void viafb_gpio_disable(struct viafb_gpio *gpio)
{
- viafb_write_reg_mask(gpio->vg_port_index, VIASR, 0, 0x02);
+ via_write_reg_mask(VIASR, gpio->vg_port_index, 0, 0x02);
}
OpenPOWER on IntegriCloud