Lines Matching refs:offset

36 static int pt_gpio_request(struct gpio_chip *gc, unsigned offset)  in pt_gpio_request()  argument
42 dev_dbg(gc->dev, "pt_gpio_request offset=%x\n", offset); in pt_gpio_request()
47 if (using_pins & BIT(offset)) { in pt_gpio_request()
49 offset); in pt_gpio_request()
54 writel(using_pins | BIT(offset), pt_gpio->reg_base + PT_SYNC_REG); in pt_gpio_request()
61 static void pt_gpio_free(struct gpio_chip *gc, unsigned offset) in pt_gpio_free() argument
70 using_pins &= ~BIT(offset); in pt_gpio_free()
75 dev_dbg(gc->dev, "pt_gpio_free offset=%x\n", offset); in pt_gpio_free()
78 static void pt_gpio_set_value(struct gpio_chip *gc, unsigned offset, int value) in pt_gpio_set_value() argument
85 offset, value); in pt_gpio_set_value()
90 data &= ~BIT(offset); in pt_gpio_set_value()
92 data |= BIT(offset); in pt_gpio_set_value()
98 static int pt_gpio_get_value(struct gpio_chip *gc, unsigned offset) in pt_gpio_get_value() argument
109 if (data & BIT(offset)) in pt_gpio_get_value()
116 data >>= offset; in pt_gpio_get_value()
120 offset, data); in pt_gpio_get_value()
125 static int pt_gpio_direction_input(struct gpio_chip *gc, unsigned offset) in pt_gpio_direction_input() argument
131 dev_dbg(gc->dev, "pt_gpio_dirction_input offset=%x\n", offset); in pt_gpio_direction_input()
136 data &= ~BIT(offset); in pt_gpio_direction_input()
145 unsigned offset, int value) in pt_gpio_direction_output() argument
152 offset, value); in pt_gpio_direction_output()
158 data |= BIT(offset); in pt_gpio_direction_output()
160 data &= ~BIT(offset); in pt_gpio_direction_output()
164 data |= BIT(offset); in pt_gpio_direction_output()