Lines Matching refs:gpio_num
44 static int sch_gpio_core_direction_in(struct gpio_chip *gc, unsigned gpio_num)
51 offset = CGIO + gpio_num / 8;
52 bit = gpio_num % 8;
63 static int sch_gpio_core_get(struct gpio_chip *gc, unsigned gpio_num)
68 offset = CGLV + gpio_num / 8;
69 bit = gpio_num % 8;
75 static void sch_gpio_core_set(struct gpio_chip *gc, unsigned gpio_num, int val)
82 offset = CGLV + gpio_num / 8;
83 bit = gpio_num % 8;
95 unsigned gpio_num, int val)
100 sch_gpio_core_set(gc, gpio_num, val);
104 offset = CGIO + gpio_num / 8;
105 bit = gpio_num % 8;
125 unsigned gpio_num)
133 if (!(curr_dirs & (1 << gpio_num)))
134 outb(curr_dirs | (1 << gpio_num) , gpio_ba + RGIO);
140 static int sch_gpio_resume_get(struct gpio_chip *gc, unsigned gpio_num)
142 return !!(inb(gpio_ba + RGLV) & (1 << gpio_num));
146 unsigned gpio_num, int val)
155 outb(curr_vals | (1 << gpio_num), gpio_ba + RGLV);
157 outb((curr_vals & ~(1 << gpio_num)), gpio_ba + RGLV);
163 unsigned gpio_num, int val)
167 sch_gpio_resume_set(gc, gpio_num, val);
172 if (curr_dirs & (1 << gpio_num))
173 outb(curr_dirs & ~(1 << gpio_num), gpio_ba + RGIO);