Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1689479rdb; Sun, 19 Nov 2023 06:34:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGYf3mv8h7jVKD2UbZ5gezaHOmdjIh1lbhv/8SN1M75+VLBQNv8Kqz6NbG7Hilme7UTIvF X-Received: by 2002:a05:6808:1283:b0:3a7:2690:94e0 with SMTP id a3-20020a056808128300b003a7269094e0mr8008182oiw.4.1700404493794; Sun, 19 Nov 2023 06:34:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700404493; cv=none; d=google.com; s=arc-20160816; b=tVS2L2RvoFRTBj+ke5RVtz/cXUTODRLinIm/Nm42+vP1tnoOL+lr7070BMOJOBn6OC WQz4iVhbAazp3jDzK9163jzpr49gB14jdlfO8q7Lvnin1wEFUMZJyRz/HykDo8dFI9iz 17VWFQTfCD142nWSVJnwemyq80r7pD9Cz/AChffdYOeUYjqjBjloSEOCXQ+a0PzT/+q3 /g+1f8de8hYMlfmX5HDXbZGzEIRB6rYHpIm8xJFz9eZSxWEbG6n7jm8CA+19rDh1BZvC hLNXo+5PyY9p0QD6nE14Z6GqpTq5hp8P4P+T+o9/QgFm/i1vLGWDhdZBa8ggU4kSuy6Z nnYg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wbAOew7EQhvdTMrxu7VzSwL0APRrGG2LAuJjAHyG3Ic=; fh=N6Xuj766RQ+hgF9lX9Xz6dqqxKu+qiVqlcICCRj0KlU=; b=bSWFvldrfpTNBUemXQMobI7v/9yIgMyVnPtAdcZXFU+oRjbrv1SfFjV1h/fNp1YjVT gbRE4DNJVmxL6MK0m0l8rWaB7PfrwvoSh+zfn8+39lvMqhV/KWEpGTpuEYqMJCgr8Jcb Q2OMt7/9ZhFEb/HFvYZp7XK22OEB6ToCMrDf7O0Punpw5wSK0kSV88SORp9eu++i+BkR h3eZIuCC9+xM0thb3Z9AAYFZ6drwXnweexJoOT00TS9xpmFjXBLeYg07V+kikQtXlc9L Ve/l83JjxGhMgUKiM3TrAYgU03ydyhV9DOvxwTZ8qEKKgBwXW8KbcnqY062Ho+GGRoS8 fQSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id m187-20020a6326c4000000b00577f87e6210si6379254pgm.332.2023.11.19.06.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 06:34:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id C979A8090FB7; Sun, 19 Nov 2023 06:34:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231203AbjKSOev (ORCPT + 99 others); Sun, 19 Nov 2023 09:34:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbjKSOeu (ORCPT ); Sun, 19 Nov 2023 09:34:50 -0500 Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99F6DBA; Sun, 19 Nov 2023 06:34:47 -0800 (PST) Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-5845213c583so2007482eaf.0; Sun, 19 Nov 2023 06:34:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700404487; x=1701009287; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wbAOew7EQhvdTMrxu7VzSwL0APRrGG2LAuJjAHyG3Ic=; b=lMHTbeIY3keviR+eGP7t/elfJXZo1af0Fe+0LhKk/NDFBV2f9uY8Q/mjU/h3wLrwBM vFQC+5krCaiIKKp6QKREGlLewVS2whA90Ia9UWFwKW7bm2oPNauEnzVBea5QNa1mL9Pk 11w0OJHf5CxlrYcBz2kIayHKVcMYSUM0XhhGyv4YxHvbIXSdQnq2VcGOIx6KcxMzOCAd NQ/KHqIHWOeaiT4EcW6ZuJ0NNSjhalYQ7ydT4vcGMUchfXdFSjQ/4E9nimBzzIVcdhn6 PT2UaD5LcCSHqEXQbEScfXjplqylU0AYPfaHKYns1KnKRnX0YwEZwoeMEJs9KNmQWv6+ Q2qA== X-Gm-Message-State: AOJu0YxDuZq7pJGqQ+U3jAMysBxKfPv0QmXKJ1TYSi8V4Z/7O/lJhpds UNzvGMOquSlMbqxmidlKmg== X-Received: by 2002:a05:6820:2290:b0:57b:3b48:6f11 with SMTP id ck16-20020a056820229000b0057b3b486f11mr5163096oob.4.1700404486826; Sun, 19 Nov 2023 06:34:46 -0800 (PST) Received: from herring.priv ([2607:fb90:45e3:889f:15b4:1348:6d64:224b]) by smtp.gmail.com with ESMTPSA id w18-20020a4ae4d2000000b00581fc1af0a7sm1055669oov.28.2023.11.19.06.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 06:34:45 -0800 (PST) Received: (nullmailer pid 173773 invoked by uid 1000); Sun, 19 Nov 2023 14:34:41 -0000 Date: Sun, 19 Nov 2023 08:34:41 -0600 From: Rob Herring 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 Subject: Re: [RFC PATCH v2 0/7] of: Introduce hardware prober driver Message-ID: <20231119143441.GA157654-robh@kernel.org> References: <20231109100606.1245545-1-wenst@chromium.org> <859ac058-c50a-4eb8-99b6-3011ef4e7529@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 19 Nov 2023 06:34:52 -0800 (PST) On Wed, Nov 15, 2023 at 05:13:50PM -0500, Doug Anderson wrote: > Hi, > > On Wed, Nov 15, 2023 at 4:35 PM Rob Herring wrote: > > > > On Wed, Nov 15, 2023 at 2:45 PM Doug Anderson wrote: > > > > > > Hi, > > > > > > On Wed, Nov 15, 2023 at 2:28 PM 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. If > > > > > 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 = "elan,blah"; > > > ret = <0x10>; > > > status = "failed-needs-probe"; > > > ... > > > } > > > trackpad-2@10 { > > > compatible = "goodix,gt7375p"; > > > ret = <0x10>; > > > status = "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 why you say it's orthogonal. The whole reason why we get > into the situation above is that we could have two devices, only one > of which is present (hence the status of "failed-needs-probe"), that > are the same type and have the same "reg" address. I just mean that defining a node name for 2 devices of the same class and at same address is separate problem from selecting which one to enable. > > Essentially the whole "failed-needs-probe" is extending the spec, > right? While extending the spec, we also need to talk about what to do > if some of the devices that we need to probe have the same class and > the same "reg". > > > > 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. > > Somehow it feels weird to use an i2c-mux because there's no real mux > present, right? ...so this would be a virtual (bogus) device that > doesn't really exist in hardware. Yes, shrug... > ...though I guess if the "mux" type binding is OK then maybe we just > use that as the HW prober, at least for i2c devices... Except for any other case where it's different addresses or different buses. Maybe different addresses could still use the same thing. I suppose the same class of device is unlikely to be on a different bus. An extension to the unit-address would be the simpler solution, so we should explore that first I think. Rob