ec / kernel: Replace devicetree subnodes with EC_FEATURE probing |
|||
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.
,
Jul 10 2017
(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".
,
Aug 1
|
|||
►
Sign in to add a comment |
|||
Comment 1 by groeck@chromium.org
, Jul 8 2017Back 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 ?