From patchwork Mon Mar 9 11:14:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maulik Shah X-Patchwork-Id: 11426743 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 289B114B7 for ; Mon, 9 Mar 2020 11:14:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0830520873 for ; Mon, 9 Mar 2020 11:14:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="naGY4lcZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726215AbgCILOd (ORCPT ); Mon, 9 Mar 2020 07:14:33 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:38321 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbgCILOb (ORCPT ); Mon, 9 Mar 2020 07:14:31 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1583752470; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=W9V6Jvf8Nv7owF8TF5GKbqjgK7vv05rxHi1O+GD3BRE=; b=naGY4lcZFbiurE+13F5IA/y8mqj1XmYH21YXkGON0VhX5tSezX/07qpfgUgSR0n4iY8gRLlj YLEnX6s93HaYHc15kjuJxlIqIHBllibipLK7UH0ECvREi6l55N9mg8Ajzt5wy0L0cXpr5KwB Q+oEPq2m0ciNfNEKNoWlXuPqQ3k= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e662513.7f63e9336500-smtp-out-n01; Mon, 09 Mar 2020 11:14:27 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id CDDBEC433CB; Mon, 9 Mar 2020 11:14:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mkshah-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mkshah) by smtp.codeaurora.org (Postfix) with ESMTPSA id 72D59C433D2; Mon, 9 Mar 2020 11:14:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 72D59C433D2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=mkshah@codeaurora.org From: Maulik Shah To: swboyd@chromium.org, mka@chromium.org, evgreen@chromium.org, bjorn.andersson@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, agross@kernel.org, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, Maulik Shah Subject: [PATCH v4 0/4] Introduce SoC sleep stats driver Date: Mon, 9 Mar 2020 16:44:13 +0530 Message-Id: <1583752457-21159-1-git-send-email-mkshah@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Changes in v4: - Address bjorn's comments from v3 on change 2. - Add bjorn's Reviewed-by on change 3 and 4. Changes in v3: - Address stephen's comments from v2 in change 1 and 2. - Address bjorn's comments from v2 in change 3 and 4. - Add Rob and bjorn's Reviewed-by on YAML change. Changes in v2: - Convert Documentation to YAML. - Address stephen's comments from v1. - Use debugfs instead of sysfs. - Add sc7180 dts changes for sleep stats - Add defconfig changes to enable driver - Include subsystem stats from [1] in this single stats driver. - Address stephen's comments from [1] - Update cover letter inline to mention [1] Qualcomm Technologies, Inc. (QTI)'s chipsets support SoC level low power modes. SoCs Always On Processor/Resource Power Manager produces statistics of the SoC sleep modes involving lowering or powering down of the rails and the oscillator clock. Additionally multiple subsystems present on SoC like modem, spss, adsp, cdsp maintains their low power mode statistics in shared memory (SMEM). Statistics includes SoC sleep mode type, number of times LPM entered, time of last entry, exit, and accumulated sleep duration in seconds. This series adds a driver to read the stats and export to debugfs. [1] https://lore.kernel.org/patchwork/patch/1149381/ Mahesh Sivasubramanian (2): dt-bindings: Introduce soc sleep stats bindings for Qualcomm SoCs soc: qcom: Add SoC sleep stats driver Maulik Shah (2): arm64: dts: qcom: sc7180: Enable soc sleep stats arm64: defconfig: Enable SoC sleep stats driver for Qualcomm .../bindings/soc/qcom/soc-sleep-stats.yaml | 47 ++++ arch/arm64/boot/dts/qcom/sc7180.dtsi | 5 + arch/arm64/configs/defconfig | 1 + drivers/soc/qcom/Kconfig | 10 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/soc_sleep_stats.c | 279 +++++++++++++++++++++ 6 files changed, 343 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml create mode 100644 drivers/soc/qcom/soc_sleep_stats.c