Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp358576rdh; Sat, 23 Sep 2023 13:46:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGn80ohoAAixX7SbWszuZx/yvlF6qVVAbYZPQfOyhTp+uliGXJ1hvBGAIQK5rne61ULyRGd X-Received: by 2002:a05:6830:ed5:b0:6c4:a65c:f7bb with SMTP id dq21-20020a0568300ed500b006c4a65cf7bbmr3203844otb.33.1695502013141; Sat, 23 Sep 2023 13:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695502013; cv=none; d=google.com; s=arc-20160816; b=L+MrMcwcbAgOW3a3d+Su7ufBoLhYD+6d960TYMqHbsbZm6ocvSThRp7syXmXCKPEqI zrhu0bFqWUbVOI7Ruz3eNrdQZB5k+/AxhMK1Jr6IdEEOUGgi65HLZAJF3yeETJnFGiGT XYGURFDUk3suas/6Pdc+d3nwyVaaKuhpchb+ZMMLpPTnMkwC74WbULNmH0j7njBObXlC bv8lGJGsgqONOaAR0kBO0u8l1UnnnAqW/3aN7K9P4R8AiNf1hutA56Nj4dBVjfVXMH9S EZf11Q9n22+RwR6KHBZXT7z2SOChIlld7x44qFImP9AYOOGIRPbNRL08CzpkT3057NiK 9a2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gkMg6Ss1ODOcr8VdxRq6yPqfjTyE6Onn/Fwc4BWB7DM=; fh=RG9C+9f0qjD/nLRixABSsWLzASEJfBY2X6LH+3XeL2I=; b=Tbqtn45Fr2+Izvu1LVRR/jw2qe38HbNTewYVpBzKrJ+TOxtpkfK0ptSuJtVbKFjGT+ /uEvQa5Q7s0uQ/kOKerWLcwQZRn4IdgC0thtDQfBdV15n4GV28zPV2ynMzxAGCQp96o1 TspW2DkKXPMn7Rg/eqjEhzZcnjK+pcmMjU46lHAhyJbM5iBtYHmNx8BvzRBFSHD+8IBY Czu45nrEsGQZJWzMGe9zMxuYsp03j6JgmSftQi0QnsU0Tg5NSpIKIc34I/VWGnUGDIWk MClytr5dTsHtJXr6bEANuSOQniTQ724+QDTMWLn/Wgn4K2Q4mtC4ReRaR/xz59BTMSxf kjGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rLkzUVP9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id a28-20020a056a001d1c00b0068c0300a3f7si6453472pfx.279.2023.09.23.13.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 13:46:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rLkzUVP9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id EB821808680A; Sat, 23 Sep 2023 04:50:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231478AbjIWLua (ORCPT + 99 others); Sat, 23 Sep 2023 07:50:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbjIWLu0 (ORCPT ); Sat, 23 Sep 2023 07:50:26 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 576561B0 for ; Sat, 23 Sep 2023 04:50:20 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-99357737980so443813466b.2 for ; Sat, 23 Sep 2023 04:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695469819; x=1696074619; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gkMg6Ss1ODOcr8VdxRq6yPqfjTyE6Onn/Fwc4BWB7DM=; b=rLkzUVP9FvDi4+xOnZH7Iga1U2MJSV+W/0G+rtds2o8MTzHpFrZ009AS4vb/8PN6td f9vExEq4tuN4HGGf7XfxTn1GwdiQhiq2QZ11Dyu6shWaC5nbvKNbgotBaGEmajaiBSW0 +gc72amGkuTSZxoRt/Kv4yH99qDceXRaltQ6HceQpxu+z9o1RXa07q0i7ymRcV4of6hf H1TXEbkI7YxfcN4wk+VvVt/uvBnohsgKBGXfTxIEqbLg7QVI7WZB7aFFxF+SE5/vHkHi qzgCk6EctIw9+jHV9x2iX5Zz4NXmrGfEj5Dt4AzZEqMqLS83NEF+JKgCl0eQKlExPsl0 R5Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695469819; x=1696074619; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gkMg6Ss1ODOcr8VdxRq6yPqfjTyE6Onn/Fwc4BWB7DM=; b=IEOa8wLaZ6ZJ9MC0jm8wO4fakzHUSGb/Idq0g4+QqzYBfQOgBAGzM+wnmOtk150gDL TsPOVi0XI4pY+9LVQ+46LxJDatVflshC+/C4PTpa1xN+3EritDC2eW/by/tsdt1u0LlM w7bGBenqBeKrAUpYCgWDzl+cmwRMCWweS71vPQsvIaG89yFfJ66Mp1P4zRyeHXRZBlvN G7S09jjLdtUJ+s8FnhgBmWNhzW6TmRxJNVwJfTZ8WuP8/1IT03CGxy46EGbKDkB0SVFW QR/P9wNNVUD1pCrsIwoTQrF2N/DcsoygZrYK2VxyPO36/uNQ4A78ZhfPUhKURrtyFBzJ JFHA== X-Gm-Message-State: AOJu0YzJPC9/v8bzzX0eEGdgSfhKVPxzpxcKdK/Z+ferXVZKy0fGXEms xfij8Ce8AWMjDrWS20122ireJw== X-Received: by 2002:a17:906:310d:b0:9a2:24f9:fabe with SMTP id 13-20020a170906310d00b009a224f9fabemr2003596ejx.66.1695469818880; Sat, 23 Sep 2023 04:50:18 -0700 (PDT) Received: from hackbox.lan ([86.120.16.169]) by smtp.gmail.com with ESMTPSA id k15-20020a1709062a4f00b009ad8084e08asm3853310eje.0.2023.09.23.04.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 04:50:18 -0700 (PDT) From: Abel Vesa To: "Rafael J . Wysocki" , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown , Greg Kroah-Hartman , Bjorn Andersson , Andy Gross , Konrad Dybcio , Mike Turquette , Stephen Boyd , Taniya Das Cc: linux-pm@vger.kernel.org, Linux Kernel Mailing List , linux-arm-msm@vger.kernel.org, Taniya Das Subject: [RESEND v3 2/5] PM: domains: Add the domain HW-managed mode to the summary Date: Sat, 23 Sep 2023 14:50:05 +0300 Message-Id: <20230923115008.1698384-3-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230923115008.1698384-1-abel.vesa@linaro.org> References: <20230923115008.1698384-1-abel.vesa@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 23 Sep 2023 04:51:00 -0700 (PDT) X-Spam-Level: ** Now that genpd supports dynamically switching the control for an attached device between hardware- and software-mode, let's add this information to the genpd summary in debugfs. Suggested-by: Taniya Das Signed-off-by: Abel Vesa Reviewed-by: Ulf Hansson --- drivers/base/power/domain.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index dfb4f1de540d..93350e67b0e8 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -3171,6 +3171,15 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev) seq_printf(s, "%-25s ", p); } +static void mode_status_str(struct seq_file *s, struct device *dev) +{ + struct generic_pm_domain_data *gpd_data; + + gpd_data = to_gpd_data(dev->power.subsys_data->domain_data); + + seq_printf(s, "%20s", gpd_data->hw_mode ? "HW" : "SW"); +} + static void perf_status_str(struct seq_file *s, struct device *dev) { struct generic_pm_domain_data *gpd_data; @@ -3229,6 +3238,7 @@ static int genpd_summary_one(struct seq_file *s, seq_printf(s, "\n %-50s ", kobj_path); rtpm_status_str(s, pm_data->dev); perf_status_str(s, pm_data->dev); + mode_status_str(s, pm_data->dev); kfree(kobj_path); } @@ -3245,8 +3255,9 @@ static int summary_show(struct seq_file *s, void *data) int ret = 0; seq_puts(s, "domain status children performance\n"); - seq_puts(s, " /device runtime status\n"); - seq_puts(s, "----------------------------------------------------------------------------------------------\n"); + seq_puts(s, " /device runtime status managed by\n"); + seq_puts(s, "------------------------------------------------------------------------------------------------------------\n"); + ret = mutex_lock_interruptible(&gpd_list_lock); if (ret) -- 2.34.1