From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1455C433E0 for ; Wed, 3 Feb 2021 14:40:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41FA264E3D for ; Wed, 3 Feb 2021 14:40:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41FA264E3D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XxgAFVmNY0sgWxrxChzTwF3QGC8QFv59NaIPq+Ka5Lc=; b=dMYZ8ddxJHEOQ5+sTGl5WTSqP zB87W+NQRMLqnxz/2CBAu0n8ZF+cSPF6OrN7fsBjHDlmaWG81urinyI7sBmHooj+pDkFaPTWihLKV OgPMZfgIaafQdSFMc0sMzDVBjq8v4QiwXHtPfZh3hFjTmQ8jpAQu/6/lBPaXjgR5FQle1kB4CvS5J QVkdTCEIE3jLH1SynFkkGa0pwTricrgka9jIg3Bein1ENnijiXOfgPPaI9996TZ07A0EYYhdge4tW 3W1n5FgSI41ySOV8eh1wpHC4tj2Wwq9JyHRFe12KTZdgUwIKmVlHdVcnDi/Xr0bCkOEAJasZ4ye7n ENJJ51YWg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7JJV-0006Co-Pm; Wed, 03 Feb 2021 14:39:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7JJS-0006BI-5n for linux-arm-kernel@lists.infradead.org; Wed, 03 Feb 2021 14:39:23 +0000 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 619BF11FB; Wed, 3 Feb 2021 06:39:20 -0800 (PST) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 60AA03F73B; Wed, 3 Feb 2021 06:39:18 -0800 (PST) Date: Wed, 3 Feb 2021 14:39:15 +0000 From: Cristian Marussi To: Mark Brown Subject: Re: [PATCH v6 29/37] regulator: scmi: port driver to the new scmi_voltage_proto_ops interface Message-ID: <20210203143915.GE8355@e120937-lin> References: <20210202221555.41167-1-cristian.marussi@arm.com> <20210202221555.41167-30-cristian.marussi@arm.com> <20210203132432.GD4880@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210203132432.GD4880@sirena.org.uk> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210203_093922_304764_55DCDBC8 X-CRM114-Status: GOOD ( 17.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f.fainelli@gmail.com, vincent.guittot@linaro.org, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, thara.gopinath@linaro.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, souvik.chakravarty@arm.com, etienne.carriere@linaro.org, lukasz.luba@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mark On Wed, Feb 03, 2021 at 01:24:32PM +0000, Mark Brown wrote: > On Tue, Feb 02, 2021 at 10:15:47PM +0000, Cristian Marussi wrote: > > Port driver to the new SCMI Voltage interface based on protocol handles > > and common devm_get_ops(). > > I have no cover letter or other context for this, what's the story here? Sorry I've CCed only the relevant patches to the subsystem maintainers. The whole story is in the series cover-letter here: https://lore.kernel.org/linux-arm-kernel/20210202221555.41167-1-cristian.marussi@arm.com/ In summary we wanted to ease both protocols modularization in general and1 the implementation of custom vendor custom protocols and drivers (as allowed by SCMI spec): to do that I reviewed the internals of SCMI protos handling to centralize resource accounting (so that I can track who is using which protocol at any time), and I generalized the interface exposed to the SCMI drivers so that as an example: handle->voltage_ops->level_set(handle, ...) becomes: /*get access to the proto and ops in probe()*/ vops = handle->devm_get_protocol(handle, SCMI_PROTOCOL_VOLTAGE, &ph); /* use it */ vops->level_set(ph, ...) This way the interface is unified for all protocols both standard and custom and if you develop a new custom proto implementation, and driver, you'll end-up using it in a similar way: cops = handle->devm_get_protocol(handle, SCMI_PROTOCOL_CUSTOM, &ph); cops->custom_method(ph, ) without having to add an endless stream of new custom *_ops structs to the handle struct. To attain the above, though, there are also a number of internal changes in the series that are tightly related to the drivers' interface which I am changing as an example with this patch, so the series contains a bit of transient code added and removed along the way around the drivers changes to maintain bisectability throughout all the series. Apologies to have not included the cover-letter at first to provide context. Thanks Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel