hwmon:q54sj108a2: the PMBUS_MFR_ID is actually 6 chars instead of 5
PATCH 1/1 hwmon:q54sj108a2: the PMBUS_MFR_ID is actually 6 chars instead of 5
The PMBUS_MFR_ID block is actually 6 chars for q54sj108a2. /sys/bus/i2c/drivers/q54sj108a2_test# iotools smbus_read8 $BUS $ADDR 0x99 0x06
Tested: Devices are able to bind to the q54sj108a2 driver successfully.
--- drivers/hwmon/pmbus/q54sj108a2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/pmbus/q54sj108a2.c +1 -1
@@ -299,7 +299,7 @@ static int q54sj108a2_probe(struct i2c_client *client)dev_err (&client->dev,"Failed to read Manufacturer ID\n" );return ret; } -if (ret !=5 ||strncmp (buf,"DELTA" ,5 )) { +if (ret !=6 ||strncmp (buf,"DELTA" ,5 )) { buf[ret] ='\0' ;dev_err (dev,"Unsupported Manufacturer ID '%s'\n" , buf);return -ENODEV ;
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
Guenter Roeck
maintainerQuoted 4 lines · Chu Lin
The
PMBUS_MFR_IDblock is actually 6 chars for q54sj108a2. /sys/bus/i2c/drivers/q54sj108a2_test# iotoolssmbus_read8$BUS $ADDR0x990x06
What is the 6th character ? Should it be checked as well ?
Quoted 21 lines
Tested: Devices are able to bind to the q54sj108a2 driver successfully.
Signed-off-by Chu Lin <[email protected]>--- drivers/hwmon/pmbus/q54sj108a2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/q54sj108a2.c +1
-1@@ -299,7 +299,7 @@ static int q54sj108a2_probe(struct i2c_client *client)dev_err (&client->dev,"Failed to read Manufacturer ID\n" );return ret; } -if (ret !=5 ||strncmp (buf,"DELTA" ,5 )) { +if (ret !=6 ||strncmp (buf,"DELTA" ,5 )) { buf[ret] ='\0' ;dev_err (dev,"Unsupported Manufacturer ID '%s'\n" , buf);return -ENODEV ;
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Chu Lin
The
PMBUS_MFR_IDblock is actually 6 chars for q54sj108a2. /sys/bus/i2c/drivers/q54sj108a2_test# iotoolssmbus_read8$BUS $ADDR0x990x06What is the 6th character ? Should it be checked as well ?
The 6th char is \0. Do you suggest we check that as well?
Thanks,
Chu
Quoted 22 lines
Quoted 21 lines
Tested: Devices are able to bind to the q54sj108a2 driver successfully.
Signed-off-by Chu Lin <[email protected]>--- drivers/hwmon/pmbus/q54sj108a2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/q54sj108a2.c +1
-1@@ -299,7 +299,7 @@ static int q54sj108a2_probe(struct i2c_client *client)dev_err (&client->dev,"Failed to read Manufacturer ID\n" );return ret; } -if (ret !=5 ||strncmp (buf,"DELTA" ,5 )) { +if (ret !=6 ||strncmp (buf,"DELTA" ,5 )) { buf[ret] ='\0' ;dev_err (dev,"Unsupported Manufacturer ID '%s'\n" , buf);return -ENODEV ;
Guenter Roeck
maintainerQuoted 12 lines · Chu Lin
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Chu Lin
The
PMBUS_MFR_IDblock is actually 6 chars for q54sj108a2. /sys/bus/i2c/drivers/q54sj108a2_test# iotoolssmbus_read8$BUS $ADDR0x990x06What is the 6th character ? Should it be checked as well ?
The 6th char is \0. Do you suggest we check that as well?
No, that would be a bit pointless. I'll apply the patch.
Thanks,
Guenter
Quoted 25 lines
Thanks,
ChuQuoted 22 lines
Quoted 21 lines
Tested: Devices are able to bind to the q54sj108a2 driver successfully.
Signed-off-by Chu Lin <[email protected]>--- drivers/hwmon/pmbus/q54sj108a2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/q54sj108a2.c +1
-1@@ -299,7 +299,7 @@ static int q54sj108a2_probe(struct i2c_client *client)dev_err (&client->dev,"Failed to read Manufacturer ID\n" );return ret; } -if (ret !=5 ||strncmp (buf,"DELTA" ,5 )) { +if (ret !=6 ||strncmp (buf,"DELTA" ,5 )) { buf[ret] ='\0' ;dev_err (dev,"Unsupported Manufacturer ID '%s'\n" , buf);return -ENODEV ;