• Home
  • Raw
  • Download

Lines Matching refs:offset

51 static int max7301_direction_input(struct gpio_chip *chip, unsigned offset)  in max7301_direction_input()  argument
59 offset += 4; in max7301_direction_input()
60 offset_bits = (offset & 3) << 1; in max7301_direction_input()
62 config = &ts->port_config[offset >> 2]; in max7301_direction_input()
64 if (ts->input_pullup_active & BIT(offset)) in max7301_direction_input()
74 ret = ts->write(ts->dev, 0x08 + (offset >> 2), *config); in max7301_direction_input()
81 static int __max7301_set(struct max7301 *ts, unsigned offset, int value) in __max7301_set() argument
84 ts->out_level |= 1 << offset; in __max7301_set()
85 return ts->write(ts->dev, 0x20 + offset, 0x01); in __max7301_set()
87 ts->out_level &= ~(1 << offset); in __max7301_set()
88 return ts->write(ts->dev, 0x20 + offset, 0x00); in __max7301_set()
92 static int max7301_direction_output(struct gpio_chip *chip, unsigned offset, in max7301_direction_output() argument
101 offset += 4; in max7301_direction_output()
102 offset_bits = (offset & 3) << 1; in max7301_direction_output()
104 config = &ts->port_config[offset >> 2]; in max7301_direction_output()
111 ret = __max7301_set(ts, offset, value); in max7301_direction_output()
114 ret = ts->write(ts->dev, 0x08 + (offset >> 2), *config); in max7301_direction_output()
121 static int max7301_get(struct gpio_chip *chip, unsigned offset) in max7301_get() argument
127 offset += 4; in max7301_get()
131 config = (ts->port_config[offset >> 2] >> ((offset & 3) << 1)) in max7301_get()
137 level = !!(ts->out_level & (1 << offset)); in max7301_get()
142 level = ts->read(ts->dev, 0x20 + offset) & 0x01; in max7301_get()
149 static void max7301_set(struct gpio_chip *chip, unsigned offset, int value) in max7301_set() argument
154 offset += 4; in max7301_set()
158 __max7301_set(ts, offset, value); in max7301_set()
209 int offset = (i - 1) * 4 + j; in __max730x_probe() local
210 ret = max7301_direction_input(&ts->chip, offset); in __max730x_probe()