On 01/20/2016 06:32 PM, Viresh Kumar wrote:
On 20-01-16, 16:20, Stephen Boyd wrote:
Ok, first off, I don't understand why the regulator and clock pointers are in the struct device_opp instead of the struct device_list_opp. I thought we wanted to make it possible for two devices to share the same OPP table (device_opp), but have physically different clocks and regulators (non opp-shared case)? If we put the clock and regulator handles in the device_opp then the opp table is limited to one device or a set of devices that all share the same clock and regulators.
Not exactly. We wanted devices (with separate rails) to share the OPP tables ONLY IN DT. So that the same thing isn't required to be copied multiple times in DT, for example in case of Krait.
But the code isn't supposed to shared device_opp structure at all. There is one device_opp structure for a groups of devices that share their OPPs and their clock/voltage rails. opp_device_list is representing individual devices that share the same device_opp thing.
And this works pretty well and I don't think we should touch it now.
Ok. Thanks for clarifying. I see the code matches that description.