.../bindings/platform/huawei,gaokun-ec.yaml | 124 +++ MAINTAINERS | 7 + .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 163 ++++ drivers/platform/arm64/Kconfig | 20 + drivers/platform/arm64/Makefile | 1 + drivers/platform/arm64/huawei-gaokun-ec.c | 825 ++++++++++++++++++ .../linux/platform_data/huawei-gaokun-ec.h | 79 ++ 7 files changed, 1219 insertions(+) create mode 100644 Documentation/devicetree/bindings/platform/huawei,gaokun-ec.yaml create mode 100644 drivers/platform/arm64/huawei-gaokun-ec.c create mode 100644 include/linux/platform_data/huawei-gaokun-ec.h
This adds binding, drivers and the DT support for the Huawei Matebook E Go (sc8280xp-based) Embedded Controller which is also found in Huawei Matebook E Go LTE (sc8180x-based), but I don't have the sc8180x one to perform tests, so this series enable support for sc8280xp variant only, this series provides the following features: - battery and charger information report - charging thresholds control - FN lock (An alternative method) - LID switch detection - Temperature sensors - USB Type-C altmode - USB Type-C PD(high power) Thanks to the work of Bjorn and Dmitry([1]), the work of Nikita([2]), writing a EC driver won't be suffering. This work refers a lot to their work, also, many other works. I mentioned them in commit messages. Depends: https://lore.kernel.org/linux-arm-msm/20241220160530.444864-1-mitltlatltl@gmail.com [1] https://lore.kernel.org/all/20240614-yoga-ec-driver-v7-0-9f0b9b40ae76@linaro.org/ [2] https://lore.kernel.org/all/20240315-aspire1-ec-v5-0-f93381deff39@trvn.ru/ base-commit: 853d1f41ba73e78d22e7075d9a95670aab187eba Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com> --- Changes in v6 RESEND: - add Reviewed-by tag (Ilpo) - remove extra line - rebased on tag next-20250131 - Link to v6: https://lore.kernel.org/linux-arm-msm/20250123152559.52449-1-mitltlatltl@gmail.com Changes in v6: - refactor one ternary operator expression (Ilpo) - replace one expression with &= (Ilpo) - use devm_mutex_init() instead of mutex_init() (Ilpo) - add Reviewed-by tag for devicetree (Konrad) - add explicit cast (void *) to fix warnings when compiling - rebased on tag next-20250123 - Link to v5: https://lore.kernel.org/linux-arm-msm/20250117140348.180681-1-mitltlatltl@gmail.com Changes in v5 RESEND: - rebased on tag next-20250120 - Link to v5: https://lore.kernel.org/linux-arm-msm/20250117140348.180681-1-mitltlatltl@gmail.com Changes in v5: - handle return code of i2c_transfer() (Bryan) - rename threshold validatition function (Bryan) - add enumerates and defines for registers (Bryan) - drop extra line in header (Heikki) - add Reviewed-by tag for devicetree (Krzysztof) - Link to v4: https://lore.kernel.org/linux-arm-msm/20250116111559.83641-1-mitltlatltl@gmail.com Changes in v4: - use new API to register hwmon device instead of the deprecated one. (Guenter) - add Reviewed-by tag for dt-binding (Krzysztof) - drop unnecessary header (Ilpo) - use guard mutex (Ilpo) - improve comments and naming (Ilpo) - add a shallow copy version of extr_resp() (Ilpo) - add functions to handle resp and req whose size is 1 - drop PSY and UCSI subdrivers, commit them once the base driver is upstreamed - Link to v3: https://lore.kernel.org/linux-arm-msm/20250113175049.590511-1-mitltlatltl@gmail.com Changes in v3: - Link to v2: https://lore.kernel.org/linux-arm-msm/20250105174159.227831-1-mitltlatltl@gmail.com dt-binding: - drop generic compatibles. (Krzysztof) - remove '+' to use literal block style. (Krzysztof) ec: - take struct gaokun_ucsi_reg as parameter (Heikki) - add almost all kernel doc comments (Krzysztof, Heikki) ucsi: - drop unnecessary ucsi quirks (Dmitry) - add UCSI v1.0 to ucsi.h (Heikki) - use gaokun_ucsi_read_cci() to read cci directly (Heikki) - drop unnecessary gaokun_ucsi_get_port_num (Heikki) - rename member port_num => num_ports (Heikki) - fix completion, forgot to signal threads in previous version dt: - fix indentation (Konrad) - add a link between role switch and connector Changes in v2: - Link to v1: https://lore.kernel.org/linux-arm-msm/20241227171353.404432-1-mitltlatltl@gmail.com global: - drop qcom's products(i.e. sc8180x, sx8280xp) everywhere, use 'product'-based instead(Krzysztof, Bryan) - drop Cc Nikita Travkin, we had discussed the device in PM. - add myself to MAINTAINERS dt-binding: - fix building (Rob Herring (Arm)) - remove unnecessary code (Krzysztof) - add bugzilla documentation, insights of gaokun(see [1] or patch[1/5]) (Krzysztof, Aiqun(Maria)) - explain the difference between PMIC GLink and gaokun EC (Aiqun(Maria)) ec: - use Linux style comments (Krzysztof) - add a comment for mutex lock (Krzysztof) - add more kerneldoc for exported functions (Krzysztof) - eliminate unnecessary conditions (Bryan) - add a macro for check thresholds (Bryan) - improve English (Bryan) - use existing sysfs interface(hwmon, psy) whenever possible (Krzysztof) - use __le16 and related endianess conversion function for temp data (Ilpo) - drop alias for packet headers (Ilpo) - avoid hardcoding i2c msgs size (Aiqun(Maria)) - add a comment for the sleep in critial region (Bryan, Aiqun(Maria)) - use macro to construct packet (Bryan, Aiqun(Maria)) wmi: - dropped ucsi: - reorder headers (Bryan) - a comment for the orientation map macro (Bryan) - make mux mode map more explicit(minus six is very clear now) (Bryan, Dmitry) - handle port update exceptions return (Bryan) - a comment for the UCSI quirks (Dmitry) - use the inline hint for the short register function (Dmitry) - use the API with delay to handle register instead of a direct sleep (Bryan) - handle unfinished initialization early psy: - add charging related sysfs to here (Krzysztof, Dmitry) - document ABI for power_supply sysfs (Krzysztof) - drop charging threshold, use smart charging instead dts: - correct indentation, properties' order. (Konrad) Pengyu Luo (3): dt-bindings: platform: Add Huawei Matebook E Go EC platform: arm64: add Huawei Matebook E Go EC driver arm64: dts: qcom: gaokun3: Add Embedded Controller node .../bindings/platform/huawei,gaokun-ec.yaml | 124 +++ MAINTAINERS | 7 + .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 163 ++++ drivers/platform/arm64/Kconfig | 20 + drivers/platform/arm64/Makefile | 1 + drivers/platform/arm64/huawei-gaokun-ec.c | 825 ++++++++++++++++++ .../linux/platform_data/huawei-gaokun-ec.h | 79 ++ 7 files changed, 1219 insertions(+) create mode 100644 Documentation/devicetree/bindings/platform/huawei,gaokun-ec.yaml create mode 100644 drivers/platform/arm64/huawei-gaokun-ec.c create mode 100644 include/linux/platform_data/huawei-gaokun-ec.h -- 2.47.1
On 31/01/2025 10:21, Pengyu Luo wrote: > This adds binding, drivers and the DT support for the Huawei Matebook E Go > (sc8280xp-based) Embedded Controller which is also found in Huawei Matebook > E Go LTE (sc8180x-based), but I don't have the sc8180x one to perform > tests, so this series enable support for sc8280xp variant only, this series > provides the following features: > > - battery and charger information report > - charging thresholds control > - FN lock (An alternative method) > - LID switch detection > - Temperature sensors > - USB Type-C altmode > - USB Type-C PD(high power) > Why are you resending? Previous version was only week ago and minimal time is two weeks. Plus its merge window, so this resend is unjustified. Best regards, Krzysztof
On Sat, Feb 1, 2025 at 5:20 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: > On 31/01/2025 10:21, Pengyu Luo wrote: > > This adds binding, drivers and the DT support for the Huawei Matebook E Go > > (sc8280xp-based) Embedded Controller which is also found in Huawei Matebook > > E Go LTE (sc8180x-based), but I don't have the sc8180x one to perform > > tests, so this series enable support for sc8280xp variant only, this series > > provides the following features: > > > > - battery and charger information report > > - charging thresholds control > > - FN lock (An alternative method) > > - LID switch detection > > - Temperature sensors > > - USB Type-C altmode > > - USB Type-C PD(high power) > > > > Why are you resending? > > Previous version was only week ago and minimal time is two weeks. Plus > its merge window, so this resend is unjustified. Sorry, I am still new to the process, I may have misunderstood something. I sent it because I had got at leaset one reviewed tag for every patch from the corresponding subsystem maintainer. Can I expect that there would be no reviewing? All I need to do is wait for it to be applied. For merge window, I noticed pr from platform-driver-x86 had been merged a week ago. Maybe I shouldn't assume for every subsystem. Best wishes, Pengyu
On 01/02/2025 08:38, Pengyu Luo wrote: > On Sat, Feb 1, 2025 at 5:20 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: >> On 31/01/2025 10:21, Pengyu Luo wrote: >>> This adds binding, drivers and the DT support for the Huawei Matebook E Go >>> (sc8280xp-based) Embedded Controller which is also found in Huawei Matebook >>> E Go LTE (sc8180x-based), but I don't have the sc8180x one to perform >>> tests, so this series enable support for sc8280xp variant only, this series >>> provides the following features: >>> >>> - battery and charger information report >>> - charging thresholds control >>> - FN lock (An alternative method) >>> - LID switch detection >>> - Temperature sensors >>> - USB Type-C altmode >>> - USB Type-C PD(high power) >>> >> >> Why are you resending? >> >> Previous version was only week ago and minimal time is two weeks. Plus >> its merge window, so this resend is unjustified. > > Sorry, I am still new to the process, I may have misunderstood something. > I sent it because I had got at leaset one reviewed tag for every patch > from the corresponding subsystem maintainer. Can I expect that there would > be no reviewing? All I need to do is wait for it to be applied. and when I gave you the review, what did I write? Long instruction what to do: "However, there's no need to repost patches *only* to add the tags." Best regards, Krzysztof
On 1.02.2025 8:38 AM, Pengyu Luo wrote: > On Sat, Feb 1, 2025 at 5:20 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: >> On 31/01/2025 10:21, Pengyu Luo wrote: >>> This adds binding, drivers and the DT support for the Huawei Matebook E Go >>> (sc8280xp-based) Embedded Controller which is also found in Huawei Matebook >>> E Go LTE (sc8180x-based), but I don't have the sc8180x one to perform >>> tests, so this series enable support for sc8280xp variant only, this series >>> provides the following features: >>> >>> - battery and charger information report >>> - charging thresholds control >>> - FN lock (An alternative method) >>> - LID switch detection >>> - Temperature sensors >>> - USB Type-C altmode >>> - USB Type-C PD(high power) >>> >> >> Why are you resending? >> >> Previous version was only week ago and minimal time is two weeks. Plus >> its merge window, so this resend is unjustified. > > Sorry, I am still new to the process, I may have misunderstood something. > I sent it because I had got at leaset one reviewed tag for every patch > from the corresponding subsystem maintainer. Can I expect that there would > be no reviewing? All I need to do is wait for it to be applied. Generally if people have a concern, they'll share it with you. It may be that one review is not enough, this is up to the maintainer. You don't need to resend after you get new tags, the maintainer tools will pick those up when the patches are being applied. Patches are generally not picked up by maintainers in the timeframe between stable vX.Y release and vX.(Y+1)-rc1, this is the time when Linus accepts code that has been sitting in the maintainers' branches for some time and getting build/functionality tested in linux-next over the previous cycle Konrad
On Sat, Feb 1, 2025 at 11:35 PM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote: > On 1.02.2025 8:38 AM, Pengyu Luo wrote: > > On Sat, Feb 1, 2025 at 5:20 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: > >> On 31/01/2025 10:21, Pengyu Luo wrote: > >>> This adds binding, drivers and the DT support for the Huawei Matebook E Go > >>> (sc8280xp-based) Embedded Controller which is also found in Huawei Matebook > >>> E Go LTE (sc8180x-based), but I don't have the sc8180x one to perform > >>> tests, so this series enable support for sc8280xp variant only, this series > >>> provides the following features: > >>> > >>> - battery and charger information report > >>> - charging thresholds control > >>> - FN lock (An alternative method) > >>> - LID switch detection > >>> - Temperature sensors > >>> - USB Type-C altmode > >>> - USB Type-C PD(high power) > >>> > >> > >> Why are you resending? > >> > >> Previous version was only week ago and minimal time is two weeks. Plus > >> its merge window, so this resend is unjustified. > > > > Sorry, I am still new to the process, I may have misunderstood something. > > I sent it because I had got at leaset one reviewed tag for every patch > > from the corresponding subsystem maintainer. Can I expect that there would > > be no reviewing? All I need to do is wait for it to be applied. > > Generally if people have a concern, they'll share it with you. > It may be that one review is not enough, this is up to the maintainer. > > You don't need to resend after you get new tags, the maintainer tools will > pick those up when the patches are being applied. > > Patches are generally not picked up by maintainers in the timeframe between > stable vX.Y release and vX.(Y+1)-rc1, this is the time when Linus accepts > code that has been sitting in the maintainers' branches for some time and > getting build/functionality tested in linux-next over the previous cycle > It is helpful, thanks for explanation. Best wishes, Pengyu
© 2016 - 2025 Red Hat, Inc.