Home
last modified time | relevance | path

Searched refs:ofdev (Results 1 – 25 of 95) sorted by relevance

1234

/linux-6.15/drivers/net/can/mscan/
H A Dmpc5xxx_can.c128 np = ofdev->dev.of_node; in mpc512x_can_get_clock()
165 clk_in = devm_clk_get(&ofdev->dev, "sys"); in mpc512x_can_get_clock()
175 dev_dbg(&ofdev->dev, in mpc512x_can_get_clock()
183 clk_in = devm_clk_get(&ofdev->dev, "ref"); in mpc512x_can_get_clock()
188 dev_dbg(&ofdev->dev, in mpc512x_can_get_clock()
295 data = device_get_match_data(&ofdev->dev); in mpc5xxx_can_probe()
305 dev_err(&ofdev->dev, "no irq found\n"); in mpc5xxx_can_probe()
313 platform_set_drvdata(ofdev, dev); in mpc5xxx_can_probe()
314 SET_NETDEV_DEV(dev, &ofdev->dev); in mpc5xxx_can_probe()
344 data->put_clock(ofdev); in mpc5xxx_can_probe()
[all …]
/linux-6.15/drivers/net/ethernet/ibm/emac/
H A Dtah.c27 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_attach()
39 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_detach()
46 void tah_reset(struct platform_device *ofdev) in tah_reset() argument
48 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_reset()
67 int tah_get_regs_len(struct platform_device *ofdev) in tah_get_regs_len() argument
88 static int tah_probe(struct platform_device *ofdev) in tah_probe() argument
98 err = devm_mutex_init(&ofdev->dev, &dev->lock); in tah_probe()
102 dev->ofdev = ofdev; in tah_probe()
106 dev_err(&ofdev->dev, "can't map device registers"); in tah_probe()
110 platform_set_drvdata(ofdev, dev); in tah_probe()
[all …]
H A Drgmii.c82 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_attach()
90 ofdev->dev.of_node); in rgmii_attach()
100 ofdev->dev.of_node, input, phy_modes(mode)); in rgmii_attach()
195 int rgmii_get_regs_len(struct platform_device *ofdev) in rgmii_get_regs_len() argument
217 static int rgmii_probe(struct platform_device *ofdev) in rgmii_probe() argument
227 err = devm_mutex_init(&ofdev->dev, &dev->lock); in rgmii_probe()
231 dev->ofdev = ofdev; in rgmii_probe()
233 dev->base = devm_platform_ioremap_resource(ofdev, 0); in rgmii_probe()
235 dev_err(&ofdev->dev, "can't map device registers"); in rgmii_probe()
255 ofdev->dev.of_node, in rgmii_probe()
[all …]
H A Dzmii.c83 int zmii_attach(struct platform_device *ofdev, int input, in zmii_attach() argument
86 struct zmii_instance *dev = platform_get_drvdata(ofdev); in zmii_attach()
123 ofdev->dev.of_node, in zmii_attach()
130 ofdev->dev.of_node, *mode, input); in zmii_attach()
212 int zmii_get_regs_len(struct platform_device *ofdev) in zmii_get_regs_len() argument
233 static int zmii_probe(struct platform_device *ofdev) in zmii_probe() argument
243 err = devm_mutex_init(&ofdev->dev, &dev->lock); in zmii_probe()
247 dev->ofdev = ofdev; in zmii_probe()
250 dev->base = devm_platform_ioremap_resource(ofdev, 0); in zmii_probe()
252 dev_err(&ofdev->dev, "can't map device registers"); in zmii_probe()
[all …]
H A Drgmii.h50 struct platform_device *ofdev; member
57 int rgmii_attach(struct platform_device *ofdev, int input, int mode);
58 void rgmii_detach(struct platform_device *ofdev, int input);
59 void rgmii_get_mdio(struct platform_device *ofdev, int input);
60 void rgmii_put_mdio(struct platform_device *ofdev, int input);
61 void rgmii_set_speed(struct platform_device *ofdev, int input, int speed);
62 int rgmii_get_regs_len(struct platform_device *ofdev);
63 void *rgmii_dump_regs(struct platform_device *ofdev, void *buf);
H A Dzmii.h46 struct platform_device *ofdev; member
53 int zmii_attach(struct platform_device *ofdev, int input,
55 void zmii_detach(struct platform_device *ofdev, int input);
56 void zmii_get_mdio(struct platform_device *ofdev, int input);
57 void zmii_put_mdio(struct platform_device *ofdev, int input);
58 void zmii_set_speed(struct platform_device *ofdev, int input, int speed);
60 void *zmii_dump_regs(struct platform_device *ofdev, void *buf);
H A Dmal.c516 static int mal_probe(struct platform_device *ofdev) in mal_probe() argument
533 mal->ofdev = ofdev; in mal_probe()
576 ofdev->dev.of_node); in mal_probe()
635 mal->txeob_irq = platform_get_irq(ofdev, 0); in mal_probe()
636 mal->rxeob_irq = platform_get_irq(ofdev, 1); in mal_probe()
637 mal->serr_irq = platform_get_irq(ofdev, 2); in mal_probe()
644 mal->txde_irq = platform_get_irq(ofdev, 3); in mal_probe()
645 mal->rxde_irq = platform_get_irq(ofdev, 4); in mal_probe()
681 mal->version, ofdev->dev.of_node, in mal_probe()
686 platform_set_drvdata(ofdev, mal); in mal_probe()
[all …]
H A Dtah.h47 struct platform_device *ofdev; member
73 int tah_attach(struct platform_device *ofdev, int channel);
74 void tah_detach(struct platform_device *ofdev, int channel);
75 void tah_reset(struct platform_device *ofdev);
76 int tah_get_regs_len(struct platform_device *ofdev);
77 void *tah_dump_regs(struct platform_device *ofdev, void *buf);
/linux-6.15/drivers/macintosh/
H A Dmacio_asic.c55 tmp = get_device(&dev->ofdev.dev); in macio_dev_get()
65 put_device(&dev->ofdev.dev); in macio_dev_put()
377 dev->ofdev.dev.of_node = np; in macio_add_one_device()
379 dev->ofdev.dev.dma_mask = &dev->ofdev.archdata.dma_mask; in macio_add_one_device()
380 dev->ofdev.dev.coherent_dma_mask = dev->ofdev.archdata.dma_mask; in macio_add_one_device()
381 dev->ofdev.dev.parent = parent; in macio_add_one_device()
403 dev, &dev->ofdev, &dev->ofdev.dev, &dev->ofdev.dev.kobj); in macio_add_one_device()
433 put_device(&dev->ofdev.dev); in macio_add_one_device()
498 pnode = mbdev->ofdev.dev.of_node; in macio_pci_add_devices()
511 pnode = sdev->ofdev.dev.of_node; in macio_pci_add_devices()
[all …]
/linux-6.15/drivers/tty/serial/8250/
H A D8250_of.c91 struct device *dev = &ofdev->dev; in of_platform_serial_setup()
99 pm_runtime_enable(&ofdev->dev); in of_platform_serial_setup()
100 pm_runtime_get_sync(&ofdev->dev); in of_platform_serial_setup()
108 port->dev = &ofdev->dev; in of_platform_serial_setup()
182 pm_runtime_put_sync(&ofdev->dev); in of_platform_serial_setup()
183 pm_runtime_disable(&ofdev->dev); in of_platform_serial_setup()
241 platform_set_drvdata(ofdev, info); in of_platform_serial_probe()
256 pm_runtime_put_sync(&ofdev->dev); in of_platform_serial_probe()
257 pm_runtime_disable(&ofdev->dev); in of_platform_serial_probe()
276 pm_runtime_put_sync(&ofdev->dev); in of_platform_serial_remove()
[all …]
/linux-6.15/drivers/mtd/nand/raw/
H A Dndfc.c33 struct platform_device *ofdev; member
158 mtd->dev.parent = &ndfc->ofdev->dev; in ndfc_chip_init()
185 static int ndfc_probe(struct platform_device *ofdev) in ndfc_probe() argument
194 reg = of_get_property(ofdev->dev.of_node, "reg", &len); in ndfc_probe()
202 dev_err(&ofdev->dev, "invalid CS number (%d)\n", cs); in ndfc_probe()
210 ndfc->ofdev = ofdev; in ndfc_probe()
211 dev_set_drvdata(&ofdev->dev, ndfc); in ndfc_probe()
213 ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); in ndfc_probe()
215 dev_err(&ofdev->dev, "failed to get memory\n"); in ndfc_probe()
235 err = ndfc_chip_init(ndfc, ofdev->dev.of_node); in ndfc_probe()
[all …]
H A Dfsl_upm.c163 static int fun_probe(struct platform_device *ofdev) in fun_probe() argument
182 dev_err(&ofdev->dev, "can't find UPM\n"); in fun_probe()
189 dev_err(&ofdev->dev, "can't get UPM address offset\n"); in fun_probe()
196 dev_err(&ofdev->dev, "can't get UPM command offset\n"); in fun_probe()
201 prop = of_get_property(ofdev->dev.of_node, in fun_probe()
206 dev_err(&ofdev->dev, "too much multiple chips\n"); in fun_probe()
220 dev_err(&ofdev->dev, "RNB gpio #%d is invalid\n", i); in fun_probe()
227 fun->dev = &ofdev->dev; in fun_probe()
229 ret = fun_chip_init(fun, ofdev->dev.of_node, io_res); in fun_probe()
233 dev_set_drvdata(&ofdev->dev, fun); in fun_probe()
[all …]
H A Dsocrates_nand.c137 static int socrates_nand_probe(struct platform_device *ofdev) in socrates_nand_probe() argument
145 host = devm_kzalloc(&ofdev->dev, sizeof(*host), GFP_KERNEL); in socrates_nand_probe()
149 host->io_base = of_iomap(ofdev->dev.of_node, 0); in socrates_nand_probe()
151 dev_err(&ofdev->dev, "ioremap failed\n"); in socrates_nand_probe()
157 host->dev = &ofdev->dev; in socrates_nand_probe()
165 nand_set_flash_node(nand_chip, ofdev->dev.of_node); in socrates_nand_probe()
167 mtd->dev.parent = &ofdev->dev; in socrates_nand_probe()
185 dev_set_drvdata(&ofdev->dev, host); in socrates_nand_probe()
205 static void socrates_nand_remove(struct platform_device *ofdev) in socrates_nand_remove() argument
207 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev); in socrates_nand_remove()
/linux-6.15/drivers/ata/
H A Dpata_of_platform.c22 static int pata_of_platform_probe(struct platform_device *ofdev) in pata_of_platform_probe() argument
25 struct device_node *dn = ofdev->dev.of_node; in pata_of_platform_probe()
37 dev_err(&ofdev->dev, "can't get IO address from " in pata_of_platform_probe()
44 dev_err(&ofdev->dev, "can't get CTL address from " in pata_of_platform_probe()
51 irq = platform_get_irq_optional(ofdev, 0); in pata_of_platform_probe()
63 dev_err(&ofdev->dev, "invalid pio-mode\n"); in pata_of_platform_probe()
67 dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n"); in pata_of_platform_probe()
75 return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, irq > 0 ? &irq_res : NULL, in pata_of_platform_probe()
/linux-6.15/drivers/i2c/busses/
H A Di2c-cpm.c98 struct platform_device *ofdev; member
425 struct platform_device *ofdev = cpm->ofdev; in cpm_i2c_setup() local
433 dev_dbg(&cpm->ofdev->dev, "cpm_i2c_setup()\n"); in cpm_i2c_setup()
448 i2c_base = of_iomap(ofdev->dev.of_node, 1); in cpm_i2c_setup()
486 cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0); in cpm_i2c_setup()
528 cpm->rxbuf[i] = dma_alloc_coherent(&cpm->ofdev->dev, in cpm_i2c_setup()
643 cpm->ofdev = ofdev; in cpm_i2c_probe()
645 platform_set_drvdata(ofdev, cpm); in cpm_i2c_probe()
649 cpm->adap.dev.parent = &ofdev->dev; in cpm_i2c_probe()
654 dev_err(&ofdev->dev, "Unable to init hardware\n"); in cpm_i2c_probe()
[all …]
/linux-6.15/arch/sparc/kernel/
H A Dleon_pci_grpci1.c526 if (ofdev->num_resources < 3) { in grpci1_of_probe()
533 dev_err(&ofdev->dev, "memory allocation failed\n"); in grpci1_of_probe()
536 platform_set_drvdata(ofdev, priv); in grpci1_of_probe()
537 priv->dev = &ofdev->dev; in grpci1_of_probe()
541 regs = devm_ioremap_resource(&ofdev->dev, res); in grpci1_of_probe()
551 dev_err(&ofdev->dev, "not in host system slot\n"); in grpci1_of_probe()
574 priv->pci_area = ofdev->resource[1].start; in grpci1_of_probe()
575 priv->pci_area_end = ofdev->resource[1].end+1; in grpci1_of_probe()
576 priv->pci_io = ofdev->resource[2].start; in grpci1_of_probe()
660 err = devm_request_irq(&ofdev->dev, priv->irq_err, in grpci1_of_probe()
[all …]
H A Dleon_pci_grpci2.c699 if (ofdev->num_resources < 3) { in grpci2_of_probe()
705 regs = of_ioremap(&ofdev->resource[0], 0, in grpci2_of_probe()
706 resource_size(&ofdev->resource[0]), in grpci2_of_probe()
760 priv->pci_area = ofdev->resource[1].start; in grpci2_of_probe()
762 priv->pci_io = ofdev->resource[2].start; in grpci2_of_probe()
828 priv->virq_dma = ofdev->archdata.irqs[1]; in grpci2_of_probe()
844 priv->irq_map[i] = ofdev->archdata.irqs[i]; in grpci2_of_probe()
848 priv->virq_dma = ofdev->archdata.irqs[4]; in grpci2_of_probe()
873 leon_pci_init(ofdev, &priv->info); in grpci2_of_probe()
887 of_iounmap(&ofdev->resource[0], regs, in grpci2_of_probe()
[all …]
/linux-6.15/drivers/input/serio/
H A Dapbps2.c130 static int apbps2_of_probe(struct platform_device *ofdev) in apbps2_of_probe() argument
136 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in apbps2_of_probe()
138 dev_err(&ofdev->dev, "memory allocation failed\n"); in apbps2_of_probe()
143 priv->regs = devm_platform_get_and_ioremap_resource(ofdev, 0, NULL); in apbps2_of_probe()
151 irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in apbps2_of_probe()
152 err = devm_request_irq(&ofdev->dev, irq, apbps2_isr, in apbps2_of_probe()
155 dev_err(&ofdev->dev, "request IRQ%d failed\n", irq); in apbps2_of_probe()
160 if (of_property_read_u32(ofdev->dev.of_node, "freq", &freq_hz)) { in apbps2_of_probe()
161 dev_err(&ofdev->dev, "unable to get core frequency\n"); in apbps2_of_probe()
181 dev_info(&ofdev->dev, "irq = %d, base = 0x%p\n", irq, priv->regs); in apbps2_of_probe()
[all …]
/linux-6.15/drivers/net/ethernet/freescale/fs_enet/
H A Dmii-fec.c97 static int fs_enet_mdio_probe(struct platform_device *ofdev) in fs_enet_mdio_probe() argument
105 get_bus_freq = device_get_match_data(&ofdev->dev); in fs_enet_mdio_probe()
120 ret = of_address_to_resource(ofdev->dev.of_node, 0, &res); in fs_enet_mdio_probe()
133 clock = get_bus_freq(&ofdev->dev); in fs_enet_mdio_probe()
136 dev_warn(&ofdev->dev, "could not determine IPS clock\n"); in fs_enet_mdio_probe()
149 dev_err(&ofdev->dev, in fs_enet_mdio_probe()
164 new_bus->parent = &ofdev->dev; in fs_enet_mdio_probe()
165 platform_set_drvdata(ofdev, new_bus); in fs_enet_mdio_probe()
167 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); in fs_enet_mdio_probe()
184 static void fs_enet_mdio_remove(struct platform_device *ofdev) in fs_enet_mdio_remove() argument
[all …]
/linux-6.15/drivers/usb/host/
H A Dfsl-mph-dr-of.c79 struct platform_device *ofdev, in fsl_usb2_device_register() argument
84 const struct resource *res = ofdev->resource; in fsl_usb2_device_register()
85 unsigned int num = ofdev->num_resources; in fsl_usb2_device_register()
94 pdev->dev.parent = &ofdev->dev; in fsl_usb2_device_register()
96 pdev->dev.coherent_dma_mask = ofdev->dev.coherent_dma_mask; in fsl_usb2_device_register()
99 pdev->dev.dma_mask = &ofdev->dev.coherent_dma_mask; in fsl_usb2_device_register()
116 device_set_of_node_from_dev(&pdev->dev, &ofdev->dev); in fsl_usb2_device_register()
179 struct device_node *np = ofdev->dev.of_node; in fsl_usb2_mph_dr_of_probe()
244 dev_warn(&ofdev->dev, "Could not get controller version\n"); in fsl_usb2_mph_dr_of_probe()
252 usb_dev = fsl_usb2_device_register(ofdev, pdata, in fsl_usb2_mph_dr_of_probe()
[all …]
/linux-6.15/drivers/tty/serial/
H A Ducc_uart.c1171 struct device_node *np = ofdev->dev.of_node; in soft_uart_init()
1195 dev_err(&ofdev->dev, "unknown CPU model\n"); in soft_uart_init()
1215 dev_err(&ofdev->dev, in soft_uart_init()
1236 struct device_node *np = ofdev->dev.of_node; in ucc_uart_probe()
1246 ret = soft_uart_init(ofdev); in ucc_uart_probe()
1364 dev_err(&ofdev->dev, in ucc_uart_probe()
1374 dev_err(&ofdev->dev, in ucc_uart_probe()
1386 dev_err(&ofdev->dev, in ucc_uart_probe()
1394 dev_err(&ofdev->dev, in ucc_uart_probe()
1403 qe_port->port.dev = &ofdev->dev; in ucc_uart_probe()
[all …]
/linux-6.15/sound/aoa/soundbus/
H A Dcore.c23 tmp = get_device(&dev->ofdev.dev); in soundbus_dev_get()
34 put_device(&dev->ofdev.dev); in soundbus_dev_put()
75 of = &soundbus_dev->ofdev; in soundbus_uevent()
145 !dev->ofdev.dev.of_node || in soundbus_add_one()
152 dev_set_name(&dev->ofdev.dev, "soundbus:%x", ++devcount); in soundbus_add_one()
153 dev->ofdev.dev.bus = &soundbus_bus_type; in soundbus_add_one()
154 return of_device_register(&dev->ofdev); in soundbus_add_one()
160 of_device_unregister(&dev->ofdev); in soundbus_remove_one()
/linux-6.15/sound/aoa/soundbus/i2sbus/
H A Dcore.c76 i2sdev = container_of(dev, struct i2sbus_dev, sound.ofdev.dev); in i2sbus_release_dev()
223 dev->sound.ofdev.archdata.dma_mask = macio->ofdev.archdata.dma_mask; in i2sbus_add_dev()
224 dev->sound.ofdev.dev.of_node = np; in i2sbus_add_dev()
225 dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.archdata.dma_mask; in i2sbus_add_dev()
226 dev->sound.ofdev.dev.parent = &macio->ofdev.dev; in i2sbus_add_dev()
227 dev->sound.ofdev.dev.release = i2sbus_release_dev; in i2sbus_add_dev()
307 if (dev->sound.ofdev.dev.kobj.state_initialized) { in i2sbus_add_dev()
350 for_each_child_of_node(dev->ofdev.dev.of_node, np) { in i2sbus_probe()
363 dev_set_drvdata(&dev->ofdev.dev, control); in i2sbus_probe()
370 struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev); in i2sbus_remove()
[all …]
/linux-6.15/arch/powerpc/include/asm/
H A Dmacio.h43 struct platform_device ofdev; member
50 #define to_macio_device(d) container_of(d, struct macio_dev, ofdev.dev)
51 #define of_to_macio_device(d) container_of(d, struct macio_dev, ofdev)
103 dev_set_drvdata(&dev->ofdev.dev, data); in macio_set_drvdata()
108 return dev_get_drvdata(&dev->ofdev.dev); in macio_get_drvdata()
113 return mdev->ofdev.dev.of_node; in macio_get_of_node()
/linux-6.15/drivers/gpio/
H A Dgpio-mpc5200.c135 static int mpc52xx_wkup_gpiochip_probe(struct platform_device *ofdev) in mpc52xx_wkup_gpiochip_probe() argument
142 chip = devm_kzalloc(&ofdev->dev, sizeof(*chip), GFP_KERNEL); in mpc52xx_wkup_gpiochip_probe()
146 platform_set_drvdata(ofdev, chip); in mpc52xx_wkup_gpiochip_probe()
156 ret = of_mm_gpiochip_add_data(ofdev->dev.of_node, &chip->mmchip, chip); in mpc52xx_wkup_gpiochip_probe()
168 static void mpc52xx_gpiochip_remove(struct platform_device *ofdev) in mpc52xx_gpiochip_remove() argument
170 struct mpc52xx_gpiochip *chip = platform_get_drvdata(ofdev); in mpc52xx_gpiochip_remove()
295 static int mpc52xx_simple_gpiochip_probe(struct platform_device *ofdev) in mpc52xx_simple_gpiochip_probe() argument
302 chip = devm_kzalloc(&ofdev->dev, sizeof(*chip), GFP_KERNEL); in mpc52xx_simple_gpiochip_probe()
306 platform_set_drvdata(ofdev, chip); in mpc52xx_simple_gpiochip_probe()
316 ret = of_mm_gpiochip_add_data(ofdev->dev.of_node, &chip->mmchip, chip); in mpc52xx_simple_gpiochip_probe()

1234