Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190777
b: refs/heads/master
c: 3c904af
h: refs/heads/master
i:
  190775: 5ac198f
v: v3
  • Loading branch information
Denis Turischev authored and Linus Torvalds committed May 12, 2010
1 parent 08eebb0 commit 46e329f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: f33d7e2d2d113a63772bbc993cdec3b5327f0ef1
refs/heads/master: 3c904afd7358e9ef515eb5df36b6f25c2b7fc2da
18 changes: 9 additions & 9 deletions trunk/drivers/gpio/it8761e_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ static int it8761e_gpio_get(struct gpio_chip *gc, unsigned gpio_num)
u16 reg;
u8 bit;

bit = gpio_num % 7;
reg = (gpio_num >= 7) ? gpio_ba + 1 : gpio_ba;
bit = gpio_num % 8;
reg = (gpio_num >= 8) ? gpio_ba + 1 : gpio_ba;

return !!(inb(reg) & (1 << bit));
}
Expand All @@ -91,8 +91,8 @@ static int it8761e_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num)
u8 curr_dirs;
u8 io_reg, bit;

bit = gpio_num % 7;
io_reg = (gpio_num >= 7) ? GPIO2X_IO : GPIO1X_IO;
bit = gpio_num % 8;
io_reg = (gpio_num >= 8) ? GPIO2X_IO : GPIO1X_IO;

spin_lock(&sio_lock);

Expand All @@ -116,8 +116,8 @@ static void it8761e_gpio_set(struct gpio_chip *gc,
u8 curr_vals, bit;
u16 reg;

bit = gpio_num % 7;
reg = (gpio_num >= 7) ? gpio_ba + 1 : gpio_ba;
bit = gpio_num % 8;
reg = (gpio_num >= 8) ? gpio_ba + 1 : gpio_ba;

spin_lock(&sio_lock);

Expand All @@ -135,8 +135,8 @@ static int it8761e_gpio_direction_out(struct gpio_chip *gc,
{
u8 curr_dirs, io_reg, bit;

bit = gpio_num % 7;
io_reg = (gpio_num >= 7) ? GPIO2X_IO : GPIO1X_IO;
bit = gpio_num % 8;
io_reg = (gpio_num >= 8) ? GPIO2X_IO : GPIO1X_IO;

it8761e_gpio_set(gc, gpio_num, val);

Expand Down Expand Up @@ -200,7 +200,7 @@ static int __init it8761e_gpio_init(void)
return -EBUSY;

it8761e_gpio_chip.base = -1;
it8761e_gpio_chip.ngpio = 14;
it8761e_gpio_chip.ngpio = 16;

err = gpiochip_add(&it8761e_gpio_chip);
if (err < 0)
Expand Down

0 comments on commit 46e329f

Please sign in to comment.