Open Artox opened 4 years ago
I have implemented a prototype driver: https://github.com/Artox/linux/commit/aa739e598b3e071a0b85d7041acb893f56532726
Working:
Nice to Have:
Hello @Artox, good news! The base driver finally landed in linux-next.
A few things changed in the meantime:
ntxec
to de-emphasize the specific microcontroller used.If you're still interested in this driver, I'll be happy to review your patches (please let me know).
\o/
I was quietly watching the iterations of your patchset on the lists, well done! I am still interested, but it might take me up to a month before I can spend time on this again :(
So depending on your plans, you could take over my work - or wait, focus on something else etc. The biggest open questions imo are if I have modeled the battery appropriately in device-tree - especially with hard-coding capacity and voltages.
There's no hurry from my end (for the near future).
About the devicetree details: I don't know. I think this is best answered by the power supply and DT experts on the mailing lists.
@neuschaefer I finally got around to adapting my work to the current multi-function driver: https://github.com/Artox/linux/commit/773c4d07a0719d9804ade2d98427bd431ebf72b4
This is feature-wise identical what I had earlier, but much boilerplate inspired by your rtc driver.
I will still have to properly split dts and driver - and add documentation. But if you want to play around with,
cat /sys/class/power_supply/ec-battery/uevent
is used to report some static information as well as the voltage level.
added copyright header .... thanks for reminding me! https://github.com/Artox/linux/commit/bd153bf852e73de3dbc01690ac847dffbdc8fa0a
some general comments here: if there is some guess about current,
fuel_level_LiIon() in linux/power/generic-fuel-gauge.h
can be used to get percent, if there is good information about current, registering iio channels and using generic-adc-battery on top of that might be interesting.
Hi @Artox, are you still interested in bringing the battery driver upsteam?
If you have questions about the API changes in the NTXEC drivers, I'd be happy to help.
The Embedded Controller provides status information about the battery. This issue collects information and code drops related to implementing a driver that can ultimately report charge level and charging status.