[accton/as4630-54pe] Fix ypeb-1200am psu_fan dir issue (#4626)

3y Power YPEB-1200am PSU doens't support read fan_dir from pmbus register

Check with vendor this PUS type only support F2B fan direction. So add to show "F2B"
when red psu_fan_dir sysfs.
This commit is contained in:
jostar-yang 2020-05-27 03:49:51 +08:00 committed by GitHub
parent bf54f48df3
commit f532fb95a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -355,6 +355,11 @@ static ssize_t show_ascii(struct device *dev, struct device_attribute *da,
switch (attr->index) {
case PSU_FAN_DIRECTION: /* psu_fan_dir */
if (data->chip==YPEB1200AM)
{
memcpy(data->fan_dir, "F2B", 3);
data->fan_dir[3]='\0';
}
ptr = data->fan_dir;
break;
case PSU_MFR_ID: /* psu_mfr_id */