Lines Matching defs:egpio
20 #include <linux/mfd/htc-egpio.h>
47 /* egpio info */
78 * on the egpio chip itself. So, we simply ignore interrupts that
94 .name = "htc-egpio",
151 struct egpio_chip *egpio;
159 egpio = container_of(chip, struct egpio_chip, chip);
160 ei = dev_get_drvdata(egpio->dev);
162 reg = egpio->reg_start + egpio_pos(ei, offset);
172 struct egpio_chip *egpio;
174 egpio = container_of(chip, struct egpio_chip, chip);
175 return test_bit(offset, &egpio->is_out) ? -EINVAL : 0;
186 struct egpio_chip *egpio;
196 egpio = container_of(chip, struct egpio_chip, chip);
197 ei = dev_get_drvdata(egpio->dev);
200 reg = egpio->reg_start + pos;
203 pr_debug("egpio %s: reg %d = 0x%04x\n", value ? "set" : "clear",
204 reg, (egpio->cached_values >> shift) & ei->reg_mask);
208 egpio->cached_values |= (1 << offset);
210 egpio->cached_values &= ~(1 << offset);
211 egpio_writew((egpio->cached_values >> shift) & ei->reg_mask, ei, reg);
218 struct egpio_chip *egpio;
220 egpio = container_of(chip, struct egpio_chip, chip);
221 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)
286 /* Map egpio chip into virtual address space. */
321 chip->label = "htc-egpio";
421 .name = "htc-egpio",