Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2426553rda; Wed, 25 Oct 2023 02:18:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH797nzNqqZxvhkw5f36CEFdUsMFeDQWFhh8gTmdgAaOFbXP/ivAW19UgifxuqOJNRLo45T X-Received: by 2002:a05:6902:507:b0:d9a:be79:c902 with SMTP id x7-20020a056902050700b00d9abe79c902mr14230770ybs.53.1698225513648; Wed, 25 Oct 2023 02:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698225513; cv=none; d=google.com; s=arc-20160816; b=tlKPDvp+kY+xc6EKqDJZxNIDH82rH1U/ozA5I0xdSk4wsaR/N5OUqViV2GJ5ji9wBd qTcKJED9XiuRKr82m6sUNSGakY+ndEbeujV8Z1V7R6XDLSnB7uTC/w90wdNh21fi91CV zrPb9T8BYzOJFlF0w4KB3+Pa7cOB40UWodGvE+T/ZNnYWCpAYTAWGiMPXQESGN59vAAl S6IedlMK00j0PobBa3zGNjAMnehr3kdxnNYjWHIaEN8d0v2kgllFaxiudvOMP//lJX03 mXEEvF62JwGaOepm/pxemFxfDTQIKqhxudVLpSerPRD0mHc1qxUIKot/ykphVT3H7sGI KIfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BAHJikpep9ynpiLuY3eXxwOgPXKE7wTHSFE/9ZFm21A=; fh=mDQ0Wi695RR6beRIE/oUQG43hakFTNuvfHb9BPzAtAc=; b=qQUPyLmlgPBHyx7QuES3sj/gP2kgYu16kcJG96lpTJyOpjCHLStMVgRzcQcbeDZ79y CxaqKY7I5UDdtH2hokG7q/GouYgnqtKrMv894rY73JE4yZ/4C4TCMBSgJ1zrRWft3buJ kj4KpiAs0xVqrn8qNKRW46lWjPYbCJlJCS+qsXAHTBDiWGsbsMb1Tqqhq+P7Cjb9/raH gAj/oALAkDWIGiy5hehzWTsJBMYzP5aLXB3M/J66FXRhijuyUilcW/De9QCMFr8NoVTm Iq82nPBUtTn0i+T39LMff+b2xbcu750wCl1fDZKmW376mlq+5i+67i0+mtggpzTuNmGq J6ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bRT28XsL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id w197-20020a25dfce000000b00da05a32525csi2606490ybg.238.2023.10.25.02.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 02:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bRT28XsL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 345F9801B73C; Wed, 25 Oct 2023 02:18:32 -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 S232291AbjJYJS2 (ORCPT + 99 others); Wed, 25 Oct 2023 05:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233306AbjJYJS1 (ORCPT ); Wed, 25 Oct 2023 05:18:27 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CF89130 for ; Wed, 25 Oct 2023 02:18:24 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507adc3381cso7966628e87.3 for ; Wed, 25 Oct 2023 02:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698225503; x=1698830303; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BAHJikpep9ynpiLuY3eXxwOgPXKE7wTHSFE/9ZFm21A=; b=bRT28XsLgswaqZEF4ilV0xXxuzoFkSdowsODyRo4sNDxCUM4JRJzFZU/NBT0wLzk3s 3IIcn5mnJ9KIf1AzV8/jWonC6sK059gxMWlAuC1G6XKbGNkHJof74IWhxOJX4HtEM36y dtlRNQFQ51ppRbqomBh32eDWmOhlODtdiqMAtwo3gKi3KOZu03afBdeuHs5b1MAXxegQ RuMlu6b5G8d2EJ4IbU0vBsXPlUv5QrwTCpQDmXuZArHzZk0c19ZZPte6pGONndVwxxfo 0e4hk8cKGqh/xtXDaQdloq2BkQyqBvoR9j+VGU7haqiRwMMflu/R+05FihxlAFfpxPsj aETw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698225503; x=1698830303; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BAHJikpep9ynpiLuY3eXxwOgPXKE7wTHSFE/9ZFm21A=; b=pmiEtdehtSsxgPVyJELfE3BqXcXabP7uVNAs0ytYNY+EQK5ci5n0+kNhA+gSXgPopW oWr/oCFh4ZXbTc1o/Z/PlGOCJRvSzwyovHxDnvkj5CAr17f0yKWTorokeriiXQwLcRhZ xVuabCtcmdh+JkntgKpvkGz2k6goIqK/H6w5fekoHKMz1rrtLJJjsMzXJxSeZ2dWwWYI 7pmK+V78qEuQX+adDvelrET1Rfnqz/lzlKxny+zeYwkrglSEtt0NWhrzvagpNskDEKQ/ /csbDfeoHzCgoNjKfhdFg8EzVKVD3hRb0GkrJ8RyZ2y5TNH7H87nVOQ7dAy1eh4EWaL6 oU2w== X-Gm-Message-State: AOJu0YwoEq+guyS1qyNavQuyD7vEAQ45+Vj6BEMppEuja7iiwkJvatmq nCARSN7BEFNX3MfBrmipptIJlQ== X-Received: by 2002:a05:6512:3085:b0:4fb:8939:d95c with SMTP id z5-20020a056512308500b004fb8939d95cmr12502304lfd.30.1698225502780; Wed, 25 Oct 2023 02:18:22 -0700 (PDT) Received: from [172.30.204.57] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id w4-20020a05651234c400b005057a5587f0sm2471866lfr.52.2023.10.25.02.18.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 02:18:22 -0700 (PDT) Message-ID: Date: Wed, 25 Oct 2023 11:18:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] media: qcom: camss: Use common VFE pm_domain_on/pm_domain_off where applicable Content-Language: en-US To: Bryan O'Donoghue , hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, rfoss@kernel.org, todor.too@gmail.com, agross@kernel.org, andersson@kernel.org, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231024224255.754779-1-bryan.odonoghue@linaro.org> <20231024224255.754779-3-bryan.odonoghue@linaro.org> From: Konrad Dybcio In-Reply-To: <20231024224255.754779-3-bryan.odonoghue@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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, 25 Oct 2023 02:18:32 -0700 (PDT) On 10/25/23 00:42, Bryan O'Donoghue wrote: > For the various versions of VFE we have a boiler-plate > pm_domain_on/pm_domain_off callback pair of the general form. > > - Error check. > Not always done but applicable to all. > > - device_link_add (DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | > DL_FLAG_RPM_ACTIVE); > > - Error check returning -EINVAL on error. > > - Return 0 > > Reduce the pattern down to a common callback. VFE 4.1 is a special case > which to me also indicates that it is worthwhile maintaining an indirection > for the vfe_pm_domain_{on|off} for now. Are there issues when powering it off like all the others? > > Otherwise lets chuck out a bunch of needlessly replicated code. > > Signed-off-by: Bryan O'Donoghue > --- Reviewed-by: Konrad Dybcio Konrad