From patchwork Mon Dec 19 20:10:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 9480699 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 59F65601C0 for ; Mon, 19 Dec 2016 20:10:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4660728471 for ; Mon, 19 Dec 2016 20:10:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38C6D284E1; Mon, 19 Dec 2016 20:10:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91A6A28471 for ; Mon, 19 Dec 2016 20:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752456AbcLSUKh (ORCPT ); Mon, 19 Dec 2016 15:10:37 -0500 Received: from smtp-out-so.shaw.ca ([64.59.136.138]:54258 "EHLO smtp-out-so.shaw.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbcLSUKg (ORCPT ); Mon, 19 Dec 2016 15:10:36 -0500 Received: from triton.mmayer.net ([70.71.160.251]) by shaw.ca with SMTP id J4GWcWMZfrvfEJ4GXckFww; Mon, 19 Dec 2016 13:10:34 -0700 X-Authority-Analysis: v=2.2 cv=UeUhcOaN c=1 sm=1 tr=0 a=6xzog4CasRozao6qlzTIAw==:117 a=6xzog4CasRozao6qlzTIAw==:17 a=n5n_aSjo0skA:10 a=Q-fNiiVtAAAA:8 a=vYS9HAW8ZZy_tPZ0nXAA:9 a=Fp8MccfUoT0GBdDC_Lng:22 Received: by triton.mmayer.net (Postfix, from userid 501) id 45C8C2E940C3; Mon, 19 Dec 2016 12:10:32 -0800 (PST) From: Markus Mayer To: Viresh Kumar , "Rafael J . Wysocki" Cc: Power Management List , Broadcom Kernel List , Linux Kernel Mailing List , Markus Mayer Subject: [PATCH 1/2] cpufreq: brcmstb-avs-cpufreq: extend sysfs entry brcm_avs_pmap Date: Mon, 19 Dec 2016 12:10:27 -0800 Message-Id: <20161219201028.18885-2-code@mmayer.net> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161219201028.18885-1-code@mmayer.net> References: <20161219201028.18885-1-code@mmayer.net> X-CMAE-Envelope: MS4wfMlf1h+JXr0iQj3QMLhTNqTaiUhdQqc2Gb0Q1JewXlaTJEiDgIwwGmf+jp6dGBz30yohX7AHAToP1C6Y8RKzyWHKy/4/QLvHYi7DCsPmuM7YYjXuEanW udodg/Gd3h3IUD6uBl02TrWESbHjd4uHPLnz+ba5nAztdwu9YMqucaa+y9s1bea6uaxZ2iQXcQ+JUkvUQMVNygMR/iFy5R/V2F9VzLLC5E7Fyb6PmmaPGbBC c7SvPSsRj8YVZXegwxHgzYHMEDEAbFfBJB9EHA+MUTSY7NR0bPDi2y10zDMhkeFEgkkQc37j+NRHJ3cIR9UE1QUFQgHP4vQVlRB+80rmz1JmpDnnQBo2Z+CT Nw79guDyueY1XAFWjncBkVOJX6yWNw== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Mayer We extend the brcm_avs_pmap sysfs entry (which issues the GET_PMAP command to AVS) to include all fields from struct pmap. This means adding mode (AVS, DVS, DVFS) and state (the P-state) to the output. Signed-off-by: Markus Mayer Acked-by: Viresh Kumar --- drivers/cpufreq/brcmstb-avs-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c index 4fda623..2c6e325 100644 --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c @@ -954,9 +954,9 @@ static ssize_t show_brcm_avs_pmap(struct cpufreq_policy *policy, char *buf) brcm_avs_parse_p1(pmap.p1, &mdiv_p0, &pdiv, &ndiv); brcm_avs_parse_p2(pmap.p2, &mdiv_p1, &mdiv_p2, &mdiv_p3, &mdiv_p4); - return sprintf(buf, "0x%08x 0x%08x %u %u %u %u %u %u %u\n", + return sprintf(buf, "0x%08x 0x%08x %u %u %u %u %u %u %u %u %u\n", pmap.p1, pmap.p2, ndiv, pdiv, mdiv_p0, mdiv_p1, mdiv_p2, - mdiv_p3, mdiv_p4); + mdiv_p3, mdiv_p4, pmap.mode, pmap.state); } static ssize_t show_brcm_avs_voltage(struct cpufreq_policy *policy, char *buf)