Skip to contentSkip to conversation

ipmi: add i2c-addr property to ipmi platform device

PATCH In review Kamlakant Patel 2 participants 2 messages Apr 24, 2019 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipmi: add i2c-addr property to ipmi platform device

We need 'i2c-addr' property entry for ssif to work. Otherwise, it thorws following error:
"ipmi_ssif dmi-ipmi-ssif.0: ipmi_ssif: No i2c-addr property"

---
 drivers/char/ipmi/ipmi_plat_data.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/char/ipmi/ipmi_plat_data.c +2 -0
index 8f0ca2a..1075076 100644
@@ -34,6 +34,8 @@ struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
 		p->regspacing = p->regsize;
 
 	pr[pidx++] = PROPERTY_ENTRY_U8("ipmi-type", p->type);
+	if (p->addr)
+		pr[pidx++] = PROPERTY_ENTRY_U16("i2c-addr", p->addr);
 	if (p->slave_addr)
 		pr[pidx++] = PROPERTY_ENTRY_U8("slave-addr", p->slave_addr);
 	pr[pidx++] = PROPERTY_ENTRY_U8("addr-source", p->addr_source);
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 3 lines · Kamlakant Patel

We need 'i2c-addr' property entry for ssif to work. Otherwise, it thorws following error:
"ipmi_ssif dmi-ipmi-ssif.0: ipmi_ssif: No i2c-addr property"

The patch really isn't right, you only want to add the i2c-addr property if the interface is SSIF. But there's no easy way to tell this in the current code. I'll work something up.

Also, your mailer has added DOS line endings to all your patches and I can't apply them cleanly. If there's any way you can use git-send for sending patches, that would be ideal.

-corey

Quoted 22 lines
---
 drivers/char/ipmi/ipmi_plat_data.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/char/ipmi/ipmi_plat_data.c +2 -0
index 8f0ca2a..1075076 100644
@@ -34,6 +34,8 @@ struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
 		p->regspacing = p->regsize;
 
 	pr[pidx++] = PROPERTY_ENTRY_U8("ipmi-type", p->type);
+	if (p->addr)
+		pr[pidx++] = PROPERTY_ENTRY_U16("i2c-addr", p->addr);
 	if (p->slave_addr)
 		pr[pidx++] = PROPERTY_ENTRY_U8("slave-addr", p->slave_addr);
 	pr[pidx++] = PROPERTY_ENTRY_U8("addr-source", p->addr_source);
Signature · 1 line
1.8.3.1