Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp207724ybh; Tue, 17 Mar 2020 21:31:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vte0EmIS2DSCNaJWtkLWe4QC3QlKVT+nFFl2ahW6y4xf7bRUXHq8J9EZ9B/M/7/FxDMRiLP X-Received: by 2002:a9d:638a:: with SMTP id w10mr2390446otk.103.1584505881193; Tue, 17 Mar 2020 21:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584505881; cv=none; d=google.com; s=arc-20160816; b=KZVCB88sAbKRczJVDGEjX+C7vTlX2sohlb4GSb+N48Ix484iTFXIm8tppuQih7yira wR4Lb0nqouwpYgMyywGwgqZ9te6CLmRKoojx3Z0AdzgbtrhCWlcFxDXvuzT04NGjTZYC rNpDyaiF1u1LOzdQjPOittmEEG5WpvGVsAz6Dgoj2NAIk/1drsb7nCOirJmB9HmzCpFO VtjyOO0UKxfRi2oCvcWjwX2DX8iiXaQL0b/NJVv6Nd3XDgG8GKqBBEy+aCQSuDMrWwFq vXYfRg1Fi7ubzDBMKPxzEJdXyWTCI454AUTPjiMGzlhX1WR9hMvN6+x8BkOtKmc80bf2 Qvqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=FIu1T3HMTZXt9ODBDrrZB2SocHW6vdKWod8Vtd9936o=; b=ruYtprzqeoWLssdEV46+gVK2XHQDiHTJkMbBAszK3sxYFVieIrTDAiwcTpbXH2Ox7s GYEbaeKI1GELFezFSKI8vVVH4WMgsHCmaw0W2fjO4z27RIOsHiUi79Dwdxnp60I7stln l3UuJbVs57FoFFBjVRsDEpqYP6HtJxt5yhXsnzkdhg9pntVPhEP5cTWor6NTITg3bRe6 BHXJei7JHQ/mrbTTao+X8IXHbj4su0kX9j7J1t3Hev2McwfgbMaJUn1EKLcC61S5Ur2K 7buoQ8LALw4NGxn+Udk5VtB0xE5aYbs7JNNS5ctGAaQKnFQtLky7he4TkHqTuZoYczzM nW5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=ayIBDgSA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si2799892otr.270.2020.03.17.21.31.08; Tue, 17 Mar 2020 21:31:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=ayIBDgSA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726663AbgCRE3o (ORCPT + 99 others); Wed, 18 Mar 2020 00:29:44 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:23719 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbgCRE3o (ORCPT ); Wed, 18 Mar 2020 00:29:44 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1584505783; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=FIu1T3HMTZXt9ODBDrrZB2SocHW6vdKWod8Vtd9936o=; b=ayIBDgSA9vNxx3+ISH2/6LQhdWqwacz1xzoKN1D2rScFCqbVCJ8B5M3NZA1EEYbpqx+3lCwO UWqtOfKizmpW0pQol5VcHKjPTiJeFKGNtTIL+/jTguOKkdLKZgqXhTmijUqvZQb2J3QXcTHT IwWgY9kgu3L8xMsfUOF0oLiTfbA= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd 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 5e71a3b6.7fc5722ff810-smtp-out-n01; Wed, 18 Mar 2020 04:29:42 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 00DF1C432C2; Wed, 18 Mar 2020 04:29:41 +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 B27BBC433CB; Wed, 18 Mar 2020 04:29:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B27BBC433CB 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 v5 0/4] Introduce SoC sleep stats driver Date: Wed, 18 Mar 2020 09:59:14 +0530 Message-Id: <1584505758-21037-1-git-send-email-mkshah@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes in v5: - Remove underscore from node name in Documentation and DTSI change - Remove global config from driver change 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 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 .../bindings/soc/qcom/soc-sleep-stats.yaml | 46 ++++ arch/arm64/boot/dts/qcom/sc7180.dtsi | 7 +- arch/arm64/configs/defconfig | 1 + drivers/soc/qcom/Kconfig | 9 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/soc_sleep_stats.c | 244 +++++++++++++++++++++ 6 files changed, 307 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml create mode 100644 drivers/soc/qcom/soc_sleep_stats.c -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation