kernel
kernel copied to clipboard
Drivers for MAX34407 and MAX34417
The Surface devices seem to use MAX34407 (up to Pro 6) and MAX34417 (later) to measure power consumption for various components / part of the system (see e.g. https://github.com/linux-surface/acpidumps/blob/master/surface_book_2/dsdt.dsl#L18219-L18226).
Datasheets:
- https://www.maximintegrated.com/en/products/analog/amplifiers/MAX34407.html
- https://www.maximintegrated.com/en/products/analog/amplifiers/MAX34417.html
The missing drivers don't impact system performance, so this is a low priority issue.
Related upstream proposed patch: https://lists.sr.ht/~postmarketos/upstreaming/patches/10202 (regulator: max77826: Add MAX77826 support). There could be some commonalities to MAX34407 and MAX34417?
Maybe, that thing looks like a full-blown regulator, i.e. for controlling voltages, whereas (I think) the ones used on the Surface devices are for measuring only.
Ah, I see. The regulator patch is upstream, maybe closer one is https://github.com/torvalds/linux/blob/master/drivers/hwmon/pmbus/max34440.c (pressed T in GitHub file list aka "go to file" and typed drivers/max to get these results).
Hmm. My search regarding MAX34417 revealed there appears to be a driver from Maxim https://github.com/MaximIntegratedAI/powermonitor/blob/main/max34417.c Also https://github.com/DanielJeongADI/LKD has one, and IMO a few more (Surface Duo has references to it, too). Searched in GitHub for MAX34417. Integration into max34440.c doesn't seem to fit to well. I have 3x MAX34417 in the Windows Dev Kit 2023, and I'd like to use hem to find ot which regulators are what power domain, to make the dts better, and get a handle on power management.