devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Introduce RPM Master stats
@ 2023-04-17 17:37 Konrad Dybcio
  2023-04-17 17:37 ` [PATCH v4 1/2] dt-bindings: soc: qcom: Add " Konrad Dybcio
  2023-04-17 17:37 ` [PATCH v4 2/2] soc: qcom: Introduce RPM master stats driver Konrad Dybcio
  0 siblings, 2 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-04-17 17:37 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
	Konrad Dybcio, Manivannan Sadhasivam

v3 -> v4:
- Use "data" instead of "d" for naming local struct master_stats_data *
- Add "qcom_" prefix in the debugfs path
- Add "Qualcomm" prefix in MODULE_NAME
- Make the struct __packed__ to avoid padding surprises
  (even though it looks like there shouldn't be any, by eye)
- use IS_ERR for checking debugfs_create_file return value instead of
  nullchecking, that apparently changed..
- Use -ENODEV instead of -EINVAL when a MSG RAM handle is not found
- Add missing of_node_put() after of_parse_phandle()

- Vastly improve the documentation bit

v3: https://lore.kernel.org/r/20230405-topic-master_stats-v3-0-2cb2ba4f2092@linaro.org

v2 -> v3:
- rename rpm-master-stats.yaml to qcom,rpm-master-stats.yaml

v2: https://lore.kernel.org/r/20230405-topic-master_stats-v2-0-51c304ecb610@linaro.org

v1 -> v2:
- Drop the `-` in /properties/compatible to make our entry be of the
  correct type [1/2]
- Change %s to %d for printing out the iterator [2/2]

v1: https://lore.kernel.org/r/20230405-topic-master_stats-v1-0-1b1fa2739953@linaro.org

The RPM MSG ram includes per-subsystem low-power mode entry/exit/
residence/etc. statistics which are very useful for trying to debug
what I'd call "SoC insomnia", or IOW the plaftorm refusing to drop
the voltage rails to a minimum and gate the non-critical clocks.

This series adds a very short and simple driver to query that data
and expose it through debugfs.

The base used for writing this driver is:
https://github.com/sonyxperiadev/kernel/blob/aosp/LA.UM.9.14.r1/drivers/soc/qcom/rpm_master_stat.c

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (2):
      dt-bindings: soc: qcom: Add RPM Master stats
      soc: qcom: Introduce RPM master stats driver

 .../bindings/soc/qcom/qcom,rpm-master-stats.yaml   |  69 +++++++++
 drivers/soc/qcom/Kconfig                           |  11 ++
 drivers/soc/qcom/Makefile                          |   1 +
 drivers/soc/qcom/rpm_master_stats.c                | 162 +++++++++++++++++++++
 4 files changed, 243 insertions(+)
---
base-commit: d3f2cd24819158bb70701c3549e586f9df9cee67
change-id: 20230405-topic-master_stats-ba201a9af93d

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@linaro.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-18 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-17 17:37 [PATCH v4 0/2] Introduce RPM Master stats Konrad Dybcio
2023-04-17 17:37 ` [PATCH v4 1/2] dt-bindings: soc: qcom: Add " Konrad Dybcio
2023-04-18 16:19   ` Krzysztof Kozlowski
2023-04-17 17:37 ` [PATCH v4 2/2] soc: qcom: Introduce RPM master stats driver Konrad Dybcio
2023-04-18 12:50   ` Manivannan Sadhasivam
2023-04-18 13:03     ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).