Lines Matching refs:op
53 static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val) in set_device_claimage() argument
58 if (bp->devs[i].device == op) { in set_device_claimage()
70 struct platform_device *op = NULL; in bbc_i2c_getdev() local
74 if (!(op = bp->devs[i].device)) in bbc_i2c_getdev()
78 op = NULL; in bbc_i2c_getdev()
84 return op; in bbc_i2c_getdev()
88 struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op) in bbc_i2c_attach() argument
97 client->op = op; in bbc_i2c_attach()
99 reg = of_get_property(op->dev.of_node, "reg", NULL); in bbc_i2c_attach()
108 claim_device(bp, op); in bbc_i2c_attach()
116 struct platform_device *op = client->op; in bbc_i2c_detach() local
118 release_device(bp, op); in bbc_i2c_detach()
293 static struct bbc_i2c_bus * attach_one_i2c(struct platform_device *op, int index) in attach_one_i2c() argument
306 bp->i2c_control_regs = of_ioremap(&op->resource[0], 0, 0x2, "bbc_i2c_regs"); in attach_one_i2c()
310 if (op->num_resources == 2) { in attach_one_i2c()
311 bp->i2c_bussel_reg = of_ioremap(&op->resource[1], 0, 0x1, "bbc_i2c_bussel"); in attach_one_i2c()
318 if (request_irq(op->archdata.irqs[0], bbc_i2c_interrupt, in attach_one_i2c()
323 bp->op = op; in attach_one_i2c()
328 for (dp = op->dev.of_node->child; in attach_one_i2c()
352 of_iounmap(&op->resource[1], bp->i2c_bussel_reg, 1); in attach_one_i2c()
354 of_iounmap(&op->resource[0], bp->i2c_control_regs, 2); in attach_one_i2c()
362 static int bbc_i2c_probe(struct platform_device *op) in bbc_i2c_probe() argument
367 bp = attach_one_i2c(op, index); in bbc_i2c_probe()
373 free_irq(op->archdata.irqs[0], bp); in bbc_i2c_probe()
375 of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1); in bbc_i2c_probe()
377 of_iounmap(&op->resource[1], bp->i2c_control_regs, 2); in bbc_i2c_probe()
380 dev_set_drvdata(&op->dev, bp); in bbc_i2c_probe()
386 static int bbc_i2c_remove(struct platform_device *op) in bbc_i2c_remove() argument
388 struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); in bbc_i2c_remove()
392 free_irq(op->archdata.irqs[0], bp); in bbc_i2c_remove()
395 of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1); in bbc_i2c_remove()
397 of_iounmap(&op->resource[1], bp->i2c_control_regs, 2); in bbc_i2c_remove()