Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5170830pxu; Wed, 21 Oct 2020 15:55:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdXowd0sIcJ0aqYedC8ADGG0CbfLfC5EbmOQ1WVi6IpEm6opAb3kx3oChmrxtkPQMnx3oi X-Received: by 2002:a17:907:43c6:: with SMTP id i6mr5624126ejs.207.1603320959560; Wed, 21 Oct 2020 15:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603320959; cv=none; d=google.com; s=arc-20160816; b=GEoWzoL2AmjbOLba8exOFGkOd0E+xY7kh9E+0ATLcryAVDzkG7YxtSBBAlU7OueCJ4 kBMBmz465oLvB4FX1npo7LUCbEqavydL8oTeFmlsxm+zSaDuImwZwDkTfJmRnPWXw309 Qw0t9dc3XHqrw6TrpKunYDYR6UCRLY/daZhBP9VcG14iFCm45yRq7QrgEiWfEqYELr8C xRjPndSuG3zqlo92V3yQ63w6UZft7Y8slzT25ChIMEZxOcwhLwmdxOWoFW47X8kdmvhe 7JEPIY/mmsbzX0JkMXrgCOdZvkzRftpYlXnzRpKhwpHw4vTBu5cDfFiRnRUtN6C6Xx8c se7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=x//8KCqSbuJ38GEf4gsi1UrP5a4QjHge6FXy8zpb12Y=; b=SnY+pK8XPq2oThjBRCsmhMh4i4Imeyl/SvbD0CYv1Qr5Ll3uyrO4hOsXBYtCc7936h gxgSQphn3gv/ZZX0/N0UwtVItF2JwrBgTDcTiHccAqcRv6elIQsQ8iM6VdUqOXu82l8s BdZNdzyfLEIfg1AIB35AX426opfPjosXQ/H4+meeoHL+ncaN1fCM3BNHB8bDIwAXSwqb dpH/7m7QtwCXxP1ZtanqJbEr7E7A07vEoH6q8bTN7yGh3jlWm/gfyeNiRERXodyHL+rM 7Q4+R93Zg1jHmRdTSwEZfKlT1Mbw5Gx/Wcosej6v/9j1WyByaLG775XqUAhgIS43H4do QPgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si2264588edw.393.2020.10.21.15.55.22; Wed, 21 Oct 2020 15:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441762AbgJUKaN (ORCPT + 99 others); Wed, 21 Oct 2020 06:30:13 -0400 Received: from foss.arm.com ([217.140.110.172]:33236 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410020AbgJUKaM (ORCPT ); Wed, 21 Oct 2020 06:30:12 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F306A1FB; Wed, 21 Oct 2020 03:30:11 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 526433F66E; Wed, 21 Oct 2020 03:30:10 -0700 (PDT) Date: Wed, 21 Oct 2020 11:30:08 +0100 From: Cristian Marussi To: Thara Gopinath Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, lukasz.luba@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com Subject: Re: [PATCH 06/11] firmware: arm_scmi: add support for protocol modularization Message-ID: <20201021103008.GC20482@e120937-lin> References: <20201014150545.44807-1-cristian.marussi@arm.com> <20201014150545.44807-7-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2020 at 10:47:28PM -0400, Thara Gopinath wrote: > > > On 10/14/20 11:05 AM, Cristian Marussi wrote: > > Modify protocol initialization callback adding a new parameter representing > > a reference to the available xfer core operations and introduce a macro to > > simply register with the core new protocols as loadable drivers. > > Keep standard protocols as builtin. > > > > Signed-off-by: Cristian Marussi > > --- > > drivers/firmware/arm_scmi/base.c | 56 ++++++++++-------- > > drivers/firmware/arm_scmi/bus.c | 14 ++++- > > drivers/firmware/arm_scmi/clock.c | 56 +++++++++--------- > > drivers/firmware/arm_scmi/common.h | 42 +++++++++----- > > drivers/firmware/arm_scmi/driver.c | 50 ++++++++++------ > > drivers/firmware/arm_scmi/perf.c | 88 +++++++++++++++-------------- > > drivers/firmware/arm_scmi/power.c | 46 ++++++++------- > > drivers/firmware/arm_scmi/reset.c | 46 ++++++++------- > > drivers/firmware/arm_scmi/sensors.c | 52 +++++++++-------- > > drivers/firmware/arm_scmi/system.c | 16 ++++-- > > include/linux/scmi_protocol.h | 18 +++++- > > 11 files changed, 288 insertions(+), 196 deletions(-) > > > > diff --git a/drivers/firmware/arm_scmi/base.c b/drivers/firmware/arm_scmi/base.c > > index f40821eeb103..8d7214fd2187 100644 > > --- a/drivers/firmware/arm_scmi/base.c > > +++ b/drivers/firmware/arm_scmi/base.c > > @@ -15,6 +15,8 @@ > > #define SCMI_BASE_NUM_SOURCES 1 > > #define SCMI_BASE_MAX_CMD_ERR_COUNT 1024 > > +static const struct scmi_xfer_ops *ops; > > Minor nit. I would consider renaming ops to something more > meaningful like xfer_ops (or anything that makes sense). ops by > itself leads to confusion with ops in scmo_protocol and in > scmi_protocol_events. > > Same suggestion for all other declarations of ops in this patch. > I agree, but I'm in fact reworking deeply the interface for protocols initialization (following some idea from Florian) in order to pass down a protocol object including the xfer_ops instead of a handle+ops like now, so this hopefully will solve also this concern. Thanks Cristian > -- > Warm Regards > Thara