mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
hwmon: (pmbus/xdpe1a2g7b) Add regulator support
Register both dual-loop output channels with the regulator framework by populating regulator_desc[] and num_regulators in pmbus_driver_info. This exposes the standard PMBus OPERATION-based on/off control and status reporting to consumer drivers. Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Link: https://lore.kernel.org/r/20260619-xdpe1a2g7b-v1-1-428c3847be0d@nexthop.ai Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
6a9ad0ac9b
commit
bee42c6311
|
|
@ -822,6 +822,16 @@ config SENSORS_XDPE1A2G7B
|
|||
This driver can also be built as a module. If so, the module will
|
||||
be called xdpe1a2g7b.
|
||||
|
||||
config SENSORS_XDPE1A2G7B_REGULATOR
|
||||
bool "Regulator support for XDPE1A2G7B and compatibles"
|
||||
depends on SENSORS_XDPE1A2G7B && REGULATOR
|
||||
help
|
||||
If you say yes here you get regulator support for Infineon
|
||||
XDPE1A2G5B and XDPE1A2G7B multi-phase digital controllers.
|
||||
|
||||
This enables the controllers to be used as regulator devices,
|
||||
providing voltage control through the regulator framework.
|
||||
|
||||
config SENSORS_XDPE122
|
||||
tristate "Infineon XDPE122 family"
|
||||
help
|
||||
|
|
|
|||
|
|
@ -57,6 +57,13 @@ static int xdpe1a2g7b_identify(struct i2c_client *client,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_SENSORS_XDPE1A2G7B_REGULATOR)
|
||||
static const struct regulator_desc xdpe1a2g7b_reg_desc[] = {
|
||||
PMBUS_REGULATOR("vout", 0),
|
||||
PMBUS_REGULATOR("vout", 1),
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct pmbus_driver_info xdpe1a2g7b_info = {
|
||||
.pages = XDPE1A2G7B_PAGE_NUM,
|
||||
.identify = xdpe1a2g7b_identify,
|
||||
|
|
@ -72,6 +79,10 @@ static struct pmbus_driver_info xdpe1a2g7b_info = {
|
|||
.func[1] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
|
||||
PMBUS_HAVE_IIN | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
|
||||
PMBUS_HAVE_PIN | PMBUS_HAVE_POUT | PMBUS_HAVE_STATUS_INPUT,
|
||||
#if IS_ENABLED(CONFIG_SENSORS_XDPE1A2G7B_REGULATOR)
|
||||
.num_regulators = XDPE1A2G7B_PAGE_NUM,
|
||||
.reg_desc = xdpe1a2g7b_reg_desc,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int xdpe1a2g7b_probe(struct i2c_client *client)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user