RDPM (Rail digital power meter) hardware for a shared rail will monitor for peak current management. It allocates one simple digital power monitor(SDPM) for each major consumer of that rail. Each SDPM estimates the power consumption of the consumer based on operating frequency for that consumer. The RDPM hardware then aggregates all SDPMs power estimation and recommends different mitigation levels based on aggregated power estimation is above or below rail power consumption specification. This patch series adds SDPM clock monitor driver which tracks frequency of different consumers and writes the frequency into respective SDPM registers. The driver gets the clock source to monitor and the corresponding SDPM register for a consumer from devicetree. The SDPM clock monitor driver registers for the clock change notification for these clock sources and writes the new frequency value into the SDPM register. Changes: * Add dt-binding documentation for sdpm clock monitor driver * Add SDPM clock monitor driver Manaf Meethalavalappu Pallikunhi (2): dt-bindings: soc: qcom: Add SDPM clock monitor driver documentation in yaml drivers: soc: qcom: Add SDPM clock monitor driver .../devicetree/bindings/soc/qcom/qcom-sdpm.yaml | 68 +++++++ drivers/soc/qcom/Kconfig | 8 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/sdpm_clk_monitor.c | 217 +++++++++++++++++++++ 4 files changed, 294 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml create mode 100644 drivers/soc/qcom/sdpm_clk_monitor.c Signed-off-by: Ram Chandrasekar <rkumbako@xxxxxxxxxxxxxx> Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@xxxxxxxxxxxxxx> -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project