On 01/30/15 14:00, Bjorn Andersson wrote: > On Fri, Jan 30, 2015 at 1:16 PM, Stephen Boyd <sboyd@xxxxxxxxxxxxxx> wrote: >> On 01/30/15 10:06, Srinivas Kandagatla wrote: > [..] >>> Stephen Any comments? >> I don't understand any of this. We should be making a specific tsens >> device directly in the gcc driver probe and not doing any sort of >> of_platform_populate(). This is what I had, but it probably could be >> done better so that we can assign the struct device's of_node pointer >> before registering on the platform bus. >> >> platform_device_register_data(&pdev->dev, "tsens8960-tm", -1, >> &pdev->dev.of_node, sizeof(&pdev->dev.of_node)); >> >> Then if we need to add any properties like #sensor-cells or coefficients >> the tsens driver can use the same of_node that gcc is using. >> > That makes sense and the dt will describe the hardware nicely, but how > do you get access to the register space from the tsens driver? > > Will dev_get_regmap(pdev->dev.parent, NULL); find the mmio regmap of > gcc perhaps? > Yes that's the plan. We'll have to do slightly different stuff for 8974 where tsens is split out from gcc into its own space. That should still be easy enough though by checking the of_node against some compatible string. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html