Lines Matching defs:op
54 static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val)
59 if (bp->devs[i].device == op) {
71 struct platform_device *op = NULL;
75 if (!(op = bp->devs[i].device))
79 op = NULL;
85 return op;
89 struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op)
98 client->op = op;
100 reg = of_get_property(op->dev.of_node, "reg", NULL);
109 claim_device(bp, op);
117 struct platform_device *op = client->op;
119 release_device(bp, op);
300 static struct bbc_i2c_bus * __init attach_one_i2c(struct platform_device *op, int index)
310 bp->i2c_control_regs = of_ioremap(&op->resource[0], 0, 0x2, "bbc_i2c_regs");
314 bp->i2c_bussel_reg = of_ioremap(&op->resource[1], 0, 0x1, "bbc_i2c_bussel");
320 if (request_irq(op->archdata.irqs[0], bbc_i2c_interrupt,
325 bp->op = op;
330 for (dp = op->dev.of_node->child;
354 of_iounmap(&op->resource[1], bp->i2c_bussel_reg, 1);
356 of_iounmap(&op->resource[0], bp->i2c_control_regs, 2);
364 static int __devinit bbc_i2c_probe(struct platform_device *op,
370 bp = attach_one_i2c(op, index);
376 free_irq(op->archdata.irqs[0], bp);
378 of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1);
380 of_iounmap(&op->resource[1], bp->i2c_control_regs, 2);
383 dev_set_drvdata(&op->dev, bp);
389 static int __devexit bbc_i2c_remove(struct platform_device *op)
391 struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev);
395 free_irq(op->archdata.irqs[0], bp);
398 of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1);
400 of_iounmap(&op->resource[1], bp->i2c_control_regs, 2);