Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp101071rwd; Fri, 26 May 2023 15:48:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WZlrNAWGHgKSQti6a12STl0TUk3LajxsoFjfzv/e7z3eXZmkiN6GthdQVlP2aOMQLci8n X-Received: by 2002:a17:90a:bc42:b0:255:e301:7b01 with SMTP id t2-20020a17090abc4200b00255e3017b01mr3277680pjv.35.1685141280928; Fri, 26 May 2023 15:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685141280; cv=none; d=google.com; s=arc-20160816; b=0E+7z7COWz6+IojjPxhTLL8jF3TaH8ufjrV/xx16xvILur9W9sEd+qLGiYlqgWXqe0 93fSSJ0sTkn9tqUs+gJthJo5FCcu6pH9E5/GiRE+TNQ+0O6m9kL8ytBrzc1TXQSiUpQU WyTprzV4Gwg6aX9XO6HZ9yaDcdj1DyzBgUydu9W7HlNzX3XifvTtiUdOZIDmclM4FI2D geVw9+7ffYnF5hYMyX00xjHOTbaovPukvjElov7cBcFCzvGcupbXtwgLzVPbrWNxgUig 8QC1jQfYkITf4rb7HdjlXNl/LL0g7Xr751kM4UWbrGgwSR5PspZpkPVfmHTq1/PLR3D7 NIMA== 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:dkim-signature; bh=jNUBDLCjtQfvkkw7vVbJ3UDqlY52I5FH+Hn2cCh4wHs=; b=JN2hy5r/GX+jhPdZ8GdhzMEWS3zakVVz9LhcD5yrhzJSyFKSmAF+qbUf04HcSOjv3V REQpTbI5RtiZqB1kHqRfitDUSdErMi2Vo8KICL5A8bKeLJMrrCHpmh/9SAYERj9myXeU 2QqTskqwWmeivVFX+RjOjcFQ/7jCQR8jSKY/5nMnmt8PbCqtQm02zTvEDR56sT6ozen8 TcQNq2Qv83NfhSgJnyaF4OREhtHoYxuY4soLgf5aGRDvW3GPFFnGJ9C01gN6AEVCpE2q y+ede87NjArDtQ7TMCU9PGaCm7z0hsCXs6tJDWyTQkjSZ5YweDZh1pdlh8aIUVZtq9JP qDaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cJKBuRUX; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a633803000000b0053ef51d3fa7si4376470pga.403.2023.05.26.15.47.48; Fri, 26 May 2023 15:48:00 -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=@kernel.org header.s=k20201202 header.b=cJKBuRUX; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244284AbjEZWGB (ORCPT + 99 others); Fri, 26 May 2023 18:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbjEZWGA (ORCPT ); Fri, 26 May 2023 18:06:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42F1410A; Fri, 26 May 2023 15:05:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DD9F565427; Fri, 26 May 2023 22:03:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D596C4339E; Fri, 26 May 2023 22:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685138613; bh=BwvcSxw09qrYnzwTnJsHPC1O/6lwzjzErbn1rRv/HJM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cJKBuRUX+S1sdM3L1pd36dzdDiHXNAzoMvzsBuK39o3AcqQTyiP8b7NEfSNjURcm4 pvWaoFjeY6HWCxQDuLHe0O5AX+7xK6TlAiJuHu9eOdgAHKy+wJ1sdvGTnP0ucbmjlQ 9el20HJpymz4bdudaV+r1GsRwa5dOBScqIRJCJEuYcLn6YKOQSaw5lVa3rE2LYMKHY 2+8sM/rYKo0KvAqdYph19zB685b8JBnR/6ho7n3Xzy20AdYNAXETEQwVcqnwnDw0Ry D7AsO6Dee9i7L4pXCv3XFSSOrZr6Ar+JBxUz9WhAachu99IW0ge8ItfDfyYnfP7S7u XcpRDrb9mMNwg== Date: Fri, 26 May 2023 23:03:28 +0100 From: Conor Dooley To: Fred Treven Cc: Ben Bright , James Ogletree , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Simon Trimmer , Charles Keepax , Richard Fitzgerald , "patches@opensource.cirrus.com" , "linux-input@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "lee@kernel.org" Subject: Re: [PATCH v2 1/5] dt-bindings: input: cirrus,cs40l26: Support for CS40L26 Message-ID: <20230526-vowel-precise-12f644b57d85@spud> References: <1685059471-9598-1-git-send-email-fred.treven@cirrus.com> <20230526-swapping-clay-d114144380a4@spud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2jKjhS3G2UCFZYTf" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 --2jKjhS3G2UCFZYTf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 26, 2023 at 09:32:36PM +0000, Fred Treven wrote: > > On May 26, 2023, at 2:27 PM, Conor Dooley wrote: > > Tooling does not like your series very much, prob the missing v2's on > > some patches: > > Grabbing thread from lore.kernel.org/all/1685059471-9598-1-git-send-ema= il-fred.treven%40cirrus.com/t.mbox.gz > > Checking for newer revisions > > Grabbing search results from lore.kernel.org > > Analyzing 6 messages in the thread > > Will use the latest revision: v2 > > You can pick other revisions using the -vN flag > > Checking attestation on all messages, may take a moment... > > --- > > =E2=9C=93 [PATCH v2 1/5] dt-bindings: input: cirrus,cs40l26: Support = for CS40L26 > > =E2=9C=93 Signed: DKIM/cirrus.com > > + Signed-off-by: Conor Dooley > > =E2=9C=93 [PATCH v2 2/5] Input: cs40l26 - Support for CS40L26 Haptic = Device > > =E2=9C=93 Signed: DKIM/cirrus.com > > + Signed-off-by: Conor Dooley > > ERROR: missing [3/5]! > > ERROR: missing [4/5]! > > ERROR: missing [5/5]! >=20 > Understood. I was uncertain if this was just needed for patches that had > been edited or for all new patches. I will resubmit with some other code > changes to address other comments I=E2=80=99ve received and will mark the= patches > with the same version number.=20 I just whack an N into git format-patch's --reroll-count/-v option, and use the same across the whole series. Makes people's and tool's lives easier :) > >> +properties: > >> + compatible: > >> + enum: > >> + - cirrus,cs40l26a > >> + - cirrus,cs40l26b > >> + - cirrus,cs40l27a > >> + - cirrus,cs40l27b > >=20 > > I had a _brief_ look at the driver - you don't seem to have any match > > data, so are all of these devices actually compatible with eachother? > >=20 > > IOW, should this be: > > properties: > > compatible: > > oneOf: > > - items: > > - enum: > > - cirrus,cs40l26b > > - cirrus,cs40l27a > > - cirrus,cs40l27b > > - const: cirrus,cs40l26a > >=20 > > - const: cirrus,cs40l26a > >=20 > > And then drop all but the cs40l26a in the driver? Apologies if I missed > > some difference in there. >=20 > They are all compatible, yes. There is match data in cs40l26-i2c.c and > cs40l26-spi.c if you are referring to the of_device_id struct. > Please let me know if I=E2=80=99m misunderstanding your meaning here. What I saw looking in the driver was: +static const struct of_device_id cs40l26_of_match[CS40L26_NUM_DEVS + 1] = =3D { + { .compatible =3D "cirrus,cs40l26a" }, + { .compatible =3D "cirrus,cs40l26b" }, + { .compatible =3D "cirrus,cs40l27a" }, + { .compatible =3D "cirrus,cs40l27b" }, + {} +}; +MODULE_DEVICE_TABLE(of, cs40l26_of_match); So you have a bunch of compatibles, but didn't immediately appear to be doing anything different depending on which one of them you get. What I meant was populating the data field of of_device_id with something different depending on the compatible. If the programming model is the same, you can document that they are all compatible with "cirrus,cs40l26a", rather than having to add new entries to the match table. Also has the advantage that if you bring out a cirrus,cs40l27c that is compatible with the existing devices, then no changes are needed to software to support it ;) Or perhaps you are doing something different based on the compatible that I just did not notice. Cheers, Conor. (The [CS40L26_NUM_DEVS + 1] is also usually just [] btw) --2jKjhS3G2UCFZYTf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZHEsrwAKCRB4tDGHoIJi 0m7vAQDPzkfu91KtDUkEA7ub+4y9eLte9nVAnGrARvlVVXgIKwEAkpltvYoRM5aU qpe0T2WtOMV0O1ZhF3C3JeZw97aPswU= =MSmA -----END PGP SIGNATURE----- --2jKjhS3G2UCFZYTf--