Re: [PATCH 2/2] hwmon: (tps38900x) Add driver for TI TPS389004/TPS389006/TPS389008
From: Luna Hart
Date: Fri Oct 02 2026 - 20:15:16 EST
On 10/1/26 1:19 AM, Krzysztof Kozlowski wrote:
On Tue, Sep 29, 2026 at 04:04:05PM -0700, Luna Hart wrote:
+static const struct i2c_device_id tps38900x_id[] = {
+ { .name = "tps389004", .driver_data = 4 },
+ { .name = "tps389006", .driver_data = 6 },
+ { .name = "tps389008", .driver_data = 8 },
+ {}
+};
+MODULE_DEVICE_TABLE(i2c, tps38900x_id);
+
+static const struct of_device_id tps38900x_of_match[] = {
+ { .compatible = "ti,tps389004", .data = (void *)4 },
+ { .compatible = "ti,tps389006", .data = (void *)6 },
+ { .compatible = "ti,tps389008", .data = (void *)8 },
Does this mean programming model is exactly the same for all of them,
just additional channels?
If so, then these could be made compatible in the binding - use
fallback, to the ti,tps389004. I don't insist, though.
Best regards,
Krzysztof
This is correct. The programming is the same across these parts,
they are differentiated just by number of channels. The tps389006
datasheet also applies to the tps389004.
That said, while double checking this, I could not find any
substantial reference for the tps389004. I could not find a
datasheet or any listing of parts with that name. The closest
I found was a mention about a nameless 4 channel version of this
part in some developer documentation. Expectation of a tps389004
came from the previous driver.
As such, I have dropped the tps389004. Leaving only the *006 and
*008, which share a datasheet.
For the fallback: I'm unsure if it would be helpful in practice here.
What does a fallback look like for the bindings? Could you point me
at an example?
Regards,
Luna Hart