Message ID | 20220128163537.212248-1-daniel.lezcano@linaro.org |
---|---|
Headers | show |
Series | powercap/drivers/dtpm: Create the dtpm hierarchy | expand |
On 28/01/2022 17:35, Daniel Lezcano wrote: > The DTPM hierarchy is the base to build on top of it a power budget allocator. > It reflects the power consumption of the group of devices and allows to cap > their power. > > The core code is there but there is no way to describe the desired hierarchy > yet. > > A first proposal introduced the description through configfs [1] but was > rejected [2]. > > A second proposal based on the device tree with a binding similar to the power > domains [3] was proposed but finally rejected [4]. > > This version delegates the hierarchy creation to the SoC with a specific and > self-encapsulated code using an array to describe the tree. The SoC DTPM driver > defines an array of nodes pointing to their parents. The hierarchy description > can integrate a DT node and in the future a SCMI node, that means the > description can mix different type of nodes. > > As the DTPM tree depends on different devices which could be modules, the SoC > specific description must always be compiled as a module and describe the > module softdeps in order to let the userspace to handle proper loading > ordering. > > In addition to the hierarchy creation, the devfreq dtpm support is also > integrated into this series. > > This series was tested on a rock960 (revision B - rk3399 based) and a db845c > (Qualcomm sdm845 based). > > [1] https://lore.kernel.org/all/20210401183654.27214-1-daniel.lezcano@linaro.org/ > [2] https://lore.kernel.org/all/YGYg6ZeZ1181%2FpXk@kroah.com/ > [3] https://lore.kernel.org/all/20211205231558.779698-1-daniel.lezcano@linaro.org/ > [4] https://lore.kernel.org/all/YbfFapsmsjs4qnsg@robh.at.kernel.org/ > Applied for v5.18