Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10004658rwr; Fri, 12 May 2023 02:20:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74jDd+4Cjl+YzBhO50C5D6Qxzlypk5KlE0cHpmR+/L9V1SkkWd+mIpnvs0FjSUOhwGgG3B X-Received: by 2002:a05:6a00:1a89:b0:636:e0fb:8c44 with SMTP id e9-20020a056a001a8900b00636e0fb8c44mr29201306pfv.12.1683883224215; Fri, 12 May 2023 02:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683883224; cv=none; d=google.com; s=arc-20160816; b=A2Ucx9BhyxVoeJuqYCySaveWmncEeV/qrvXnfYUT2BCe2HeSBJ8Gx23FiwFFmHf5+d WZuLPGJNuu4IM2qwlx1FtVzMp6UIVmzWlSqrS1E6F1Qj1jEIdYdQ5xH8BJ1X+09hSTf5 p5B098NVpYIFlU2/+QL1SMBPkleF6w1vqawrXCIksb9jZ5CmK5e+6AndgwLwhieBbA20 M0A04m6WqjI5eL8S33fXPtfoP2+jDqUsh2Tvua9ckXb9B1/cgeNGwcDN6FpNhL50pghD NJwMHKvIIolc2bv6Cg2ot7eSQJToAHoST9MJYb9bpOXPz06syi29UCy0YAb2T+MgPAuJ L4wA== 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=OrwLpj2bKjWdEd1mF+h5aE6dAZExouL0jiennF6RRYw=; b=ZD+3b0GeQ5duoNqXOtwCNuuB3tWJpkA3r8AZXe82Qjry3tyeuHldqJLKXCrMNyI5Hx Tp8brePK26TFMJUuBhtUTte/7RG9tQFcayeJqRIhOfpp1oRLoWPOnFvWsXRNP+U7HFEx xJcjevSqM0EVdfxl35fHV0uHlGsztWHt7nxIN4FRYNNKthTAK3NHrp6gh7k7xQCiBNDh zR6shr2Lx9T+oUnxsts+cp9fl0K8CspV3KIK4gfrYTopmcZH4AI94kcLQ+dKNbeBhSQR DpdnFYoaq2U1dhkeNQm+1EAoGQrsmNIHW7kHGg5WGg5NTtzcm4tj7mQurRdD+pEtmr/d cwaQ== 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 h18-20020aa79f52000000b0064aef84eb1esi190031pfr.51.2023.05.12.02.20.12; Fri, 12 May 2023 02:20:24 -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 S240319AbjELJFN (ORCPT + 99 others); Fri, 12 May 2023 05:05:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240072AbjELJFJ (ORCPT ); Fri, 12 May 2023 05:05:09 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D78B11548; Fri, 12 May 2023 02:04:47 -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 A57FCFEC; Fri, 12 May 2023 02:05:29 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C9B123F663; Fri, 12 May 2023 02:04:43 -0700 (PDT) Date: Fri, 12 May 2023 10:04:41 +0100 From: Cristian Marussi To: Oleksii Moisieiev Cc: "andy.shevchenko@gmail.com" , "sudeep.holla@arm.com" , Linus Walleij , Peng Fan , Michal Simek , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-gpio@vger.kernel.org" Subject: Re: [RFC v2 2/3] pinctrl: Implementation of the generic scmi-pinctrl driver Message-ID: References: <812ae71d017b115c55648dbf0a4c3502715b1955.1682513390.git.oleksii_moisieiev@epam.com> <152bbad1-a759-df18-1efa-4e25c54847d9@epam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152bbad1-a759-df18-1efa-4e25c54847d9@epam.com> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 Thu, May 11, 2023 at 01:15:46PM +0000, Oleksii Moisieiev wrote: > Hello Andy, > > On 05.05.23 23:35, andy.shevchenko@gmail.com wrote: > > Wed, Apr 26, 2023 at 01:26:37PM +0000, Oleksii Moisieiev kirjoitti: > >> scmi-pinctrl driver implements pinctrl driver interface and using > >> SCMI protocol to redirect messages from pinctrl subsystem SDK to > >> SCP firmware, which does the changes in HW. > >> > >> This setup expects SCP firmware (or similar system, such as ATF) > >> to be installed on the platform, which implements pinctrl driver > >> for the specific platform. > >> > >> SCMI-Pinctrl driver should be configured from the device-tree and uses > >> generic device-tree mappings for the configuration. > > > > ... > > > >> +#include > >> +#include > > > >> +#include > > > > I do not see any user of this header. Do you? > > > Yes, thanks. Removing > > >> +#include > >> +#include > >> + > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > > > >> +#include > >> +#include > > > > Please, move these two to the upper group of the generic headers. > > > Thanks, fixed. > > >> +struct scmi_pinctrl_funcs { > >> + unsigned int num_groups; > >> + const char **groups; > >> +}; > > > > Please, use struct pinfunction. > > > I can't use pincfunction here because it has the following groups > definition: > const char * const *groups; > > Which is meant to be constantly allocated. > So I when I try to gather list of groups in > pinctrl_scmi_get_function_groups I will receive compilation error. > Maybe this is a further signal that we should re-evaluate the benefits of the lazy allocations you now perform during protocol initialization instead of querying and allocating statically all the info structs about existing resources. Not saying that is necessarily bad, I understood your points about reducing the number of SCMI queries during boot and let pinctrl subsystem trigger only the strictly needed one, just saying maybe good to reason a bit more about this once V3 is posted. (i.e. I could bother you more :P ..) Thanks, Cristian P.S. [off-topic]: remember to use get_maintainer.pl as advised elsewhere to include proper maintainers (and their bots)