Lines Matching refs:p
88 struct d7s *p = d7s_device; in d7s_release() local
91 regval = readb(p->regs); in d7s_release()
92 if (p->flipped) in d7s_release()
96 writeb(regval, p->regs); in d7s_release()
104 struct d7s *p = d7s_device; in d7s_ioctl() local
105 u8 regs = readb(p->regs); in d7s_ioctl()
128 writeb(ireg, p->regs); in d7s_ioctl()
147 writeb(regs, p->regs); in d7s_ioctl()
174 struct d7s *p; in d7s_probe() local
180 p = devm_kzalloc(&op->dev, sizeof(*p), GFP_KERNEL); in d7s_probe()
182 if (!p) in d7s_probe()
185 p->regs = of_ioremap(&op->resource[0], 0, sizeof(u8), "d7s"); in d7s_probe()
186 if (!p->regs) { in d7s_probe()
201 regs = readb(p->regs); in d7s_probe()
204 p->flipped = of_property_read_bool(opts, "d7s-flipped?"); in d7s_probe()
206 if (p->flipped) in d7s_probe()
211 writeb(regs, p->regs); in d7s_probe()
219 dev_set_drvdata(&op->dev, p); in d7s_probe()
220 d7s_device = p; in d7s_probe()
228 of_iounmap(&op->resource[0], p->regs, sizeof(u8)); in d7s_probe()
234 struct d7s *p = dev_get_drvdata(&op->dev); in d7s_remove() local
235 u8 regs = readb(p->regs); in d7s_remove()
239 if (p->flipped) in d7s_remove()
243 writeb(regs, p->regs); in d7s_remove()
247 of_iounmap(&op->resource[0], p->regs, sizeof(u8)); in d7s_remove()