Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1314372imi; Fri, 1 Jul 2022 07:18:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vozd/+Wt/J07exCwRjTxlfEBN1xy58T48LQAcrvucV9fP5pEaf56wxOvI64LnD05suT3MP X-Received: by 2002:a05:6a00:21c8:b0:4c4:4bd:dc17 with SMTP id t8-20020a056a0021c800b004c404bddc17mr20428344pfj.57.1656685120855; Fri, 01 Jul 2022 07:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656685120; cv=none; d=google.com; s=arc-20160816; b=emgJCviFGX0z/99XKFBbtzfTGp4KVtzBA53cOeMCGSKwluDU8LkXTWe8oXNxUoxSWP IPHqmUpHTxK4qozw9LzzAsc1AxNeX/KAYITKjPEspg/FO9C++6gdQdSPBjUiNn1NO/Mj hEjx4AmfJG+8wySyV5MKUjFRgZODYNusV37atOjqUkctDFKFYi8u9WTtWFKiMX4cGhgL xRp7Xpqy2aR20LlZJs4wNwvX2A5ctLNJBofWwSW2DC092erg11HJueYz1U6l9nU9M1ku 3ssxNfncOi/+/uuV5KzQXxa8G3l7p17NdZmjuGACORlVMl3Fp+rIzXlcCqJw/e5XBIzn S4Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=E/ZW4iKQgIn2QOtNWXM1D3z/eb/VD5c4+t5tskDUxWQ=; b=r26ZWL+fJsCFaCZj0Z+Pzy3BneVOPn0DECiJb2B4qLOvnqo0FEzCuXYSM9yEuc0j5+ 5DlnNXvOOR2C+pGnBSP/28VPAHoaw35QWRZezbo9ZoYB2E/vBfdtU2PL7ITncd2Z4r/r IFPqZSXfs/q/LQI+lUheoPlFyGBLy9d3XT/UkBhzUxRx8oIjZk8Gp3CK43VVtlRbuabx BLpqSufOWu68kF/92fUjhUlXxI0udU3h3DQaQkFF7XaiumG8+mt/LCQpUfqoFZjFJtMh XtXfnQwcEQt0geLOkSunLVSMyavDVj701zaeaESICN7LTmLq6ZHP2pU8gukHfrwSZmxg G46Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a170902700700b0016a1b60636fsi28719745plk.57.2022.07.01.07.18.28; Fri, 01 Jul 2022 07:18:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230073AbiGAOJx (ORCPT + 99 others); Fri, 1 Jul 2022 10:09:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiGAOJv (ORCPT ); Fri, 1 Jul 2022 10:09:51 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8027234659 for ; Fri, 1 Jul 2022 07:09:50 -0700 (PDT) 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 8E60F113E; Fri, 1 Jul 2022 07:09:50 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 808383F792; Fri, 1 Jul 2022 07:09:48 -0700 (PDT) Date: Fri, 1 Jul 2022 15:09:46 +0100 From: Sudeep Holla To: Cristian Marussi Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, daniel.lezcano@linaro.org, tarek.el-sherbiny@arm.com, adrian.slatineanu@arm.com, souvik.chakravarty@arm.com, wleavitt@marvell.com, wbartczak@marvell.com Subject: Re: [PATCH v3 8/9] firmware: arm_scmi: Add scmi_driver optional setup/teardown callbacks Message-ID: <20220701140946.uar5ohadyjksf2ka@bogus> References: <20220627123038.1427067-1-cristian.marussi@arm.com> <20220627123038.1427067-9-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220627123038.1427067-9-cristian.marussi@arm.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On Mon, Jun 27, 2022 at 01:30:37PM +0100, Cristian Marussi wrote: > Add optional .setup and .teardown methods to the scmi_driver descriptor: > such callbacks, if provided, will be called by the SCIM core at driver > registration time, so that, an SCMI driver, registered as usual with the > module_scmi_driver() helper macro, can provide custom callbacks to be > run once for all at module load/unload time to perform specific setup > or teardown operations before/after .probe and .remove steps. > What can't the driver call this setup/teardown on its own before/after calling scmi_driver_register/unregister ? Based on the usage in 9/9, I guess it is mainly to use the module_scmi_driver ? If so, I would avoid using that or have another macro to manage this setup/teardown(once there are multiple users for that). IMO, it doesn't make sense to add callbacks to do things that are outside the scope of scmi drivers. No ? -- Regards, Sudeep