Lines Matching refs:offset
122 unsigned offset, bool *bit) in abx500_gpio_get_bit() argument
125 u8 pos = offset % 8; in abx500_gpio_get_bit()
129 reg += offset / 8; in abx500_gpio_get_bit()
138 __func__, reg, offset, ret); in abx500_gpio_get_bit()
144 unsigned offset, int val) in abx500_gpio_set_bits() argument
147 u8 pos = offset % 8; in abx500_gpio_set_bits()
150 reg += offset / 8; in abx500_gpio_set_bits()
155 __func__, reg, offset, ret); in abx500_gpio_set_bits()
165 static int abx500_gpio_get(struct gpio_chip *chip, unsigned offset) in abx500_gpio_get() argument
170 u8 gpio_offset = offset - 1; in abx500_gpio_get()
193 static void abx500_gpio_set(struct gpio_chip *chip, unsigned offset, int val) in abx500_gpio_set() argument
198 ret = abx500_gpio_set_bits(chip, AB8500_GPIO_OUT1_REG, offset, val); in abx500_gpio_set()
203 static int abx500_get_pull_updown(struct abx500_pinctrl *pct, int offset, in abx500_get_pull_updown() argument
220 if ((offset < pullud->first_pin) in abx500_get_pull_updown()
221 || (offset > pullud->last_pin)) { in abx500_get_pull_updown()
229 pos = (offset - pullud->first_pin) << 1; in abx500_get_pull_updown()
240 int offset, enum abx500_gpio_pull_updown val) in abx500_set_pull_updown() argument
255 if ((offset < pullud->first_pin) in abx500_set_pull_updown()
256 || (offset > pullud->last_pin)) { in abx500_set_pull_updown()
260 pos = (offset - pullud->first_pin) << 1; in abx500_set_pull_updown()
284 unsigned offset, in abx500_gpio_direction_output() argument
294 offset, in abx500_gpio_direction_output()
302 offset, in abx500_gpio_direction_output()
308 gpio = offset + 1; in abx500_gpio_direction_output()
321 return abx500_gpio_set_bits(chip, AB8500_GPIO_OUT1_REG, offset, val); in abx500_gpio_direction_output()
324 static int abx500_gpio_direction_input(struct gpio_chip *chip, unsigned offset) in abx500_gpio_direction_input() argument
329 offset, in abx500_gpio_direction_input()
333 static int abx500_gpio_to_irq(struct gpio_chip *chip, unsigned offset) in abx500_gpio_to_irq() argument
337 int gpio = offset + 1; in abx500_gpio_to_irq()
367 unsigned offset; in abx500_set_mode() local
386 offset = gpio - 1; in abx500_set_mode()
401 offset, val); in abx500_set_mode()
414 offset, 0); in abx500_set_mode()
432 offset, 1); in abx500_set_mode()
437 offset, 0); in abx500_set_mode()
455 offset, 0); in abx500_set_mode()
490 unsigned offset = gpio - 1; in abx500_get_mode() local
501 ret = abx500_gpio_get_bit(chip, AB8500_GPIO_SEL1_REG + (offset / 8), in abx500_get_mode()
572 unsigned offset, unsigned gpio) in abx500_gpio_dbg_show_one() argument
575 const char *label = gpiochip_is_requested(chip, offset - 1); in abx500_gpio_dbg_show_one()
576 u8 gpio_offset = offset - 1; in abx500_gpio_dbg_show_one()
607 if (abx500_pullud_supported(chip, offset)) { in abx500_gpio_dbg_show_one()
608 ret = abx500_get_pull_updown(pct, offset, &pud); in abx500_gpio_dbg_show_one()
622 seq_printf(s, " %-9s", chip->get(chip, offset) ? "hi" : "lo"); in abx500_gpio_dbg_show_one()
624 mode = abx500_get_mode(pctldev, chip, offset); in abx500_gpio_dbg_show_one()
651 unsigned offset, unsigned gpio) in abx500_gpio_dbg_show_one() argument
657 static int abx500_gpio_request(struct gpio_chip *chip, unsigned offset) in abx500_gpio_request() argument
659 int gpio = chip->base + offset; in abx500_gpio_request()
664 static void abx500_gpio_free(struct gpio_chip *chip, unsigned offset) in abx500_gpio_free() argument
666 int gpio = chip->base + offset; in abx500_gpio_free()
742 unsigned offset) in abx500_gpio_request_enable() argument
756 if ((offset >= p->offset) && in abx500_gpio_request_enable()
757 (offset < (p->offset + p->npins))) in abx500_gpio_request_enable()
767 p->altfunc, offset); in abx500_gpio_request_enable()
770 offset, p->altfunc); in abx500_gpio_request_enable()
779 unsigned offset) in abx500_gpio_disable_free() argument
821 struct seq_file *s, unsigned offset) in abx500_pin_dbg_show() argument
826 abx500_gpio_dbg_show_one(s, pctldev, chip, offset, in abx500_pin_dbg_show()
827 chip->base + offset - 1); in abx500_pin_dbg_show()
993 unsigned offset; in abx500_pin_config_set() local
1011 offset = pin - 1; in abx500_pin_config_set()
1015 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1033 AB8500_GPIO_PUD1_REG, offset, in abx500_pin_config_set()
1038 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1060 offset, in abx500_pin_config_set()
1066 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1073 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1089 ret = abx500_gpio_direction_output(chip, offset, in abx500_pin_config_set()
1137 gstart = p->offset; in abx500_get_gpio_num()
1138 gend = p->offset + p->npins - 1; in abx500_get_gpio_num()
1251 p->offset - 1, p->offset, p->npins); in abx500_gpio_probe()