Lines Matching refs:offset
43 static int palmas_gpio_get(struct gpio_chip *gc, unsigned offset) in palmas_gpio_get() argument
50 int gpio16 = (offset/8); in palmas_gpio_get()
52 offset %= 8; in palmas_gpio_get()
61 if (val & BIT(offset)) in palmas_gpio_get()
71 return !!(val & BIT(offset)); in palmas_gpio_get()
74 static void palmas_gpio_set(struct gpio_chip *gc, unsigned offset, in palmas_gpio_set() argument
81 int gpio16 = (offset/8); in palmas_gpio_set()
83 offset %= 8; in palmas_gpio_set()
91 ret = palmas_write(palmas, PALMAS_GPIO_BASE, reg, BIT(offset)); in palmas_gpio_set()
96 static int palmas_gpio_output(struct gpio_chip *gc, unsigned offset, in palmas_gpio_output() argument
103 int gpio16 = (offset/8); in palmas_gpio_output()
105 offset %= 8; in palmas_gpio_output()
109 palmas_gpio_set(gc, offset, value); in palmas_gpio_output()
112 BIT(offset), BIT(offset)); in palmas_gpio_output()
118 static int palmas_gpio_input(struct gpio_chip *gc, unsigned offset) in palmas_gpio_input() argument
124 int gpio16 = (offset/8); in palmas_gpio_input()
126 offset %= 8; in palmas_gpio_input()
129 ret = palmas_update_bits(palmas, PALMAS_GPIO_BASE, reg, BIT(offset), 0); in palmas_gpio_input()
135 static int palmas_gpio_to_irq(struct gpio_chip *gc, unsigned offset) in palmas_gpio_to_irq() argument
140 return palmas_irq_get_virq(palmas, PALMAS_GPIO_0_IRQ + offset); in palmas_gpio_to_irq()