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
728 unsigned offset) in abx500_gpio_request_enable() argument
742 if ((offset >= p->offset) && in abx500_gpio_request_enable()
743 (offset < (p->offset + p->npins))) in abx500_gpio_request_enable()
753 p->altfunc, offset); in abx500_gpio_request_enable()
756 offset, p->altfunc); in abx500_gpio_request_enable()
765 unsigned offset) in abx500_gpio_disable_free() argument
807 struct seq_file *s, unsigned offset) in abx500_pin_dbg_show() argument
812 abx500_gpio_dbg_show_one(s, pctldev, chip, offset, in abx500_pin_dbg_show()
813 chip->base + offset - 1); in abx500_pin_dbg_show()
979 unsigned offset; in abx500_pin_config_set() local
997 offset = pin - 1; in abx500_pin_config_set()
1001 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1019 AB8500_GPIO_PUD1_REG, offset, in abx500_pin_config_set()
1024 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1046 offset, in abx500_pin_config_set()
1052 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1059 ret = abx500_gpio_direction_input(chip, offset); in abx500_pin_config_set()
1075 ret = abx500_gpio_direction_output(chip, offset, in abx500_pin_config_set()
1123 gstart = p->offset; in abx500_get_gpio_num()
1124 gend = p->offset + p->npins - 1; in abx500_get_gpio_num()
1237 p->offset - 1, p->offset, p->npins); in abx500_gpio_probe()