Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10506266rwr; Fri, 12 May 2023 09:01:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7J65NV4ZnoRph9T7UiuBrQcUv09DvUZcxgncnGkoL1UNpkrTB1Zm7UJcNx8PFNc8Dgzi/d X-Received: by 2002:a05:6a00:2309:b0:63d:254a:3902 with SMTP id h9-20020a056a00230900b0063d254a3902mr35435833pfh.12.1683907278077; Fri, 12 May 2023 09:01:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683907278; cv=none; d=google.com; s=arc-20160816; b=xJWhrG1TkFmQeJs4OoDnPO2b4k21DKF/ToUngCyKhh6wedDjOdbL5DpybkUdZHLbEH lSKJdPVdBl7iIF85oYH0IpxMBqSL/F7EAU2nIim4vgktdRdIWHT9XByXrhTNgwM3k1aY A8eDDHS1WPen7mS2V4A2WooblrsAtKhH9vVlSeXuneN1PKhLK6+L04vAzhVakkxgaRFI XxIT9NIoMTPuy953NhXxrbLs4BmCkpX7UHtAnGJr29JJlUCmWbHd/i6tULczWwuqvEke lLF+QmYNTI0XCJJ3C2bScD2TxW98s56RgQwTJGsa3DH9wy93Y5ktOs42o3z1037/Elai tJsA== 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 :dkim-signature; bh=zl0ldLfzh9j85o71T2rHSTrpljoM4oRRhLiS/QXwhMs=; b=E9MSDX0zSbE680uYNxcQkykKiJlJd0ASZPrrMVFqk0OL3dRLynC9o4kWCFfBCMGtOA L1p1ZDXo8oN7DHYz6iEZFGMgvn+sw4XJTMXGnkwEyOKtnYFNVU+ImDhQK7BKxKWFp8TG q7bgi8aj2Bex2X9HJA9QFhSrbxrjEPRko+E3ZZZlnDgTpTX8MGap1FkXmp9EvemFlQZm SG4uKfx+4Th39k8j8b5dpUdgcJuRReeyvQY+E8p0T0XRA+amcAD78eg8OfyrLvUL3eE/ o20utWIWkKLPj09JE4mwbEFgwvq0tzLEJRIKoRCIEg8C65fZpDw0k7NXHwaJfUnHfrP3 JC4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=NKySjRrw; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020aa79f4e000000b00645e8c9e282si10411324pfr.189.2023.05.12.09.01.02; Fri, 12 May 2023 09:01:18 -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; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=NKySjRrw; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241754AbjELPyr (ORCPT + 99 others); Fri, 12 May 2023 11:54:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242012AbjELPyp (ORCPT ); Fri, 12 May 2023 11:54:45 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D600E449D; Fri, 12 May 2023 08:54:38 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34C79ThA025224; Fri, 12 May 2023 10:54:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=zl0ldLfzh9j85o71T2rHSTrpljoM4oRRhLiS/QXwhMs=; b=NKySjRrwLqm+/5pZx7vGGCkOW6LP3lhWkpqomELhGp1pzylYkI578P03FIcBTC+ZeRS1 NRmi72qTXHrdr63vNtXxPNw730wk/zYARU+ZIb/D5GQiOOtqRPRZ4WMW3Ml4veIZcOxs Tbe1FluJ3PtPhGvsK+mKbiGNE945p+sDcdJCELogNoUc4NI34hQV/cPCTVBmdn6fW12u u1ZrN2UFq0X3lC4FiBdLISrnuClQXOGlv4/mESGDh878RlxdMDY9udHlYFENrYWlAcYr Rxc9rotgAUNWMVKsvh5Uj8GiFVohT6JQZRmfNxE5S+JP66h8FcQWDg6Etr1pbc9Jb/4j 6w== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3qf7s46p7q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 10:54:28 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 12 May 2023 10:54:26 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 12 May 2023 10:54:26 -0500 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4FE3715A4; Fri, 12 May 2023 15:54:26 +0000 (UTC) Date: Fri, 12 May 2023 15:54:26 +0000 From: Charles Keepax To: Krzysztof Kozlowski CC: , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 08/10] pinctrl: cs42l43: Add support for the cs42l43 Message-ID: <20230512155426.GJ68926@ediswmail.ad.cirrus.com> References: <20230512122838.243002-1-ckeepax@opensource.cirrus.com> <20230512122838.243002-9-ckeepax@opensource.cirrus.com> <9591999e-9d7f-2a4a-29df-d9c42dfa736b@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <9591999e-9d7f-2a4a-29df-d9c42dfa736b@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: s1HRT0A_ILzyFaLSvekFY9YR-tkABoSi X-Proofpoint-GUID: s1HRT0A_ILzyFaLSvekFY9YR-tkABoSi X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Fri, May 12, 2023 at 05:30:37PM +0200, Krzysztof Kozlowski wrote: > On 12/05/2023 14:28, Charles Keepax wrote: > > + priv->gpio_chip.fwnode = dev_fwnode(cs42l43->dev); > > + > > + if (is_of_node(dev_fwnode(cs42l43->dev))) { > > + device_set_node(priv->dev, > > + fwnode_get_named_child_node(dev_fwnode(cs42l43->dev), > > + "pinctrl")); > > That's something unusual. It seems you want to bind to a DT node because > you miss compatible in DT node? > Kinda, I don't really want to add multiple compatibles for the device. This is just a CODEC device, even in device tree it seems a little weird to have multiple compatibles for a single I2C device. On ACPI I am pretty sure it would be considered flat out right wrong. The fact Linux supports the device using multiple drivers is seemed to be a Linux implementation detail, rather than describing the hardware. The original (internal) version of the patches just had a single firmware node, but the DT schema would not verify because the node is both a pinctrl node and a spi node. And the pinctrl schema requires the node to be called "pinctrl" and the spi requires it to be called "spi", it is impossible to satisfy both. Any advice/guidance you had on this one would be greatly appreciated? > > + } else { > > + device_set_node(priv->dev, dev_fwnode(cs42l43->dev)); > > + } > > + > > + pm_runtime_enable(priv->dev); > > + pm_runtime_idle(priv->dev); > > + > > > +MODULE_DESCRIPTION("CS42L43 Pinctrl Driver"); > > +MODULE_AUTHOR("Charles Keepax "); > > +MODULE_LICENSE("GPL"); > > +MODULE_ALIAS("platform:cs42l43-pinctrl"); > > Same comment, so I guess you have this pattern everywhere. Yeah this is not problem to fix up, I was just unaware using the id_table was preferrable for MFD components, there are a lot of devices doing it both ways. Thanks, Charles