Hi, On Tue, Feb 5, 2019 at 9:13 PM Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> wrote: > + if (of_property_read_bool(pdev->dev.of_node, "#power-domain-cells")) { > + qmp->pd_pdev = platform_device_register_data(&pdev->dev, > + "aoss_qmp_pd", > + PLATFORM_DEVID_NONE, > + NULL, 0); > + if (IS_ERR(qmp->pd_pdev)) { > + dev_err(&pdev->dev, "failed to register AOSS PD\n"); nit: not worth spinning just for this, but if you happen to spin you could print the error number in your message. > + ret = PTR_ERR(qmp->pd_pdev); > + goto err_close_qmp; > + } > + } As discussed in v5 I wonder if the complexity of a separate driver is really worth it or if everything would be a lot easier to just link the two ".c" files together. Now that it's a full error case if "aoss_qmp_pd" doesn't probe I'd vote for linking the two ".c" files together, but part of that is because I don't really want to dig into all the details of how you're supposed to call platform_device_register_data() for sub-devices and double-checking that you've got all the corner cases correct. ...NOTE: presumably if you just change it to a straight-up function call then you can also get rid of the above "dev_err" since (presumably) you'll know that the init code of aoss_qmp_pd will print any relevant errors? -Doug