Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1198132rdb; Wed, 1 Nov 2023 14:26:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMiUOdj30TRA7DCouwU5uDa5sZ/4u76s0B8G8kiSQJ48VaD38A+WVXdJYGiccK9yFqHisK X-Received: by 2002:a05:6359:2d49:b0:168:cf01:8232 with SMTP id rm9-20020a0563592d4900b00168cf018232mr13965369rwb.9.1698874003584; Wed, 01 Nov 2023 14:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698874003; cv=none; d=google.com; s=arc-20160816; b=Vmk9KBVBob3oxmUj4XPl/srXsyXuRiWFEOxysTE3r/pLaG+tg6YLg5DQ4GB3zvhRoP F/XccWYmSPSyxTuCJ1VGVhPvnVvUvd6xfWpA4Pg0ThOMlRhVbIUOtAudGEYAtI5m7yYg YRKbbysrwUj0eYxEZ9lW4zYmJxL25QVY77tcrVerPfA1GOo/W3xs++gHUYEIXc9pYmEW Iz19DzBhdkPzhDXVTNr9PgGx20uq0RbdCsu0IpJw0s9qcwYh9UIv9q/M7Cp3SMIppEuV tHdbWrNlbmgOgyPvV5JZ9LkFpYszNuxWvOlMukqAk1mtHQ5ddIilZisK4YCESqPu3f24 vAjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dM+LROLHmfkfBpSjaW1PZaGn9FpCSaF42cM5WqtKLcg=; fh=07Ni0uhgZ/btiXAheGmf3D7ateqVF1FEP8FukQI3evA=; b=W9cPxuLGdVfFebVXhKT97BdP+LkI4gZ1w4xxuiluJxu9LOk3uClsv41bO1AkTaA05B GscfxkHzgLrzdCe6t8HDB2+1aN3cHJ7Qe5oroFsVVrRzyRF7IuyRdKWUjN+SgQxhzJ7m WMAEKaiRPYhgqHlhGvI1tjq+4lmoyTy7UDb7PEyvBjkWJDZ+CSJD76+wOxNv02r+vrln SxaHKucGzLHgMgllrVOa2zwyMy3rqWdA0hQheJOUB/+Haxoz4G0w8fAr7wb9bAF3O7nH 9paNVM83FAzn/8EM6As77A6WVDNiCzQ/IqW11jWXtrO1tIVsC1c13MKbErNEGS4/ofMD FyZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zKOe3Qtq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s191-20020a6377c8000000b005bd038942e3si644570pgc.344.2023.11.01.14.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 14:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zKOe3Qtq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id C3C408194763; Wed, 1 Nov 2023 14:26:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345506AbjKAV0Z (ORCPT + 99 others); Wed, 1 Nov 2023 17:26:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345467AbjKAV0V (ORCPT ); Wed, 1 Nov 2023 17:26:21 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B537511D for ; Wed, 1 Nov 2023 14:26:15 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-5a84204e7aeso3845667b3.0 for ; Wed, 01 Nov 2023 14:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698873975; x=1699478775; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dM+LROLHmfkfBpSjaW1PZaGn9FpCSaF42cM5WqtKLcg=; b=zKOe3QtqKy97r7XIo9YXDIoPsTtLkRg9ZoRf9e9UJB0h3FxNFBDQE2lu2D3ZcFBrv5 oUBYc7Bk0hFee1Y3rXeeil+8qdWFmOzyOv0Oc7CzkMcKAiqVqjKWzeeLdKg22+KoqurW NoAijegqGCLDamykt/PnMtunCFBMVzIZH47f1T8N/Hpl36S9y5DBe4BBBMdtjBXi9Enz VPK82C7IdiOc6p7CR9SHWyvOEfj4z4VejlzGVTaT4kC8n5YI9OVAEuXDC8JIi6omUB/I oWgaN9t35P3DVwxCmCletC9tuDaYmzdw4EQEkpEK6eXx5+tgIU8RlUzk2oibNuO2PIgm K1dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698873975; x=1699478775; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dM+LROLHmfkfBpSjaW1PZaGn9FpCSaF42cM5WqtKLcg=; b=BtyEje/GJwmctWsUSBUdjn7N4QoJNYtzS14nbrWAftnu6ZX1MVaJH3lOfHA0oQPG/8 bk7TiDaL6zjFq1y1GeSvjW9vStbifsiFgJi86gmlSKCU1R9Z8rtW0ZOyS3+WLsgW4/Ty NuJwDHk6swPHBgb0wVFB/+qFApB25YUTYn/tdRY9SH8lTOmycMbRJcSL/LQbn1aH4OFB z4vRJclGo/fXcPAobVBMivPtu5qba3xHiFRp92M7eNJyox6yz0pNyKtsnbyBzO08msGE 4tYJIdOCgINr2xS7k/35/5Rhcqrdfw9ygE4zPtYqUIsVyj8YNXNXfTCTLv0sbLwrSCy2 rF+A== X-Gm-Message-State: AOJu0YyqXzQ64tVGjaUkCHSvsqJnbFU5lMC2YnfyR/ZrQ75BqFapXm2W Dtol7JdR2XZuo+Fb59Hu6zENrLtzxHl0ATF9vjJSRw== X-Received: by 2002:a81:c404:0:b0:5a7:bc0e:193e with SMTP id j4-20020a81c404000000b005a7bc0e193emr17704074ywi.18.1698873974900; Wed, 01 Nov 2023 14:26:14 -0700 (PDT) MIME-Version: 1.0 References: <20231101-gdsc-hwctrl-v3-0-0740ae6b2b04@linaro.org> <20231101-gdsc-hwctrl-v3-1-0740ae6b2b04@linaro.org> In-Reply-To: <20231101-gdsc-hwctrl-v3-1-0740ae6b2b04@linaro.org> From: Dmitry Baryshkov Date: Wed, 1 Nov 2023 23:26:04 +0200 Message-ID: Subject: Re: [PATCH RESEND v3 1/5] PM: domains: Allow devices attached to genpd to be managed by HW To: Abel Vesa Cc: "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown , Greg Kroah-Hartman , Bjorn Andersson , Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , Stanimir Varbanov , Vikash Garodia , "Bryan O'Donoghue" , Mauro Carvalho Chehab , Taniya Das , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 01 Nov 2023 14:26:33 -0700 (PDT) On Wed, 1 Nov 2023 at 11:08, Abel Vesa wrote: > > From: Ulf Hansson > > Some power-domains may be capable of relying on the HW to control the power > for a device that's hooked up to it. Typically, for these kinds of > configurations the device doesn't really need to be attached to a PM domain > (genpd), from Linux point of view. However, in some cases the behaviour of > the power-domain and its device can be changed in runtime. > > To allow a consumer driver to change the behaviour of the PM domain for its > device, let's provide a new function, dev_pm_genpd_set_hwmode(). Moreover, > let's add a corresponding optional genpd callback, ->set_hwmode_dev(), > which the genpd provider should implement if it can support switching > between HW controlled mode and SW controlled mode. Similarly, add the > dev_pm_genpd_get_hwmode() to allow consumers to read the current mode and > its corresponding optional genpd callback, ->get_hwmode_dev(), which the > genpd provider can also implement for reading back the mode from the > hardware. > > Signed-off-by: Ulf Hansson > Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry