mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
hwmon: (pmbus) Add support for additional Flex BMR converters to pmbus
Add support for Flex BMR310, BMR456, BMR457, BMR458, BMR480, BMR490, BMR491 and BMR492 to the pmbus driver Signed-off-by: Erik Rosen <erik.rosen@metormote.com> Link: https://lore.kernel.org/r/20210507194023.61138-4-erik.rosen@metormote.com [groeck: Fixed minor whitespace error] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
committed by
Guenter Roeck
parent
b976760dc4
commit
ea541c185c
@@ -3,15 +3,18 @@ Kernel driver pmbus
|
|||||||
|
|
||||||
Supported chips:
|
Supported chips:
|
||||||
|
|
||||||
* Ericsson BMR453, BMR454
|
* Flex BMR310, BMR453, BMR454, BMR456, BMR457, BMR458, BMR480,
|
||||||
|
BMR490, BMR491, BMR492
|
||||||
|
|
||||||
Prefixes: 'bmr453', 'bmr454'
|
Prefixes: 'bmr310', 'bmr453', 'bmr454', 'bmr456', 'bmr457', 'bmr458', 'bmr480',
|
||||||
|
'bmr490', 'bmr491', 'bmr492'
|
||||||
|
|
||||||
Addresses scanned: -
|
Addresses scanned: -
|
||||||
|
|
||||||
Datasheet:
|
Datasheets:
|
||||||
|
|
||||||
|
https://flexpowermodules.com/products
|
||||||
|
|
||||||
http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146395
|
|
||||||
|
|
||||||
* ON Semiconductor ADP4000, NCP4200, NCP4208
|
* ON Semiconductor ADP4000, NCP4200, NCP4208
|
||||||
|
|
||||||
|
@@ -19,9 +19,10 @@ config SENSORS_PMBUS
|
|||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
If you say yes here you get hardware monitoring support for generic
|
If you say yes here you get hardware monitoring support for generic
|
||||||
PMBus devices, including but not limited to ADP4000, BMR453, BMR454,
|
PMBus devices, including but not limited to ADP4000, BMR310, BMR453,
|
||||||
MAX20796, MDT040, NCP4200, NCP4208, PDT003, PDT006, PDT012, TPS40400,
|
BMR454, BMR456, BMR457, BMR458, BMR480, BMR490, BMR491, BMR492,
|
||||||
TPS544B20, TPS544B25, TPS544C20, TPS544C25, and UDT020.
|
MAX20796, MDT040, NCP4200, NCP4208, PDT003, PDT006, PDT012,
|
||||||
|
TPS40400, TPS544B20, TPS544B25, TPS544C20, TPS544C25, and UDT020.
|
||||||
|
|
||||||
This driver can also be built as a module. If so, the module will
|
This driver can also be built as a module. If so, the module will
|
||||||
be called pmbus.
|
be called pmbus.
|
||||||
|
@@ -173,13 +173,13 @@ static int pmbus_probe(struct i2c_client *client)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
device_info = (struct pmbus_device_info *)i2c_match_id(pmbus_id, client)->driver_data;
|
device_info = (struct pmbus_device_info *)i2c_match_id(pmbus_id, client)->driver_data;
|
||||||
if (device_info->flags & PMBUS_SKIP_STATUS_CHECK) {
|
if (device_info->flags) {
|
||||||
pdata = devm_kzalloc(dev, sizeof(struct pmbus_platform_data),
|
pdata = devm_kzalloc(dev, sizeof(struct pmbus_platform_data),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!pdata)
|
if (!pdata)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
pdata->flags = PMBUS_SKIP_STATUS_CHECK;
|
pdata->flags = device_info->flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->pages = device_info->pages;
|
info->pages = device_info->pages;
|
||||||
@@ -193,22 +193,37 @@ static const struct pmbus_device_info pmbus_info_one = {
|
|||||||
.pages = 1,
|
.pages = 1,
|
||||||
.flags = 0
|
.flags = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct pmbus_device_info pmbus_info_zero = {
|
static const struct pmbus_device_info pmbus_info_zero = {
|
||||||
.pages = 0,
|
.pages = 0,
|
||||||
.flags = 0
|
.flags = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct pmbus_device_info pmbus_info_one_skip = {
|
static const struct pmbus_device_info pmbus_info_one_skip = {
|
||||||
.pages = 1,
|
.pages = 1,
|
||||||
.flags = PMBUS_SKIP_STATUS_CHECK
|
.flags = PMBUS_SKIP_STATUS_CHECK
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct pmbus_device_info pmbus_info_one_status = {
|
||||||
|
.pages = 1,
|
||||||
|
.flags = PMBUS_READ_STATUS_AFTER_FAILED_CHECK
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use driver_data to set the number of pages supported by the chip.
|
* Use driver_data to set the number of pages supported by the chip.
|
||||||
*/
|
*/
|
||||||
static const struct i2c_device_id pmbus_id[] = {
|
static const struct i2c_device_id pmbus_id[] = {
|
||||||
{"adp4000", (kernel_ulong_t)&pmbus_info_one},
|
{"adp4000", (kernel_ulong_t)&pmbus_info_one},
|
||||||
|
{"bmr310", (kernel_ulong_t)&pmbus_info_one_status},
|
||||||
{"bmr453", (kernel_ulong_t)&pmbus_info_one},
|
{"bmr453", (kernel_ulong_t)&pmbus_info_one},
|
||||||
{"bmr454", (kernel_ulong_t)&pmbus_info_one},
|
{"bmr454", (kernel_ulong_t)&pmbus_info_one},
|
||||||
|
{"bmr456", (kernel_ulong_t)&pmbus_info_one},
|
||||||
|
{"bmr457", (kernel_ulong_t)&pmbus_info_one},
|
||||||
|
{"bmr458", (kernel_ulong_t)&pmbus_info_one_status},
|
||||||
|
{"bmr480", (kernel_ulong_t)&pmbus_info_one_status},
|
||||||
|
{"bmr490", (kernel_ulong_t)&pmbus_info_one_status},
|
||||||
|
{"bmr491", (kernel_ulong_t)&pmbus_info_one_status},
|
||||||
|
{"bmr492", (kernel_ulong_t)&pmbus_info_one},
|
||||||
{"dps460", (kernel_ulong_t)&pmbus_info_one_skip},
|
{"dps460", (kernel_ulong_t)&pmbus_info_one_skip},
|
||||||
{"dps650ab", (kernel_ulong_t)&pmbus_info_one_skip},
|
{"dps650ab", (kernel_ulong_t)&pmbus_info_one_skip},
|
||||||
{"dps800", (kernel_ulong_t)&pmbus_info_one_skip},
|
{"dps800", (kernel_ulong_t)&pmbus_info_one_skip},
|
||||||
|
Reference in New Issue
Block a user