Message ID | 20241017094222.1014936-1-wenst@chromium.org (mailing list archive) |
---|---|
Headers | show |
Series | platform/chrome: Introduce DT hardware prober | expand |
On Thu, Oct 17, 2024 at 05:34:35PM +0800, Chen-Yu Tsai wrote: > For the I2C component (touchscreens and trackpads) case from the > original series, the hardware prober driver finds the particular > class of device in the device tree, gets its parent I2C adapter, > and tries to initiate a simple I2C read for each device under that > I2C bus. When it finds one that responds, it considers that one > present, marks it as "okay", and returns, letting the driver core > actually probe the device. > > This works fine in most cases since these components are connected > via a ribbon cable and always have the same resources. The prober > will also grab these resources and enable them. > > The other case, selecting a display panel to use based on the SKU ID > from the firmware, hit a bit of an issue with fixing the OF graph. > It has been left out since v3. > > Patch 1 adds of_changeset_update_prop_string(), as requested by Rob. > > Patch 2 adds for_each_child_of_node_with_prefix(), as suggested by Andy. > Patch 3 implements probing the I2C bus for presence of components as > a hookable helper function in the I2C core. > > Patch 4 implements regulator supply support as a set of simple helpers > for the I2C component prober. > > Patch 5 implements GPIO support for the I2C component prober simple > helpers. Not that I am really a fan of the idea, but I have nothing to counter propose. Also my big concern about random msleep() calls seems to be addressed in a way that it's now a caller's problem to supply the (correct) one. Hence FWIW, Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> for patches 3,4, and 5. > Patch 6 adds a ChromeOS specific DT hardware prober. This initial > version targets the Hana Chromebooks, probing its I2C trackpads and > touchscreens. > > Patch 7 modifies the Hana device tree and marks the touchscreens > and trackpads as "fail-needs-probe", ready for the driver to probe.