Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d830e27d authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (pmbus) Enable PEC if the controller supports it



PMBus controllers optionally support PEC. Configure the driver
to use it if available to improve operational security.

Suggested-by: default avatarMichael Jones <mike@proclivis.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 2c052d42
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1751,6 +1751,11 @@ static int pmbus_init_common(struct i2c_client *client, struct pmbus_data *data,
		}
		}
	}
	}


	/* Enable PEC if the controller supports it */
	ret = i2c_smbus_read_byte_data(client, PMBUS_CAPABILITY);
	if (ret >= 0 && (ret & PB_CAPABILITY_ERROR_CHECK))
		client->flags |= I2C_CLIENT_PEC;

	pmbus_clear_faults(client);
	pmbus_clear_faults(client);


	if (info->identify) {
	if (info->identify) {