Lines Matching defs:egpio

17 #include <linux/platform_data/gpio-htc-egpio.h>
48 /* egpio info */
79 * on the egpio chip itself. So, we simply ignore interrupts that
96 .name = "htc-egpio",
137 struct egpio_chip *egpio;
145 egpio = gpiochip_get_data(chip);
146 ei = dev_get_drvdata(egpio->dev);
148 reg = egpio->reg_start + egpio_pos(ei, offset);
150 if (test_bit(offset, &egpio->is_out)) {
151 return !!(egpio->cached_values & (1 << offset));
162 struct egpio_chip *egpio;
164 egpio = gpiochip_get_data(chip);
165 return test_bit(offset, &egpio->is_out) ? -EINVAL : 0;
176 struct egpio_chip *egpio;
185 egpio = gpiochip_get_data(chip);
186 ei = dev_get_drvdata(egpio->dev);
188 reg = egpio->reg_start + pos;
191 pr_debug("egpio %s: reg %d = 0x%04x\n", value ? "set" : "clear",
192 reg, (egpio->cached_values >> shift) & ei->reg_mask);
196 egpio->cached_values |= (1 << offset);
198 egpio->cached_values &= ~(1 << offset);
199 egpio_writew((egpio->cached_values >> shift) & ei->reg_mask, ei, reg);
206 struct egpio_chip *egpio;
208 egpio = gpiochip_get_data(chip);
209 if (test_bit(offset, &egpio->is_out)) {
219 struct egpio_chip *egpio;
221 egpio = gpiochip_get_data(chip);
223 if (test_bit(offset, &egpio->is_out))
232 struct egpio_chip *egpio;
236 egpio = &(ei->chip[i]);
237 if (!egpio->is_out)
240 for (shift = 0; shift < egpio->chip.ngpio;
243 int reg = egpio->reg_start + egpio_pos(ei, shift);
245 if (!((egpio->is_out >> shift) & ei->reg_mask))
249 (egpio->cached_values >> shift) & ei->reg_mask,
252 egpio_writew((egpio->cached_values >> shift)
284 /* Map egpio chip into virtual address space. */
319 "htc-egpio-%d",
397 .name = "htc-egpio",