dell / libsmbios

library for interacting with Dell SMBIOS tables
Other
192 stars 39 forks source link

Kernel interface for battery controls #84

Open awehrfritz opened 4 years ago

awehrfritz commented 4 years ago

Are there any plans to add support for interacting with the battery controls in the Dell kernel driver (analog to the implementation in libsmbios, just in the kernel)?

As I have outlined already in an issue for the TLP utility (https://github.com/linrunner/TLP/issues/321#issuecomment-575653531 and https://github.com/linrunner/TLP/issues/321#issuecomment-576059832), Google has introduced a set of new sysfs attributes and infrastructure that makes it fairly easy to implement extended controls for power supplies, and in particular batteries (for details see Documentation/ABI/testing/sysfs-class-power and drivers/power/supply/power_supply_sysfs.c).

This appears to be primarily aimed at their new Embedded Controller (Wilco EC) on the chromebook platform (drivers/power/supply/wilco-charger.c and Documentation/ABI/testing/sysfs-class-power-wilco), but in particular the charge modes and battery charging threshold settings in custom mode of the Wilco EC map directly to the ones found in Dell laptops.

Support for Huawei and Asus laptops to use this new sysfs interface has also been implemented, and the Lenovo driver may also be ported over soon.

Last, if there is a better place to report feature request for the Dell laptop driver in the Linux kernel, I would appreciate if someone could direct to the right place/forum for that.

superm1 commented 4 years ago

I think it makes fine sense to do. It's probably best to raise on the platform drivers x86 mailing list to see if anyone is working on it or intending on working on it yet. Pali Rohar has done a lot of the work on that driver already.

awehrfritz commented 4 years ago

Just to keep track of this also here, there are patches now which implement this: https://lkml.org/lkml/2020/7/29/87

fggarcia commented 3 years ago

@superm1 continue my comment from my expirience to avoid comment on closed issue. I'm trying config threshold for my XPS 9300.

linrunner commented 3 years ago

Any news on this? TLP 1.4 will have the infrastructure to support charge thresholds for Non-ThinkPads.

superm1 commented 3 years ago

@linrunner @Goperry was working on a kernel interface for it. @goperry can you provide an update?

GoPerry commented 3 years ago

@linrunner @GoPerry was working on a kernel interface for it. @GoPerry can you provide an update? @linrunner @superm1 I have another kernel patch that will need to be submitted soon. It will have the feature to support battery thresholds setting.

linrunner commented 2 years ago

@superm1 @GoPerry : is the topic still being worked on?

superm1 commented 2 years ago

Neither of us are at Dell anymore. @dell-client-linux would need to comment.

gagath commented 2 years ago

Hi, still interested in this issue. Can Dell provide us updates about this kernel support?