Lines Matching refs:gc
44 #define to_sch_gpio(gc) container_of(gc, struct sch_gpio, chip) argument
66 static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned gpio, unsigned reg) in sch_gpio_reg_get() argument
68 struct sch_gpio *sch = to_sch_gpio(gc); in sch_gpio_reg_get()
80 static void sch_gpio_reg_set(struct gpio_chip *gc, unsigned gpio, unsigned reg, in sch_gpio_reg_set() argument
83 struct sch_gpio *sch = to_sch_gpio(gc); in sch_gpio_reg_set()
98 static int sch_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num) in sch_gpio_direction_in() argument
100 struct sch_gpio *sch = to_sch_gpio(gc); in sch_gpio_direction_in()
103 sch_gpio_reg_set(gc, gpio_num, GIO, 1); in sch_gpio_direction_in()
108 static int sch_gpio_get(struct gpio_chip *gc, unsigned gpio_num) in sch_gpio_get() argument
110 return sch_gpio_reg_get(gc, gpio_num, GLV); in sch_gpio_get()
113 static void sch_gpio_set(struct gpio_chip *gc, unsigned gpio_num, int val) in sch_gpio_set() argument
115 struct sch_gpio *sch = to_sch_gpio(gc); in sch_gpio_set()
118 sch_gpio_reg_set(gc, gpio_num, GLV, val); in sch_gpio_set()
122 static int sch_gpio_direction_out(struct gpio_chip *gc, unsigned gpio_num, in sch_gpio_direction_out() argument
125 struct sch_gpio *sch = to_sch_gpio(gc); in sch_gpio_direction_out()
128 sch_gpio_reg_set(gc, gpio_num, GIO, 0); in sch_gpio_direction_out()
140 sch_gpio_set(gc, gpio_num, val); in sch_gpio_direction_out()