Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2884780rdb; Wed, 15 Nov 2023 13:36:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGskQkRTLD3t7yi6g+xWk1H838pWiEUP07LNV2g/ccWCDft8NkWmoXu5Qddmk57BvcsG2oh X-Received: by 2002:a17:902:8bc2:b0:1cc:3fc9:7d09 with SMTP id r2-20020a1709028bc200b001cc3fc97d09mr6020799plo.15.1700084176123; Wed, 15 Nov 2023 13:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700084176; cv=none; d=google.com; s=arc-20160816; b=tpSWC64k1LsHEHNHUVetR/okgJLovR4W9BQxCskeND6OCmCQWeUudHQ1T/ZciaVcm4 IsexHur+sl6BaKrLsG6hFrzKVO+2jS9ChZ+vv1Hudfwvfh6JwxJe5BQsdxGIObZXiHl2 qZ5xAFUkL7lULO93XLV2xMd9wm4ZirpNXqpiBHWjqd2wBdsOdXP7uUWVgOZjVSFKEaM9 lwKrtGjfm/oW9lilIXRezhXfPyWt4t3DDp7tbVb4+6zgCp94RT4tYJgif0izkWMcitgB nCGAKyNsyz7CAmZrOgtTQtEVoLobhPz5B6A3tAzTW6WqkgNtEbePxARJtEjjrIRxR1mm DUWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+ewEC6w4FNjvRn1QtThPipzsUOHfD/ElUE10YdHZBpE=; fh=N6Xuj766RQ+hgF9lX9Xz6dqqxKu+qiVqlcICCRj0KlU=; b=xCUL5/BChPNHg6vdViFrgivd14scWysaxLHarqhLTWSbp/DcJSOQocvks8d6Vq7UxZ v4KsutPwTMdOenbeiwsHGnfm3I9XXV9DAZFHP6xBXHYQrnBy1pFfO7ZIyMmgN27pV7C3 GfV26wBzqwhjzp1CYsdi5tIiJTC913cq5MudxKIEkqCEOcdfRUHt5YKefvJYGvQl+iOA Z6IAXH21FmeqbTOAXcr03t/GGrpks8EcperQF9YJuhrmLDowIbmwuK5YerBykXxZpAWa 6c9iwggblIg8Klqjp1q+3moxxvSYCOQ/D36gVmxs1jVY3Pzg1RAwkpgvAYIGPtFQsYdu OLUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ax7GU+e8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e11-20020a170902744b00b001c9dd045ef5si10467895plt.327.2023.11.15.13.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:36:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ax7GU+e8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5DC2C8077A61; Wed, 15 Nov 2023 13:35:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232919AbjKOVfM (ORCPT + 99 others); Wed, 15 Nov 2023 16:35:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235631AbjKOVfL (ORCPT ); Wed, 15 Nov 2023 16:35:11 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 520B811D for ; Wed, 15 Nov 2023 13:35:08 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECD9AC433B6; Wed, 15 Nov 2023 21:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700084108; bh=RWdpyuo51tuvIqwMGTL3/I2DqmEZBZKqCR84EaR63Ic=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ax7GU+e8NoT5NkhfbCkd6P6Edug5yH+pW3/V5VyW1TLH2HPz/nr8R2GsxsPPVVGO/ lkVfE0amR6D0oREGacbWEFDSThlzJ3Pm0CER2NugqFfsP0Qye78NcoEx79ePWeiK/N 4GtOmqctClRVu77IayArzEX3uErPWajp+mdTfHt+FPR4QEM7HqzyFPPRgwQLnG59yu yM1iH72Ttd3X+Ga/HmssO1USouNL74sFTlcfI0TMsslOwjnn0uMTkt/djrjl4wGANN xaaIuNoJGhaqoIcWxPaLgWUy/WQzFirCRX3c5F+wRRn+5cKfxKkY9WyIEZvt/p5TbR odUwMB52SGjpQ== Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-507bd19eac8so153263e87.0; Wed, 15 Nov 2023 13:35:07 -0800 (PST) X-Gm-Message-State: AOJu0Ywm9nsiRfMF8uBmCx8wMk4+F/+/c4LHGoTjuQAdMV16mDN/zNvi EGOfhoKX6RKpZkZWv3aqmB/dv4YJZS+mBadghw== X-Received: by 2002:a05:6512:3f12:b0:507:a6a5:a87b with SMTP id y18-20020a0565123f1200b00507a6a5a87bmr12750059lfa.51.1700084106033; Wed, 15 Nov 2023 13:35:06 -0800 (PST) MIME-Version: 1.0 References: <20231109100606.1245545-1-wenst@chromium.org> <859ac058-c50a-4eb8-99b6-3011ef4e7529@collabora.com> In-Reply-To: From: Rob Herring Date: Wed, 15 Nov 2023 15:34:53 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 0/7] of: Introduce hardware prober driver To: Doug Anderson Cc: AngeloGioacchino Del Regno , Chen-Yu Tsai , Frank Rowand , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , Hsin-Yi Wang , Dmitry Torokhov , andriy.shevchenko@linux.intel.com, Jiri Kosina , linus.walleij@linaro.org, broonie@kernel.org, gregkh@linuxfoundation.org, hdegoede@redhat.com, james.clark@arm.com, james@equiv.tech, keescook@chromium.org, petr.tesarik.ext@huawei.com, rafael@kernel.org, tglx@linutronix.de, Jeff LaBundy , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:35:26 -0800 (PST) On Wed, Nov 15, 2023 at 2:45=E2=80=AFPM Doug Anderson wrote: > > Hi, > > On Wed, Nov 15, 2023 at 2:28=E2=80=AFPM Rob Herring = wrote: > > > > > So if we're searching the whole device tree for "failed-needs-probe" > > > then we need to figure out which devices are related to each other. I= f > > > a given board has second sources for MIPI panels, touchscreens, and > > > trackpads then we need to know which of the "failed-needs-probe" > > > devices are trackpads, which are touchscreens, and which are MIPI > > > panels. Do you have any suggestions for how we should do that? Maybe > > > it was in some other thread that I missed? I guess we could have a > > > board-specific table mapping (compatible + node name + reg) to a > > > class, but that feels awkward. > > > > Node name is supposed to correspond to device class, so why not use > > that (no path or unit-address.) and nothing else (well, besides > > "status")? > > One problem is that I could imagine having two second source trackpads > that both have the same i2c address. That would give them the same > name, right? I guess you could maybe come up with some sort of suffix > rule? Like > > trackpad-1@10 { > compatible =3D "elan,blah"; > ret =3D <0x10>; > status =3D "failed-needs-probe"; > ... > } > trackpad-2@10 { > compatible =3D "goodix,gt7375p"; > ret =3D <0x10>; > status =3D "failed-needs-probe"; > ... > } > > Then I guess the class would be "trackpad"? That issue is somewhat orthogonal because it is not following the spec. I'm not sure mixing the 2 styles of node names is a good idea. While not used too much, matching by node name does ignore the unit-address, but I'm not sure we could ignore a '-N'. I think our options are either add something to the unit-address or use i2c-mux binding. Adding to the unit-address is not unprecedented. I did that for some of the register bit level bindings where you have a node for different bits at the same address. The downside is unit-address is bus specific, so we'd have to add that for multiple buses. For the i2c-mux, it's perhaps a bit complex and I'm not sure what if anything you'd have to do to manage the mux that's not really there. Rob