[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+puq20EWkQg1RTs2zfmh4DGbqz1krp+19c=wPXnLT5dA@mail.gmail.com>
Date: Wed, 15 Nov 2023 13:28:12 -0600
From: Rob Herring <robh+dt@...nel.org>
To: Doug Anderson <dianders@...omium.org>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Chen-Yu Tsai <wenst@...omium.org>,
Frank Rowand <frowand.list@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Hsin-Yi Wang <hsinyi@...omium.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
andriy.shevchenko@...ux.intel.com, Jiri Kosina <jikos@...nel.org>,
linus.walleij@...aro.org, broonie@...nel.org,
gregkh@...uxfoundation.org, hdegoede@...hat.com,
james.clark@....com, james@...iv.tech, keescook@...omium.org,
petr.tesarik.ext@...wei.com, rafael@...nel.org, tglx@...utronix.de,
Jeff LaBundy <jeff@...undy.com>, linux-input@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Johan Hovold <johan@...nel.org>
Subject: Re: [RFC PATCH v2 0/7] of: Introduce hardware prober driver
On Fri, Nov 10, 2023 at 6:12 PM Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Thu, Nov 9, 2023 at 5:52 AM Rob Herring <robh+dt@...nel.org> wrote:
> >
> > > > End of background from Doug's cover letter.
> > >
> > > I think that using "status" is not a good idea, I find that confusing.
> >
> > "status" is what defines a device's state in terms of enabled,
> > present, available. That's exactly what we're expressing here.
> >
> > Now, I do not think we should be mixing the device class (e.g.
> > touchscreen) into status. I said this on v1, but apparently that was
> > not listened to.
>
> Interesting. I must have missed the "don't mix device class into
> status" part. Do you have a link to your post about that? Maybe
> there's other stuff I missed... Having the device class stuck at the
> end there was at least part of my last post [1] which gathered no
> response.
https://lore.kernel.org/all/CAL_JsqKK0tjeXNv=a8L3k0AjhCa15XOq1tPWqVod9mycsKXJHg@mail.gmail.com/
"I would not combine the 2 things. Knowing the class/type of the device
may be useful independent of your problem."
> I think one of the reasons that I felt we needed to mux the device
> class into status was that it was going to make the code a lot less
> fragile. Everything I've seen indicates that you don't want us to
> create a "HW prober" node that could be used to provide relevant
> phandles for different classes of devices, so the "HW prober" code
> needs to either search through the whole device tree for a status of
> "failed-needs-probe" or needs to contain per-board, hardcoded,
> fully-qualified paths.
>
> I don't think we want to include hardcoded, fully-qualified paths in
> the code. That would mean that if someone changed a node name
> somewhere in the path to one of the devices that we're dealing with
> then it would break.
Right, nothing should depend on the full path. That's not an ABI just
like the device path in sysfs is not (despite what Android HALs do).
> 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")?
Rob
Powered by blists - more mailing lists