Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4308532rwe; Mon, 17 Apr 2023 10:39:43 -0700 (PDT) X-Google-Smtp-Source: AKy350Z7QlnjsCCoMWeLh9Q0BurQAaek6abtfveOe80GRs2LTMhU6v7eqJz9G0lLfP3sN4F/ifRw X-Received: by 2002:a05:6a00:1388:b0:63b:8e12:7075 with SMTP id t8-20020a056a00138800b0063b8e127075mr6032268pfg.31.1681753183112; Mon, 17 Apr 2023 10:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681753183; cv=none; d=google.com; s=arc-20160816; b=IOWx18SvfLPBgtjWCnxibCQqm1CIrQb6Z+M8EXKekwgoxh4uWRTd6vQEAaQKBibae7 jE1NaSljVuEU8bWoXC6zby3VLtpqSup5QWrOMvmtSqmDWCkZ8mx/4gVdTh1U0faX7ZB5 fwdyhisIHDmu/EuKvYgaa4WBNQwDwhNuKbNHdyXIzWarEguUXwne5V44Yjp+mDvuJYwD kFumgSKbVExZXY2vD7qRR6Fr6V9CyQx/Bdqnn/+ebpTH/qmWryfij5dsbLpoQyEm3boZ Jd3xFsoaKSUZcfo3HlO5nN+Jne4PaIMl3Ohhpjo0VuUXsf3QS6IlprIt9VusAijD5ArS U5fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=Y7j5v37v0cFJe7eIrc+n1ZxsUusKsgN3Q+vl+g9FMbE=; b=voKB+At3Hlk+znz93MnYHsfi0WygGs+5PG3NcEXBjkOWMJNKvoUJVzwJc5LOPQGSDm SiIRtQ5LBnm5rPPvpuqJG/FVeuevlOfcRMse8OHEHQwZlFh3XlVv4cWP726qvfrqxhQ/ 7Bc9Gp7UhHvo+LMi3564JthSj2FVC6THuTD7yurO53zG8Zi6MBBi46BFyQJDdpFQvzKw Yn6E1LNk98CHOrR/BSuKPRtrWLQv61kMnv7k8bdhLrI2x15af3LtzFIHLN5zVqpGIFi4 0GHl5ND46r0XWLGj4HFPx6MiiyA/1DDhIAjt4m5QFspvqa3KxPDTtgupqLRuteq3ECUg uNtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VjVQ822c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j128-20020a625586000000b0062bbe792ab7si11745646pfb.191.2023.04.17.10.39.31; Mon, 17 Apr 2023 10:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VjVQ822c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230305AbjDQRh6 (ORCPT + 99 others); Mon, 17 Apr 2023 13:37:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbjDQRh5 (ORCPT ); Mon, 17 Apr 2023 13:37:57 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CEA31BD1 for ; Mon, 17 Apr 2023 10:37:55 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id x34so13863086ljq.1 for ; Mon, 17 Apr 2023 10:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681753074; x=1684345074; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=Y7j5v37v0cFJe7eIrc+n1ZxsUusKsgN3Q+vl+g9FMbE=; b=VjVQ822cU597IWSHWdLmAs6ETCwssHLxrmNUrhOndk5vY/7Q/320F7otHSk34LxBuH t3vnLA/5WF88Nvr9NmlKAbiryq+F7PKg6Im8E5Ez7b+uwlCyPG2Jru4ppJN3xr6tTL59 tisKCW2sYQFwwUUx1Wxa1MNwsMYJjo4XZaCCuwTxiedSjsnrlcM8kcPGCgJVFfwBe+vc aVHLTqmRXJ3ZxOHY+bSd4F7BjKyU74tYlEvyH08dmn1DDKeEoENQkzhXtHXuTDi/Cu2I haJj9g1zSqS6KQdtYab7M8qgw35CDxMy5H47c7jdBnxfOP5pw6Ed5dzt1WqARIWtdRGH tjwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681753074; x=1684345074; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y7j5v37v0cFJe7eIrc+n1ZxsUusKsgN3Q+vl+g9FMbE=; b=CJJutNI2fLy2+bcy070SaujZ7P/YqYDJXkcRK9V/CYGwV0TkrFX+n/esGWrWzWHn83 +BquwW8cZnUPwDMxAC96rue9i1str2AEgfpsvz2fl2ACAAVL+woLOg18AQdLLjDQGouC W/qXsy0gt1ZeOyNzronWG1/WaVtQo4bJZE6CTcZuTbaQZXakCdUgIo7epKNOjTEiP1UO uL9rlUtwoMKFwjUAitkWkQ0xJDyEZUOpT/Eh93RJ/OEdHbvnNsA/Awcnk3O+b1TM7zmb OQ0ZtCHQewTgdDiDq2p3flqAVTBxVOvI21PKoM0Zka3C2HRAFxSwrNB0BmbWAzGx76/Q Q6VQ== X-Gm-Message-State: AAQBX9fZkBKdftHzFO0JNZsl/k7vh0u+66L2jjV7TPb4ybxaGAOY/FjJ zoVVpUXsprZgwsGWxdtnrQlDBQ== X-Received: by 2002:a2e:8896:0:b0:2a8:bdda:87f3 with SMTP id k22-20020a2e8896000000b002a8bdda87f3mr1473807lji.31.1681753073776; Mon, 17 Apr 2023 10:37:53 -0700 (PDT) Received: from [192.168.1.101] (abyk99.neoplus.adsl.tpnet.pl. [83.9.30.99]) by smtp.gmail.com with ESMTPSA id h13-20020a2e900d000000b002987088bda4sm2191329ljg.69.2023.04.17.10.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 10:37:53 -0700 (PDT) From: Konrad Dybcio Subject: [PATCH v4 0/2] Introduce RPM Master stats Date: Mon, 17 Apr 2023 19:37:51 +0200 Message-Id: <20230405-topic-master_stats-v4-0-4217362fcc79@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAO+DPWQC/4XNQQrCMBAF0KtI1kaSSavElfcQkUlM20BNShKLU np3p+5EsMs/zH9/Ytkl7zI7biaW3Oizj4FCtd0w22FoHfc3ygwEKFGJmpc4eMvvmItL11ywZG4 QhESNjVY3RkWD2XGTMNiOquHR93Qckmv887N0vlDufC4xvT7Do1yufzdGyQWXRjYIB6V1rU69D 5jiLqaWLd4I6waQUUtLD86avRQ/hlo3FBlgDRisGhAavox5nt8SjrT0UgEAAA== To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Manivannan Sadhasivam X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681753072; l=2265; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=XrAEFoYbGavRPeKk7KK+IVW8Jgm3IU8DzAiHjb+PNRA=; b=p4IjNdeAgFb1YAAcIo122wBfDyx7Rxz88aP5J/w9WLb2jxOcIpcRiPX4qjuUwHM5bfbRUgwOVTro Ukq6nLVnCdmHYzgFxcEuDPWxtUGmYgkvlcFf6MRLNtCYW325c2S5 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (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