Lines Matching defs:ofdev
31 static int of_platform_serial_setup(struct platform_device *ofdev,
36 struct device_node *np = ofdev->dev.of_node;
43 pm_runtime_enable(&ofdev->dev);
44 pm_runtime_get_sync(&ofdev->dev);
49 info->clk = devm_clk_get(&ofdev->dev, NULL);
53 dev_warn(&ofdev->dev,
70 dev_warn(&ofdev->dev, "invalid address\n");
88 dev_warn(&ofdev->dev, "reg-offset %u exceeds region size %pa\n",
112 dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n",
150 info->rst = devm_reset_control_get_optional_shared(&ofdev->dev, NULL);
166 port->dev = &ofdev->dev;
188 pm_runtime_put_sync(&ofdev->dev);
189 pm_runtime_disable(&ofdev->dev);
196 static int of_platform_serial_probe(struct platform_device *ofdev)
204 port_type = (unsigned long)of_device_get_match_data(&ofdev->dev);
208 if (of_property_read_bool(ofdev->dev.of_node, "used-by-rtas"))
216 ret = of_platform_serial_setup(ofdev, port_type, &port8250, info);
224 if ((of_property_read_u32(ofdev->dev.of_node, "tx-threshold",
229 if (of_property_read_bool(ofdev->dev.of_node, "auto-flow-control"))
232 if (of_property_read_u32(ofdev->dev.of_node,
243 platform_set_drvdata(ofdev, info);
247 pm_runtime_put_sync(&ofdev->dev);
248 pm_runtime_disable(&ofdev->dev);
258 static int of_platform_serial_remove(struct platform_device *ofdev)
260 struct of_serial_info *info = platform_get_drvdata(ofdev);
265 pm_runtime_put_sync(&ofdev->dev);
266 pm_runtime_disable(&ofdev->dev);