kernel: since 4.12: cros-usb-pd-charger not created on samus |
||
Issue descriptionWith b1655f97 (CHROMIUM: power: supply: add cros-ec USB PD charger driver), discovering if a EC has feature EC_FEATURE_USB_PD has moved from cros_ec_dev.c to cros_ec.c cros_ec is the device created when an EC connected directly to the AP is registered. cros_ec_dev is created when any EC (even downstream from a EC) are found. The problem on samus is only cros_pd, downstream of cros_ec, has the feature EC_FEATURE_USB_MUX, so on 4.12/4.14, the device cros-usb-pd-charger is not created anymore. It is created properly on 4.4 [3.14 use a different mechanism and creates cros-usb-pd-charger on all ECs] There is a good reason to move to cros_ec.c [not calling mfd_ functions outside driver/mfd], see https://groups.google.com/forum/#!topic/rtc-linux/A_3LTj6je-Q, but that means we can cannot create devices above the secondary EC anymore.
,
Nov 15 2017
We have been discussing recently another approach that we think can be acceptable by the MFD maintainer also, the idea is split current cros_ec_dev in two, cros_ec_dev and cros_ec_ctl, and then only move to the MFD subsystem the cros_ec_dev driver which can call into platform/chrome (based on some discussions I had with the maintainer I think that he will be fine with MFD calling into platform/chrome) Thierry implemented a proof-of-concept in this repository and I tested on different devices. Probably needs more tests. See the last three commits of this repository: - https://gitlab.collabora.com/tescande/linux/commits/T7125_MFD_calls
,
Nov 16 2017
,
Nov 20 2017
Your plan is to move back cros_ec_dev.c into mfd, to be able to use mfd_ function there. That would work.
Another option would be a connect created devices to cros_ec device, even those from the linked EC.
We use to have:
cros_ec --- cros_ec_dev (cros_ec)
| |- rtc
| |- sensors
| | ...
|- cros_ec_dev (cros_pd)
|- usb-pd-charger
We now have:
cros_ec --- cros_ec_dev (cros_ec) (offset 0)
|- rtc (offset 0)
|- sensors (offset 0)
|- cros_ec_dev (cros_pd) (offset 1)
[empty]
We could have, by call get_features() per offset:
cros_ec --- cros_ec_dev (cros_ec)
|- rtc (offset 0)
|- sensors (offset 0)
|- cros_ec_dev (cros_pd) (offset 1)
|- usb-pd-charger (offset 1)
It does not matter who is the device parents.
,
Nov 20 2017
,
Dec 1 2017
https://patchwork.kernel.org/patch/10066745/ | https://patchwork.kernel.org/patch/10066745/ | cl/801799 is not addressing this problem, just clean up where the MFD calls are coming from. cros_ec_register is still called only from the transports, not per offsets.
,
Dec 1 2017
I see the intent however, the patch in #7 allows the change to happen as cros_ec_dev is back into mfd directory. |
||
►
Sign in to add a comment |
||
Comment 1 by gwendal@chromium.org
, Nov 15 2017