New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 740342 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

ec / kernel: Replace devicetree subnodes with EC_FEATURE probing

Project Member Reported by sha...@chromium.org, Jul 8 2017

Issue description

- google,cros-ec-i2c-tunnel
- google,cros-ec-keyb
- google,cros-ec-pd-update
- google,cros-ec-pwm
- google,extcon-cros-ec

Ideally we should be able to remove these devicetree subnodes and decide to load a given driver at runtime, if a certain EC_FEATURE is enabled by the ec.
 
Cc: tbroch@chromium.org
Back and forth. Upstream commit bb03ffb96c724 ("mfd: cros_ec: Instantiate sub-devices from device tree") went the other way. Can we agree one way or another ?

Cc: gwendal@chromium.org dtor@chromium.org diand...@chromium.org bleung@chromium.org
(To round out the description here: this branched from discussion on https://chromium-review.googlesource.com/c/428192)

I'm not sure commit bb03ffb96c724 is setting a real precedent for the question I was worried about. I think it's clear that some features need a device-tree (or other "board configuration", like ACPI I guess? I don't know much about it) representation, especially when said feature has complex relationships with other devices in the system (e.g., when the I2C tunnel has its own sub-device(s); or a PWM is driving some other device in the system; or an "extcon" is associated with various type C ports). So the goal probably isn't to eliminate all DT subnodes.

But as Gwendal noted:
"""
Right now, the sensor stack is not, and the patches for cros-ec-rtc is not relying on dts either:
https://lists.gt.net/linux/kernel/2602634?#2602634
"""

I personally think that's fine (and really, ideal), when it's clear the feature is self-describing. So to me, the question is whether/how we determine a feature is appropriately self-describing, such that we should not need a DT subnode [1].

Perhaps that conversation could be informed by any Collabora folks who did any upstreaming work on this stuff (where perhaps someone else in the community had opinions/suggestions on this). Or by anyone on the kernel side who's been owning any of this (is there any such person? Gwendal? Benson?).

---

[1] Based on my rough intuition, I think the only candidate of those listed above by Shawn should be the PD updater: "google,cros-ec-pd-update".
Status: Assigned (was: Untriaged)

Sign in to add a comment