Re: [PATCH 2/3] lm25066: export sysfs attribute for SAMPLES_FOR_AVG
On Wed, Apr 10, 2019 at 05:55:19PM -0700, Guenter Roeck wrote: > > +static ssize_t samples_for_avg_show(struct device *dev, > > + struct device_attribute *attr, char *buf) > > +{ > > + struct i2c_client *client = to_i2c_client(dev->parent); > > + int ret; > > + > > + ret = pmbus_read_byte_data(client, 0, LM25066_SAMPLES_FOR_AVG); > > + if (ret < 0) > > + return ret; > > + > > + return sprintf(buf, "%d\n", 1 << ret); > > +} > > + > > +static ssize_t samples_for_avg_store(struct device *dev, > > +struct device_attribute *attr, > > +const char *buf, size_t count) > > +{ > > + struct i2c_client *client = to_i2c_client(dev->parent); > > + int ret, val; > > + > > + ret = kstrtoint(buf, 0, ); > > + if (ret < 0) > > + return ret; > > + > > + ret = pmbus_write_byte_data(client, 0, LM25066_SAMPLES_FOR_AVG, > > + ilog2(val)); > > + if (ret < 0) > > + return ret; > > + > > + return count; > > +} > > + > > +static DEVICE_ATTR_RW(samples_for_avg); > > + > > +static struct attribute *lm25056_attrs[] = { > > + _attr_samples_for_avg.attr, > > + NULL, > > +}; > > +ATTRIBUTE_GROUPS(lm25056); // should we set a name of this group to put all > > + // those attributes in subdirectory? Like "custom" ? > > + > We don't add subdirectories for other chips, and we won't start it here. > > I don't mind the attribute itself, but I do mind its name. We'll have > to find something more generic, such as 'num_samples' or just 'samples'. > I am open to suggestions. We'll also have to decide if the attribute(s) > should be limited to one per chip, or if there can be multiple attributes. > For example, MAX34462 has separate values for iout_samples and adc_average. > Do we want samples, {curr,in,power,...}_samples, or both ? Or even > currX_samples ? For my use case -- TI's INA chips, there is only one "samples" configuration being used for all currX_inputs and inX_inputs. So having a "samples" node would certainly fit better than an in0_samples. So I vote for having both. Thank you Nicolin
Re: [PATCH 2/3] lm25066: export sysfs attribute for SAMPLES_FOR_AVG
On 4/10/19 3:39 PM, Adamski, Krzysztof (Nokia - PL/Wroclaw) wrote: Register custom sysfs attribute to be registered by pmbus allowing read/write access to the manufacturer specific SAMPLES_FOR_AVG register. This register allows setting the number of samples used in computing the average values (PMBUS_VIRT_READ_*_AVG). The number we write is an exponent of base 2 of the number of samples so for example writing 3 will result in 8 samples average. Signed-off-by: Krzysztof Adamski --- drivers/hwmon/pmbus/lm25066.c | 45 +++ 1 file changed, 45 insertions(+) diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c index 53db78753a0d..c78af0a7e5ff 100644 --- a/drivers/hwmon/pmbus/lm25066.c +++ b/drivers/hwmon/pmbus/lm25066.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "pmbus.h" enum chips { lm25056, lm25066, lm5064, lm5066, lm5066i }; @@ -38,6 +39,7 @@ enum chips { lm25056, lm25066, lm5064, lm5066, lm5066i }; #define LM25066_READ_PIN_PEAK 0xd5 #define LM25066_CLEAR_PIN_PEAK0xd6 #define LM25066_DEVICE_SETUP 0xd9 +#define LM25066_SAMPLES_FOR_AVG0xdb #define LM25066_READ_AVG_VIN 0xdc #define LM25066_READ_AVG_VOUT 0xdd #define LM25066_READ_AVG_IIN 0xde @@ -405,6 +407,47 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg, return ret; } +static ssize_t samples_for_avg_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct i2c_client *client = to_i2c_client(dev->parent); + int ret; + + ret = pmbus_read_byte_data(client, 0, LM25066_SAMPLES_FOR_AVG); + if (ret < 0) + return ret; + + return sprintf(buf, "%d\n", 1 << ret); +} + +static ssize_t samples_for_avg_store(struct device *dev, +struct device_attribute *attr, +const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev->parent); + int ret, val; + + ret = kstrtoint(buf, 0, ); + if (ret < 0) + return ret; + + ret = pmbus_write_byte_data(client, 0, LM25066_SAMPLES_FOR_AVG, + ilog2(val)); + if (ret < 0) + return ret; + + return count; +} + +static DEVICE_ATTR_RW(samples_for_avg); + +static struct attribute *lm25056_attrs[] = { + _attr_samples_for_avg.attr, + NULL, +}; +ATTRIBUTE_GROUPS(lm25056); // should we set a name of this group to put all + // those attributes in subdirectory? Like "custom" ? + We don't add subdirectories for other chips, and we won't start it here. I don't mind the attribute itself, but I do mind its name. We'll have to find something more generic, such as 'num_samples' or just 'samples'. I am open to suggestions. We'll also have to decide if the attribute(s) should be limited to one per chip, or if there can be multiple attributes. For example, MAX34462 has separate values for iout_samples and adc_average. Do we want samples, {curr,in,power,...}_samples, or both ? Or even currX_samples ? Either case, this is needed for more than one pmbus chip (and I know it is needed for some non-PMBus chips). I am inclined to add it as generic attribute into the pmbus core instead (and possibly add it to the ABI). Thanks, Guenter static int lm25066_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -476,6 +519,8 @@ static int lm25066_probe(struct i2c_client *client, info->b[PSC_POWER] = coeff[PSC_POWER].b; } + info->groups = lm25056_groups; + return pmbus_do_probe(client, id, info); }
Re: [PATCH v2 10/21] docs: hwmon: aspeed-pwm-tacho: convert to ReST format
On Thu, 11 Apr 2019, at 04:54, Mauro Carvalho Chehab wrote: > Convert aspeed-pwm-tacho to ReST format, in order to allow it to > be parsed by Sphinx. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Andrew Jeffery > --- > Documentation/hwmon/aspeed-pwm-tacho | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/hwmon/aspeed-pwm-tacho > b/Documentation/hwmon/aspeed-pwm-tacho > index 7cfb34977460..6dcec845fbc7 100644 > --- a/Documentation/hwmon/aspeed-pwm-tacho > +++ b/Documentation/hwmon/aspeed-pwm-tacho > @@ -15,8 +15,10 @@ controller supports up to 16 tachometer inputs. > > The driver provides the following sensor accesses in sysfs: > > +=== === = > fanX_input ro provide current fan rotation value in RPM as reported > by the fan to the device. > > pwmX rw get or set PWM fan control value. This is an integer > value between 0(off) and 255(full speed). > +=== === = > -- > 2.20.1 > >
Re: [PATCH 1/3] pmbus: support for custom sysfs attributes
On 4/10/19 3:38 PM, Adamski, Krzysztof (Nokia - PL/Wroclaw) wrote: This patch makes it possible to pass custom struct attribute_group array via the pmbus_driver_info struct so that those can be added to the attribute groups passed to hwmon_device_register_with_groups(). This makes it possible to register custom sysfs attributes by PMBUS drivers similar to how you can do this with most other busses/classes. Signed-off-by: Krzysztof Adamski --- drivers/hwmon/pmbus/pmbus.h | 3 +++ drivers/hwmon/pmbus/pmbus_core.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index 1d24397d36ec..fb267ec11623 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -417,6 +417,9 @@ struct pmbus_driver_info { /* Regulator functionality, if supported by this chip driver. */ int num_regulators; const struct regulator_desc *reg_desc; + + /* custom attributes */ + const struct attribute_group **groups; I can understand the need and desire for one additional group. More than one is highly questionable. Please explain why you think that more than one extra attribute would ever be needed. It does add substantial complexity, so there should be a good reason. Thanks, Guenter }; /* Regulator ops */ diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 2e2b5851139c..7a7dcdc8acc9 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -103,7 +103,7 @@ struct pmbus_data { int max_attributes; int num_attributes; struct attribute_group group; - const struct attribute_group *groups[2]; + const struct attribute_group **groups; struct dentry *debugfs; /* debugfs device directory */ struct pmbus_sensor *sensors; @@ -2305,6 +2305,7 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, struct device *dev = >dev; const struct pmbus_platform_data *pdata = dev_get_platdata(dev); struct pmbus_data *data; + size_t groups_num = 0; int ret; if (!info) @@ -2319,6 +2320,15 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, if (!data) return -ENOMEM; + if (info->groups) + while (info->groups[groups_num]) + groups_num++; + + data->groups = devm_kcalloc(dev, groups_num + 2, sizeof(void *), + GFP_KERNEL); + if (!data->groups) + return -ENOMEM; + i2c_set_clientdata(client, data); mutex_init(>update_lock); data->dev = dev; @@ -2346,6 +2356,7 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, } data->groups[0] = >group; + memcpy(data->groups + 1, info->groups, sizeof(void *) * groups_num); data->hwmon_dev = hwmon_device_register_with_groups(dev, client->name, data, data->groups); if (IS_ERR(data->hwmon_dev)) {
Re: [PATCH 3/3] pmbus: export coefficients via sysfs
On 4/10/19 3:39 PM, Adamski, Krzysztof (Nokia - PL/Wroclaw) wrote: In order to get best accuracy, in case of some devices it is required to tweak coefficient values. This is especially true for devices using some external shunt resistor or being operated in non-usual environment. Those values may be measured during device production and stored as calibration values in some place (like EEPROM or even a file). To support wide range of possible use cases, lets export those to user space via sysfs attributes so that it can implement its own policies about them. All those attributes are put into separate attribute_group struct so that we can set its name to group all of them in a "coefficients" subdirectory in sysfs. Coefficients are hardcoded into the chip, and the hwmon ABI reports raw values. Any correction should be done using sensors3.conf. Guenter Signed-off-by: Krzysztof Adamski > --- drivers/hwmon/pmbus/pmbus_core.c | 100 ++- 1 file changed, 97 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 7a7dcdc8acc9..8cb61fc977db 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -57,6 +57,8 @@ #define PMBUS_NAME_SIZE 24 +static const char * const coeff_name[] = {"m", "b", "R"}; + struct pmbus_sensor { struct pmbus_sensor *next; char name[PMBUS_NAME_SIZE]; /* sysfs sensor name */ @@ -98,11 +100,12 @@ struct pmbus_data { int exponent[PMBUS_PAGES]; /* linear mode: exponent for output voltages */ - const struct pmbus_driver_info *info; + struct pmbus_driver_info *info; int max_attributes; int num_attributes; struct attribute_group group; + struct attribute_group group_coeff; const struct attribute_group **groups; struct dentry *debugfs; /* debugfs device directory */ @@ -1901,6 +1904,88 @@ static int pmbus_add_fan_attributes(struct i2c_client *client, return 0; } +static struct attribute *pmbus_init_coeff_attr(struct pmbus_data *data, + const char *prefix, + const char *coeff, int *target) +{ + struct dev_ext_attribute *ext_attr; + char *name; + + ext_attr = devm_kzalloc(data->dev, sizeof(ext_attr), GFP_KERNEL); + if (!ext_attr) + return NULL; + + name = devm_kasprintf(data->dev, GFP_KERNEL, "%s_%s", prefix, coeff); + if (!name) + return NULL; + + pmbus_dev_attr_init(_attr->attr, name, (S_IWUSR | S_IRUGO), + device_show_int, device_store_int); + ext_attr->var = target; + + return _attr->attr.attr; +} + +static int pmbus_add_coeff_attributes_class(struct pmbus_data *data, + const char *prefix, + enum pmbus_sensor_classes class, + struct attribute **attrs) +{ + int *coeff_val[] = {data->info->m, data->info->b, data->info->R}; + struct attribute *ret; + int i, count = 0; + + for (i = 0; i < ARRAY_SIZE(coeff_name); i++) { + ret = pmbus_init_coeff_attr(data, prefix, coeff_name[i], + coeff_val[i]); + if (!ret) + return -ENOMEM; + attrs[count++] = ret; + } + + return count; +} + +static const char * const classes_names[] = { + [PSC_VOLTAGE_IN] = "vin", + [PSC_VOLTAGE_OUT] = "vout", + [PSC_CURRENT_IN] = "iin", + [PSC_CURRENT_OUT] = "iout", + [PSC_POWER] = "p", + [PSC_TEMPERATURE] = "temp", +}; + +static int pmbus_add_coeff_attributes(struct i2c_client *client, + struct pmbus_data *data) +{ + struct attribute **attrs; + int i, n = 0, ret = 0; + + attrs = kcalloc(ARRAY_SIZE(coeff_name) * (PSC_NUM_CLASSES + 1), + sizeof(void *), GFP_KERNEL); + if (!attrs) + return -ENOMEM; + + for (i = 0; i < ARRAY_SIZE(classes_names); i++) { + if (classes_names[i] == NULL) + continue; + + ret = pmbus_add_coeff_attributes_class(data, classes_names[i], + i, [n]); + if (ret < 0) { + kfree(attrs); + return ret; + } + + n += ret; + } + + data->group_coeff.name = "coefficients"; + data->group_coeff.attrs = attrs; + + return 0; +} + static int pmbus_find_attributes(struct i2c_client *client, struct pmbus_data *data) { @@ -1932,6 +2017,11 @@ static int pmbus_find_attributes(struct i2c_client *client, /* Fans
[PATCH 3/3] pmbus: export coefficients via sysfs
In order to get best accuracy, in case of some devices it is required to tweak coefficient values. This is especially true for devices using some external shunt resistor or being operated in non-usual environment. Those values may be measured during device production and stored as calibration values in some place (like EEPROM or even a file). To support wide range of possible use cases, lets export those to user space via sysfs attributes so that it can implement its own policies about them. All those attributes are put into separate attribute_group struct so that we can set its name to group all of them in a "coefficients" subdirectory in sysfs. Signed-off-by: Krzysztof Adamski --- drivers/hwmon/pmbus/pmbus_core.c | 100 ++- 1 file changed, 97 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 7a7dcdc8acc9..8cb61fc977db 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -57,6 +57,8 @@ #define PMBUS_NAME_SIZE24 +static const char * const coeff_name[] = {"m", "b", "R"}; + struct pmbus_sensor { struct pmbus_sensor *next; char name[PMBUS_NAME_SIZE]; /* sysfs sensor name */ @@ -98,11 +100,12 @@ struct pmbus_data { int exponent[PMBUS_PAGES]; /* linear mode: exponent for output voltages */ - const struct pmbus_driver_info *info; + struct pmbus_driver_info *info; int max_attributes; int num_attributes; struct attribute_group group; + struct attribute_group group_coeff; const struct attribute_group **groups; struct dentry *debugfs; /* debugfs device directory */ @@ -1901,6 +1904,88 @@ static int pmbus_add_fan_attributes(struct i2c_client *client, return 0; } +static struct attribute *pmbus_init_coeff_attr(struct pmbus_data *data, + const char *prefix, + const char *coeff, int *target) +{ + struct dev_ext_attribute *ext_attr; + char *name; + + ext_attr = devm_kzalloc(data->dev, sizeof(ext_attr), GFP_KERNEL); + if (!ext_attr) + return NULL; + + name = devm_kasprintf(data->dev, GFP_KERNEL, "%s_%s", prefix, coeff); + if (!name) + return NULL; + + pmbus_dev_attr_init(_attr->attr, name, (S_IWUSR | S_IRUGO), + device_show_int, device_store_int); + ext_attr->var = target; + + return _attr->attr.attr; +} + +static int pmbus_add_coeff_attributes_class(struct pmbus_data *data, + const char *prefix, + enum pmbus_sensor_classes class, + struct attribute **attrs) +{ + int *coeff_val[] = {data->info->m, data->info->b, data->info->R}; + struct attribute *ret; + int i, count = 0; + + for (i = 0; i < ARRAY_SIZE(coeff_name); i++) { + ret = pmbus_init_coeff_attr(data, prefix, coeff_name[i], + coeff_val[i]); + if (!ret) + return -ENOMEM; + attrs[count++] = ret; + } + + return count; +} + +static const char * const classes_names[] = { + [PSC_VOLTAGE_IN] = "vin", + [PSC_VOLTAGE_OUT] = "vout", + [PSC_CURRENT_IN] = "iin", + [PSC_CURRENT_OUT] = "iout", + [PSC_POWER] = "p", + [PSC_TEMPERATURE] = "temp", +}; + +static int pmbus_add_coeff_attributes(struct i2c_client *client, + struct pmbus_data *data) +{ + struct attribute **attrs; + int i, n = 0, ret = 0; + + attrs = kcalloc(ARRAY_SIZE(coeff_name) * (PSC_NUM_CLASSES + 1), + sizeof(void *), GFP_KERNEL); + if (!attrs) + return -ENOMEM; + + for (i = 0; i < ARRAY_SIZE(classes_names); i++) { + if (classes_names[i] == NULL) + continue; + + ret = pmbus_add_coeff_attributes_class(data, classes_names[i], + i, [n]); + if (ret < 0) { + kfree(attrs); + return ret; + } + + n += ret; + } + + data->group_coeff.name = "coefficients"; + data->group_coeff.attrs = attrs; + + return 0; +} + static int pmbus_find_attributes(struct i2c_client *client, struct pmbus_data *data) { @@ -1932,6 +2017,11 @@ static int pmbus_find_attributes(struct i2c_client *client, /* Fans */ ret = pmbus_add_fan_attributes(client, data); + if (ret) + return ret; + + /* Coefficients */ + ret = pmbus_add_coeff_attributes(client, data); return
[PATCH 2/3] lm25066: export sysfs attribute for SAMPLES_FOR_AVG
Register custom sysfs attribute to be registered by pmbus allowing read/write access to the manufacturer specific SAMPLES_FOR_AVG register. This register allows setting the number of samples used in computing the average values (PMBUS_VIRT_READ_*_AVG). The number we write is an exponent of base 2 of the number of samples so for example writing 3 will result in 8 samples average. Signed-off-by: Krzysztof Adamski --- drivers/hwmon/pmbus/lm25066.c | 45 +++ 1 file changed, 45 insertions(+) diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c index 53db78753a0d..c78af0a7e5ff 100644 --- a/drivers/hwmon/pmbus/lm25066.c +++ b/drivers/hwmon/pmbus/lm25066.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "pmbus.h" enum chips { lm25056, lm25066, lm5064, lm5066, lm5066i }; @@ -38,6 +39,7 @@ enum chips { lm25056, lm25066, lm5064, lm5066, lm5066i }; #define LM25066_READ_PIN_PEAK 0xd5 #define LM25066_CLEAR_PIN_PEAK 0xd6 #define LM25066_DEVICE_SETUP 0xd9 +#define LM25066_SAMPLES_FOR_AVG0xdb #define LM25066_READ_AVG_VIN 0xdc #define LM25066_READ_AVG_VOUT 0xdd #define LM25066_READ_AVG_IIN 0xde @@ -405,6 +407,47 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg, return ret; } +static ssize_t samples_for_avg_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct i2c_client *client = to_i2c_client(dev->parent); + int ret; + + ret = pmbus_read_byte_data(client, 0, LM25066_SAMPLES_FOR_AVG); + if (ret < 0) + return ret; + + return sprintf(buf, "%d\n", 1 << ret); +} + +static ssize_t samples_for_avg_store(struct device *dev, +struct device_attribute *attr, +const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev->parent); + int ret, val; + + ret = kstrtoint(buf, 0, ); + if (ret < 0) + return ret; + + ret = pmbus_write_byte_data(client, 0, LM25066_SAMPLES_FOR_AVG, + ilog2(val)); + if (ret < 0) + return ret; + + return count; +} + +static DEVICE_ATTR_RW(samples_for_avg); + +static struct attribute *lm25056_attrs[] = { + _attr_samples_for_avg.attr, + NULL, +}; +ATTRIBUTE_GROUPS(lm25056); // should we set a name of this group to put all + // those attributes in subdirectory? Like "custom" ? + static int lm25066_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -476,6 +519,8 @@ static int lm25066_probe(struct i2c_client *client, info->b[PSC_POWER] = coeff[PSC_POWER].b; } + info->groups = lm25056_groups; + return pmbus_do_probe(client, id, info); } -- 2.20.1
[PATCH 0/3] pmbus: extend configurability via sysfs
Hi, This patch series extends pmbus core for two specific use cases we have: - First two patches allows lm25066 driver to export custom sysfs entry for controlling manufacturer specific SAMPLES_FOR_AVG register. It is useful to be able to set this register when using any of the *_average registers, especially since the default value means we are averaging 1 sample which isn't that useful. - Third patch exports m, b, R coefficients so that they can be adjusted by user space. We can't use default coefficients values and in order to achieve high accuracy, we calibrate then per device so using device-tree or similar concepts to store them is not an option too. Thus, we export it so that the logic of loading proper coeffs can be implemented in user space instead. Krzysztof Adamski (3): pmbus: support for custom sysfs attributes lm25066: export sysfs attribute for SAMPLES_FOR_AVG pmbus: export coefficients via sysfs drivers/hwmon/pmbus/lm25066.c| 45 + drivers/hwmon/pmbus/pmbus.h | 3 + drivers/hwmon/pmbus/pmbus_core.c | 109 ++- 3 files changed, 155 insertions(+), 2 deletions(-) -- 2.20.1
[PATCH 1/3] pmbus: support for custom sysfs attributes
This patch makes it possible to pass custom struct attribute_group array via the pmbus_driver_info struct so that those can be added to the attribute groups passed to hwmon_device_register_with_groups(). This makes it possible to register custom sysfs attributes by PMBUS drivers similar to how you can do this with most other busses/classes. Signed-off-by: Krzysztof Adamski --- drivers/hwmon/pmbus/pmbus.h | 3 +++ drivers/hwmon/pmbus/pmbus_core.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index 1d24397d36ec..fb267ec11623 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -417,6 +417,9 @@ struct pmbus_driver_info { /* Regulator functionality, if supported by this chip driver. */ int num_regulators; const struct regulator_desc *reg_desc; + + /* custom attributes */ + const struct attribute_group **groups; }; /* Regulator ops */ diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 2e2b5851139c..7a7dcdc8acc9 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -103,7 +103,7 @@ struct pmbus_data { int max_attributes; int num_attributes; struct attribute_group group; - const struct attribute_group *groups[2]; + const struct attribute_group **groups; struct dentry *debugfs; /* debugfs device directory */ struct pmbus_sensor *sensors; @@ -2305,6 +2305,7 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, struct device *dev = >dev; const struct pmbus_platform_data *pdata = dev_get_platdata(dev); struct pmbus_data *data; + size_t groups_num = 0; int ret; if (!info) @@ -2319,6 +2320,15 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, if (!data) return -ENOMEM; + if (info->groups) + while (info->groups[groups_num]) + groups_num++; + + data->groups = devm_kcalloc(dev, groups_num + 2, sizeof(void *), + GFP_KERNEL); + if (!data->groups) + return -ENOMEM; + i2c_set_clientdata(client, data); mutex_init(>update_lock); data->dev = dev; @@ -2346,6 +2356,7 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, } data->groups[0] = >group; + memcpy(data->groups + 1, info->groups, sizeof(void *) * groups_num); data->hwmon_dev = hwmon_device_register_with_groups(dev, client->name, data, data->groups); if (IS_ERR(data->hwmon_dev)) { -- 2.20.1
[PATCH v2 17/21] docs: hwmon: k8temp, w83793: convert to ReST format
Convert k8temp and w83793 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/k8temp | 17 +++-- Documentation/hwmon/w83793 | 123 - 2 files changed, 77 insertions(+), 63 deletions(-) diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp index 716dc24c7237..72da12aa17e5 100644 --- a/Documentation/hwmon/k8temp +++ b/Documentation/hwmon/k8temp @@ -2,12 +2,17 @@ Kernel driver k8temp Supported chips: + * AMD Athlon64/FX or Opteron CPUs + Prefix: 'k8temp' + Addresses scanned: PCI space + Datasheet: http://support.amd.com/us/Processor_TechDocs/32559.pdf Author: Rudolf Marek + Contact: Rudolf Marek Description @@ -27,10 +32,12 @@ implemented sensors. Mapping of /sys files is as follows: -temp1_input - temperature of Core 0 and "place" 0 -temp2_input - temperature of Core 0 and "place" 1 -temp3_input - temperature of Core 1 and "place" 0 -temp4_input - temperature of Core 1 and "place" 1 += === +temp1_input temperature of Core 0 and "place" 0 +temp2_input temperature of Core 0 and "place" 1 +temp3_input temperature of Core 1 and "place" 0 +temp4_input temperature of Core 1 and "place" 1 += === Temperatures are measured in degrees Celsius and measurement resolution is 1 degree C. It is expected that future CPU will have better resolution. The @@ -48,7 +55,7 @@ computed temperature called TControl, which must be lower than TControlMax. The relationship is following: -temp1_input - TjOffset*2 < TControlMax, + temp1_input - TjOffset*2 < TControlMax, TjOffset is not yet exported by the driver, TControlMax is usually 70 degrees C. The rule of the thumb -> CPU temperature should not cross diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793 index 6cc5f639b721..83bb40c48645 100644 --- a/Documentation/hwmon/w83793 +++ b/Documentation/hwmon/w83793 @@ -2,29 +2,34 @@ Kernel driver w83793 Supported chips: + * Winbond W83793G/W83793R + Prefix: 'w83793' + Addresses scanned: I2C 0x2c - 0x2f + Datasheet: Still not published Authors: -Yuan Mu (Winbond Electronics) -Rudolf Marek +- Yuan Mu (Winbond Electronics) +- Rudolf Marek Module parameters - * reset int - (default 0) - This parameter is not recommended, it will lose motherboard specific - settings. Use 'reset=1' to reset the chip when loading this module. +(default 0) + +This parameter is not recommended, it will lose motherboard specific +settings. Use 'reset=1' to reset the chip when loading this module. * force_subclients=bus,caddr,saddr1,saddr2 - This is used to force the i2c addresses for subclients of - a certain chip. Typical usage is `force_subclients=0,0x2f,0x4a,0x4b' - to force the subclients of chip 0x2f on bus 0 to i2c addresses - 0x4a and 0x4b. +This is used to force the i2c addresses for subclients of +a certain chip. Typical usage is `force_subclients=0,0x2f,0x4a,0x4b` +to force the subclients of chip 0x2f on bus 0 to i2c addresses +0x4a and 0x4b. Description @@ -33,70 +38,72 @@ Description This driver implements support for Winbond W83793G/W83793R chips. * Exported features - This driver exports 10 voltage sensors, up to 12 fan tachometer inputs, - 6 remote temperatures, up to 8 sets of PWM fan controls, SmartFan - (automatic fan speed control) on all temperature/PWM combinations, 2 - sets of 6-pin CPU VID input. +This driver exports 10 voltage sensors, up to 12 fan tachometer inputs, +6 remote temperatures, up to 8 sets of PWM fan controls, SmartFan +(automatic fan speed control) on all temperature/PWM combinations, 2 +sets of 6-pin CPU VID input. * Sensor resolutions - If your motherboard maker used the reference design, the resolution of - voltage0-2 is 2mV, resolution of voltage3/4/5 is 16mV, 8mV for voltage6, - 24mV for voltage7/8. Temp1-4 have a 0.25 degree Celsius resolution, - temp5-6 have a 1 degree Celsiis resolution. +If your motherboard maker used the reference design, the resolution of +voltage0-2 is 2mV, resolution of voltage3/4/5 is 16mV, 8mV for voltage6, +24mV for voltage7/8. Temp1-4 have a 0.25 degree Celsius resolution, +temp5-6 have a 1 degree Celsiis resolution. * Temperature sensor types - Temp1-4 have 2 possible types. It can be read from (and written to) - temp[1-4]_type. - - If the value is 3, it starts monitoring using a remote termal diode -(default). - - If the value is 6, it starts monitoring using the temperature sensor -in Intel CPU and get result by PECI. - Temp5-6 can be connected to external thermistors (value of - temp[5-6]_type is 4). +Temp1-4 have 2 possible types. It can be read from (and written to) +
[PATCH v2 08/21] docs: hwmon: w83791d: convert to ReST format
Convert w83791d to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/w83791d | 123 +--- 1 file changed, 71 insertions(+), 52 deletions(-) diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d index f4021a285460..a91f9e5fb0c6 100644 --- a/Documentation/hwmon/w83791d +++ b/Documentation/hwmon/w83791d @@ -2,9 +2,13 @@ Kernel driver w83791d = Supported chips: + * Winbond W83791D + Prefix: 'w83791d' + Addresses scanned: I2C 0x2c - 0x2f + Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf Author: Charles Spirakis @@ -12,39 +16,46 @@ Author: Charles Spirakis This driver was derived from the w83781d.c and w83792d.c source files. Credits: + w83781d.c: -Frodo Looijaard , -Philip Edelbrock , -and Mark Studebaker + +- Frodo Looijaard , +- Philip Edelbrock , +- Mark Studebaker + w83792d.c: -Shane Huang (Winbond), -Rudolf Marek + +- Shane Huang (Winbond), +- Rudolf Marek Additional contributors: -Sven Anders -Marc Hulsman + +- Sven Anders +- Marc Hulsman Module Parameters - * init boolean - (default 0) - Use 'init=1' to have the driver do extra software initializations. - The default behavior is to do the minimum initialization possible - and depend on the BIOS to properly setup the chip. If you know you - have a w83791d and you're having problems, try init=1 before trying - reset=1. +(default 0) + +Use 'init=1' to have the driver do extra software initializations. +The default behavior is to do the minimum initialization possible +and depend on the BIOS to properly setup the chip. If you know you +have a w83791d and you're having problems, try init=1 before trying +reset=1. * reset boolean - (default 0) - Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default - behavior is no chip reset to preserve BIOS settings. +(default 0) + +Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default +behavior is no chip reset to preserve BIOS settings. * force_subclients=bus,caddr,saddr,saddr - This is used to force the i2c addresses for subclients of - a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b' - to force the subclients of chip 0x2f on bus 0 to i2c addresses - 0x4a and 0x4b. +This is used to force the i2c addresses for subclients of +a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b` +to force the subclients of chip 0x2f on bus 0 to i2c addresses +0x4a and 0x4b. Description @@ -91,11 +102,11 @@ This file is used for both legacy and new code. The sysfs interface to the beep bitmask has migrated from the original legacy method of a single sysfs beep_mask file to a newer method using multiple -*_beep files as described in .../Documentation/hwmon/sysfs-interface. +`*_beep` files as described in `Documentation/hwmon/sysfs-interface`. A similar change has occurred for the bitmap corresponding to the alarms. The original legacy method used a single sysfs alarms file containing a bitmap -of triggered alarms. The newer method uses multiple sysfs *_alarm files +of triggered alarms. The newer method uses multiple sysfs `*_alarm` files (again following the pattern described in sysfs-interface). Since both methods read and write the underlying hardware, they can be used @@ -116,46 +127,54 @@ User mode code requesting values more often will receive cached values. The sysfs-interface is documented in the 'sysfs-interface' file. Only chip-specific options are documented here. -pwm[1-3]_enable - this file controls mode of fan/temperature control for +=== === +pwm[1-3]_enablethis file controls mode of fan/temperature control for fan 1-3. Fan/PWM 4-5 only support manual mode. - * 1 Manual mode - * 2 Thermal Cruise mode - * 3 Fan Speed Cruise mode (no further support) -temp[1-3]_target - defines the target temperature for Thermal Cruise mode. + * 1 Manual mode + * 2 Thermal Cruise mode + * 3 Fan Speed Cruise mode (no further support) + +temp[1-3]_target defines the target temperature for Thermal Cruise mode. Unit: millidegree Celsius RW -temp[1-3]_tolerance - temperature tolerance for Thermal Cruise mode. +temp[1-3]_tolerancetemperature tolerance for Thermal Cruise mode. Specifies an interval around the target temperature in which the fan speed is not changed. Unit: millidegree
[PATCH v2 09/21] docs: hwmon: coretemp: convert to ReST format
Convert coretemp to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/coretemp | 46 +++- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp index fec5a9bf755f..c609329e3bc4 100644 --- a/Documentation/hwmon/coretemp +++ b/Documentation/hwmon/coretemp @@ -3,20 +3,29 @@ Kernel driver coretemp Supported chips: * All Intel Core family + Prefix: 'coretemp' -CPUID: family 0x6, models 0xe (Pentium M DC), 0xf (Core 2 DC 65nm), - 0x16 (Core 2 SC 65nm), 0x17 (Penryn 45nm), - 0x1a (Nehalem), 0x1c (Atom), 0x1e (Lynnfield), - 0x26 (Tunnel Creek Atom), 0x27 (Medfield Atom), - 0x36 (Cedar Trail Atom) -Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual - Volume 3A: System Programming Guide - http://softwarecommunity.intel.com/Wiki/Mobility/720.htm + +CPUID: family 0x6, models + + - 0xe (Pentium M DC), 0xf (Core 2 DC 65nm), + - 0x16 (Core 2 SC 65nm), 0x17 (Penryn 45nm), + - 0x1a (Nehalem), 0x1c (Atom), 0x1e (Lynnfield), + - 0x26 (Tunnel Creek Atom), 0x27 (Medfield Atom), + - 0x36 (Cedar Trail Atom) + +Datasheet: + + Intel 64 and IA-32 Architectures Software Developer's Manual + Volume 3A: System Programming Guide + + http://softwarecommunity.intel.com/Wiki/Mobility/720.htm Author: Rudolf Marek Description --- + This driver permits reading the DTS (Digital Temperature Sensor) embedded inside Intel CPUs. This driver can read both the per-core and per-package temperature using the appropriate sensors. The per-package sensor is new; @@ -35,14 +44,17 @@ may be raised, if the temperature grows enough (more than TjMax) to trigger the Out-Of-Spec bit. Following table summarizes the exported sysfs files: All Sysfs entries are named with their core_id (represented here by 'X'). -tempX_input - Core temperature (in millidegrees Celsius). -tempX_max - All cooling devices should be turned on (on Core2). -tempX_crit - Maximum junction temperature (in millidegrees Celsius). -tempX_crit_alarm - Set when Out-of-spec bit is set, never clears. - Correct CPU operation is no longer guaranteed. -tempX_label - Contains string "Core X", where X is processor - number. For Package temp, this will be "Physical id Y", - where Y is the package number. + += +tempX_input Core temperature (in millidegrees Celsius). +tempX_maxAll cooling devices should be turned on (on Core2). +tempX_crit Maximum junction temperature (in millidegrees Celsius). +tempX_crit_alarm Set when Out-of-spec bit is set, never clears. + Correct CPU operation is no longer guaranteed. +tempX_label Contains string "Core X", where X is processor + number. For Package temp, this will be "Physical id Y", + where Y is the package number. += On CPU models which support it, TjMax is read from a model-specific register. On other models, it is set to an arbitrary value based on weak heuristics. @@ -52,6 +64,7 @@ as a module parameter (tjmax). Appendix A. Known TjMax lists (TBD): Some information comes from ark.intel.com +=== === ProcessProcessor TjMax(C) 22nm Core i5/i7 Processors @@ -179,3 +192,4 @@ Process Processor TjMax(C) 65nm Celeron Processors T1700/1600 100 560/550/540/530 100 +=== === -- 2.20.1
[PATCH v2 05/21] docs: hwmon: emc2103: convert to ReST format
Convert emc2103 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/emc2103 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/hwmon/emc2103 b/Documentation/hwmon/emc2103 index a12b2c127140..6a6ca6d1b34e 100644 --- a/Documentation/hwmon/emc2103 +++ b/Documentation/hwmon/emc2103 @@ -2,13 +2,17 @@ Kernel driver emc2103 == Supported chips: + * SMSC EMC2103 + Addresses scanned: I2C 0x2e + Prefix: 'emc2103' + Datasheet: Not public Authors: -Steve Glendinning + Steve Glendinning Description --- -- 2.20.1
[PATCH v2 04/21] docs: hwmon: sch5627: convert to ReST format
Convert sch5627 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/sch5627 | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627 index 0551d266c51c..187682e99114 100644 --- a/Documentation/hwmon/sch5627 +++ b/Documentation/hwmon/sch5627 @@ -2,9 +2,13 @@ Kernel driver sch5627 = Supported chips: + * SMSC SCH5627 + Prefix: 'sch5627' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Application Note available upon request Author: Hans de Goede -- 2.20.1
[PATCH v2 03/21] docs: hwmon: menf21bmc: convert to ReST format
Convert menf21bmc to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/menf21bmc | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/hwmon/menf21bmc b/Documentation/hwmon/menf21bmc index 2a273a065c5e..1f0c6b2235ab 100644 --- a/Documentation/hwmon/menf21bmc +++ b/Documentation/hwmon/menf21bmc @@ -2,8 +2,11 @@ Kernel driver menf21bmc_hwmon = Supported chips: + * MEN 14F021P00 + Prefix: 'menf21bmc_hwmon' + Adresses scanned: - Author: Andreas Werner @@ -34,6 +37,7 @@ Sysfs entries The following attributes are supported. All attributes are read only The Limits are read once by the driver. +=== == in0_input +3.3V input voltage in1_input +5.0V input voltage in2_input +12.0V input voltage @@ -48,3 +52,4 @@ in1_label "MON_5V" in2_label "MON_12V" in3_label "5V_STANDBY" in4_label "VBAT" +=== == -- 2.20.1
[PATCH v2 01/21] docs: hwmon: k10temp: convert to ReST format
Convert k10temp to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/k10temp | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp index 254d2f55345a..12a86ba17de9 100644 --- a/Documentation/hwmon/k10temp +++ b/Documentation/hwmon/k10temp @@ -2,42 +2,77 @@ Kernel driver k10temp = Supported chips: + * AMD Family 10h processors: + Socket F: Quad-Core/Six-Core/Embedded Opteron (but see below) + Socket AM2+: Quad-Core Opteron, Phenom (II) X3/X4, Athlon X2 (but see below) + Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II + Socket S1G3: Athlon II, Sempron, Turion II + * AMD Family 11h processors: + Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) + * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) + * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) + * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity", "Kaveri", "Carrizo" + * AMD Family 16h processors: "Kabini", "Mullins" Prefix: 'k10temp' + Addresses scanned: PCI space + Datasheets: + BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors: + http://support.amd.com/us/Processor_TechDocs/31116.pdf + BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors: + http://support.amd.com/us/Processor_TechDocs/41256.pdf + BIOS and Kernel Developer's Guide (BKDG) for AMD Family 12h Processors: + http://support.amd.com/us/Processor_TechDocs/41131.pdf + BIOS and Kernel Developer's Guide (BKDG) for AMD Family 14h Models 00h-0Fh Processors: + http://support.amd.com/us/Processor_TechDocs/43170.pdf + Revision Guide for AMD Family 10h Processors: + http://support.amd.com/us/Processor_TechDocs/41322.pdf + Revision Guide for AMD Family 11h Processors: + http://support.amd.com/us/Processor_TechDocs/41788.pdf + Revision Guide for AMD Family 12h Processors: + http://support.amd.com/us/Processor_TechDocs/44739.pdf + Revision Guide for AMD Family 14h Models 00h-0Fh Processors: + http://support.amd.com/us/Processor_TechDocs/47534.pdf + AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks: + http://support.amd.com/us/Processor_TechDocs/43373.pdf + AMD Family 10h Server and Workstation Processor Power and Thermal Data Sheet: + http://support.amd.com/us/Processor_TechDocs/43374.pdf + AMD Family 10h Desktop Processor Power and Thermal Data Sheet: + http://support.amd.com/us/Processor_TechDocs/43375.pdf Author: Clemens Ladisch @@ -60,7 +95,7 @@ are using an AM3 processor on an AM2+ mainboard, you can safely use the There is one temperature measurement value, available as temp1_input in sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree. -Please note that it is defined as a relative value; to quote the AMD manual: +Please note that it is defined as a relative value; to quote the AMD manual:: Tctl is the processor temperature control value, used by the platform to control cooling systems. Tctl is a non-physical temperature on an -- 2.20.1
[PATCH v2 13/21] docs: hwmon: ads1015: convert to ReST format
Convert ads1015 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/ads1015 | 72 ++--- 1 file changed, 43 insertions(+), 29 deletions(-) diff --git a/Documentation/hwmon/ads1015 b/Documentation/hwmon/ads1015 index 02d2a459385f..e0951c4e57bb 100644 --- a/Documentation/hwmon/ads1015 +++ b/Documentation/hwmon/ads1015 @@ -2,17 +2,25 @@ Kernel driver ads1015 = Supported chips: + * Texas Instruments ADS1015 + Prefix: 'ads1015' -Datasheet: Publicly available at the Texas Instruments website : - http://focus.ti.com/lit/ds/symlink/ads1015.pdf + +Datasheet: Publicly available at the Texas Instruments website: + + http://focus.ti.com/lit/ds/symlink/ads1015.pdf + * Texas Instruments ADS1115 + Prefix: 'ads1115' -Datasheet: Publicly available at the Texas Instruments website : - http://focus.ti.com/lit/ds/symlink/ads1115.pdf + +Datasheet: Publicly available at the Texas Instruments website: + + http://focus.ti.com/lit/ds/symlink/ads1115.pdf Authors: -Dirk Eibach, Guntermann & Drunck GmbH + Dirk Eibach, Guntermann & Drunck GmbH Description --- @@ -24,14 +32,15 @@ This device is a 12/16-bit A-D converter with 4 inputs. The inputs can be used single ended or in certain differential combinations. The inputs can be made available by 8 sysfs input files in0_input - in7_input: -in0: Voltage over AIN0 and AIN1. -in1: Voltage over AIN0 and AIN3. -in2: Voltage over AIN1 and AIN3. -in3: Voltage over AIN2 and AIN3. -in4: Voltage over AIN0 and GND. -in5: Voltage over AIN1 and GND. -in6: Voltage over AIN2 and GND. -in7: Voltage over AIN3 and GND. + + - in0: Voltage over AIN0 and AIN1. + - in1: Voltage over AIN0 and AIN3. + - in2: Voltage over AIN1 and AIN3. + - in3: Voltage over AIN2 and AIN3. + - in4: Voltage over AIN0 and GND. + - in5: Voltage over AIN1 and GND. + - in6: Voltage over AIN2 and GND. + - in7: Voltage over AIN3 and GND. Which inputs are available can be configured using platform data or devicetree. @@ -42,29 +51,34 @@ Platform Data In linux/platform_data/ads1015.h platform data is defined, channel_data contains configuration data for the used input combinations: + - pga is the programmable gain amplifier (values are full scale) - 0: +/- 6.144 V - 1: +/- 4.096 V - 2: +/- 2.048 V - 3: +/- 1.024 V - 4: +/- 0.512 V - 5: +/- 0.256 V + +- 0: +/- 6.144 V +- 1: +/- 4.096 V +- 2: +/- 2.048 V +- 3: +/- 1.024 V +- 4: +/- 0.512 V +- 5: +/- 0.256 V + - data_rate in samples per second - 0: 128 - 1: 250 - 2: 490 - 3: 920 - 4: 1600 - 5: 2400 - 6: 3300 -Example: -struct ads1015_platform_data data = { +- 0: 128 +- 1: 250 +- 2: 490 +- 3: 920 +- 4: 1600 +- 5: 2400 +- 6: 3300 + +Example:: + + struct ads1015_platform_data data = { .channel_data = { [2] = { .enabled = true, .pga = 1, .data_rate = 0 }, [4] = { .enabled = true, .pga = 4, .data_rate = 5 }, } -}; + }; In this case only in2_input (FS +/- 4.096 V, 128 SPS) and in4_input (FS +/- 0.512 V, 2400 SPS) would be created. -- 2.20.1
[PATCH v2 15/21] docs: hwmon: wm831x, wm8350: convert to ReST format
Convert wm831x and wm8350 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/wm831x | 9 ++--- Documentation/hwmon/wm8350 | 10 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Documentation/hwmon/wm831x b/Documentation/hwmon/wm831x index 11446757c8c8..c56fb35a2fb3 100644 --- a/Documentation/hwmon/wm831x +++ b/Documentation/hwmon/wm831x @@ -3,11 +3,14 @@ Kernel driver wm831x-hwmon Supported chips: * Wolfson Microelectronics WM831x PMICs + Prefix: 'wm831x' + Datasheet: - http://www.wolfsonmicro.com/products/WM8310 - http://www.wolfsonmicro.com/products/WM8311 - http://www.wolfsonmicro.com/products/WM8312 + + - http://www.wolfsonmicro.com/products/WM8310 + - http://www.wolfsonmicro.com/products/WM8311 + - http://www.wolfsonmicro.com/products/WM8312 Authors: Mark Brown diff --git a/Documentation/hwmon/wm8350 b/Documentation/hwmon/wm8350 index 98f923bd2e92..cec044ca5900 100644 --- a/Documentation/hwmon/wm8350 +++ b/Documentation/hwmon/wm8350 @@ -2,12 +2,16 @@ Kernel driver wm8350-hwmon == Supported chips: + * Wolfson Microelectronics WM835x PMICs + Prefix: 'wm8350' + Datasheet: - http://www.wolfsonmicro.com/products/WM8350 - http://www.wolfsonmicro.com/products/WM8351 - http://www.wolfsonmicro.com/products/WM8352 + + - http://www.wolfsonmicro.com/products/WM8350 + - http://www.wolfsonmicro.com/products/WM8351 + - http://www.wolfsonmicro.com/products/WM8352 Authors: Mark Brown -- 2.20.1
[PATCH v2 06/21] docs: hwmon: pc87360: convert to ReST format
Convert pc87360 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/pc87360 | 38 + 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/Documentation/hwmon/pc87360 b/Documentation/hwmon/pc87360 index d5f5cf16ce59..4bad07bce54b 100644 --- a/Documentation/hwmon/pc87360 +++ b/Documentation/hwmon/pc87360 @@ -2,14 +2,19 @@ Kernel driver pc87360 = Supported chips: + * National Semiconductor PC87360, PC87363, PC87364, PC87365 and PC87366 + Prefixes: 'pc87360', 'pc87363', 'pc87364', 'pc87365', 'pc87366' + Addresses scanned: none, address read from Super I/O config space + Datasheets: No longer available Authors: Jean Delvare Thanks to Sandeep Mehta, Tonko de Rooy and Daniel Ceregatti for testing. + Thanks to Rudolf Marek for helping me investigate conversion issues. @@ -17,11 +22,13 @@ Module Parameters - * init int - Chip initialization level: - 0: None - *1: Forcibly enable internal voltage and temperature channels, except in9 - 2: Forcibly enable all voltage and temperature channels, except in9 - 3: Forcibly enable all voltage and temperature channels, including in9 +Chip initialization level: + +- 0: None +- **1**: Forcibly enable internal voltage and temperature channels, + except in9 +- 2: Forcibly enable all voltage and temperature channels, except in9 +- 3: Forcibly enable all voltage and temperature channels, including in9 Note that this parameter has no effect for the PC87360, PC87363 and PC87364 chips. @@ -43,13 +50,15 @@ hardware monitoring chipsets, not only controlling and monitoring three fans, but also monitoring eleven voltage inputs and two (PC87365) or up to four (PC87366) temperatures. + === === === === === = Chip#vin#fan#pwm#temp devid - + === === === === === = PC87360 - 2 2 - 0xE1 PC87363 - 2 2 - 0xE8 PC87364 - 3 3 - 0xE4 PC87365 11 3 3 2 0xE5 PC87366 11 3 3 3-4 0xE9 + === === === === === = The driver assumes that no more than one chip is present, and one of the standard Super I/O addresses is used (0x2E/0x2F or 0x4E/0x4F) @@ -68,18 +77,23 @@ have to care no more. For reference, here are a few values about clock dividers: -slowest accuracyhighest -measurable around 3000 accurate +=== === === === + slowest accuracyhighest + measurable around 3000 accurate divider speed (RPM) RPM (RPM) speed (RPM) - 11882 18 6928 - 2 941 37 4898 - 4 470 74 3464 - 8 235 150 2449 +=== === === === +11882 18 6928 +2 941 37 4898 +4 470 74 3464 +8 235 150 2449 +=== === === === For the curious, here is how the values above were computed: + * slowest measurable speed: clock/(255*divider) * accuracy around 3000 RPM: 3000^2/clock * highest accurate speed: sqrt(clock*100) + The clock speed for the PC87360 family is 480 kHz. I arbitrarily chose 100 RPM as the lowest acceptable accuracy. -- 2.20.1
[PATCH v2 18/21] docs: hwmon: pmbus files: convert to ReST format
Convert pmbus files to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/adm1275| 26 Documentation/hwmon/ibm-cffps | 3 + Documentation/hwmon/ir35221| 12 +- Documentation/hwmon/lm25066| 30 Documentation/hwmon/ltc2978| 267 + Documentation/hwmon/ltc3815| 12 +- Documentation/hwmon/max16064 | 15 +- Documentation/hwmon/max20751 | 7 + Documentation/hwmon/max31785 | 6 + Documentation/hwmon/max34440 | 88 +-- Documentation/hwmon/max8688| 18 ++- Documentation/hwmon/pmbus | 90 +++ Documentation/hwmon/pmbus-core | 173 - Documentation/hwmon/tps40422 | 23 ++- Documentation/hwmon/ucd9000| 31 ++-- Documentation/hwmon/ucd9200| 42 -- Documentation/hwmon/zl6100 | 69 - 17 files changed, 685 insertions(+), 227 deletions(-) diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275 index 5e277b0d91ce..5c5860011d6e 100644 --- a/Documentation/hwmon/adm1275 +++ b/Documentation/hwmon/adm1275 @@ -2,29 +2,53 @@ Kernel driver adm1275 = Supported chips: + * Analog Devices ADM1075 + Prefix: 'adm1075' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1075.pdf + * Analog Devices ADM1272 + Prefix: 'adm1272' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1272.pdf + * Analog Devices ADM1275 + Prefix: 'adm1275' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1275.pdf + * Analog Devices ADM1276 + Prefix: 'adm1276' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf + * Analog Devices ADM1278 + Prefix: 'adm1278' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1278.pdf + * Analog Devices ADM1293/ADM1294 + Prefix: 'adm1293', 'adm1294' + Addresses scanned: - + Datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/ADM1293_1294.pdf Author: Guenter Roeck @@ -75,6 +99,7 @@ Sysfs entries The following attributes are supported. Limits are read-write, history reset attributes are write-only, all other attributes are read-only. +=== === inX_label "vin1" or "vout1" depending on chip variant and configuration. On ADM1075, ADM1293, and ADM1294, vout1 reports the voltage on the VAUX pin. @@ -120,3 +145,4 @@ temp1_reset_history Write any value to reset history. Temperature attributes are supported on ADM1272 and ADM1278. +=== === diff --git a/Documentation/hwmon/ibm-cffps b/Documentation/hwmon/ibm-cffps index e05ecd8ecfcf..52e74e39463a 100644 --- a/Documentation/hwmon/ibm-cffps +++ b/Documentation/hwmon/ibm-cffps @@ -2,6 +2,7 @@ Kernel driver ibm-cffps === Supported chips: + * IBM Common Form Factor power supply Author: Eddie James @@ -24,6 +25,7 @@ Sysfs entries The following attributes are supported: +=== == curr1_alarmOutput current over-current alarm. curr1_inputMeasured output current in mA. curr1_label"iout1" @@ -52,3 +54,4 @@ temp2_alarm Secondary rectifier temp over-temperature alarm. temp2_inputMeasured secondary rectifier temp in millidegrees C. temp3_alarmORing FET temperature over-temperature alarm. temp3_inputMeasured ORing FET temperature in millidegrees C. +=== == diff --git a/Documentation/hwmon/ir35221 b/Documentation/hwmon/ir35221 index f7e112752c04..4e757a766177 100644 --- a/Documentation/hwmon/ir35221 +++ b/Documentation/hwmon/ir35221 @@ -2,9 +2,13 @@ Kernel driver ir35221 = Supported chips: + * Infinion IR35221 + Prefix: 'ir35221' + Addresses scanned: - + Datasheet: Datasheet is not publicly available. Author: Samuel Mendoza-Jonas @@ -23,15 +27,16 @@ This driver does not probe for PMBus devices. You will have to instantiate devices explicitly. Example: the following commands will load the driver for an IR35221 -at address 0x70 on I2C bus #4: +at address 0x70 on I2C bus #4:: -# modprobe ir35221 -# echo ir35221 0x70 > /sys/bus/i2c/devices/i2c-4/new_device + # modprobe ir35221 + # echo ir35221 0x70 > /sys/bus/i2c/devices/i2c-4/new_device Sysfs attributes +===
[PATCH v2 16/21] docs: hwmon: da9052, da9055: convert to ReST format
Convert da9052 and da9055 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/da9052 | 40 ++ Documentation/hwmon/da9055 | 20 ++- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052 index 5bc51346b689..556e2778b9e5 100644 --- a/Documentation/hwmon/da9052 +++ b/Documentation/hwmon/da9052 @@ -1,6 +1,12 @@ +Kernel driver da9052 + + Supported chips: + * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs + Prefix: 'da9052' + Datasheet: Datasheet is not publicly available. Authors: David Dajun Chen @@ -15,17 +21,20 @@ different inputs. The track and hold circuit ensures stable input voltages at the input of the ADC during the conversion. The ADC is used to measure the following inputs: -Channel 0: VDDOUT - measurement of the system voltage -Channel 1: ICH - internal battery charger current measurement -Channel 2: TBAT - output from the battery NTC -Channel 3: VBAT - measurement of the battery voltage -Channel 4: ADC_IN4 - high impedance input (0 - 2.5V) -Channel 5: ADC_IN5 - high impedance input (0 - 2.5V) -Channel 6: ADC_IN6 - high impedance input (0 - 2.5V) -Channel 7: XY - TSI interface to measure the X and Y voltage of the touch - screen resistive potentiometers -Channel 8: Internal Tjunc. - sense (internal temp. sensor) -Channel 9: VBBAT - measurement of the backup battery voltage + += === +Channel 0 VDDOUT - measurement of the system voltage +Channel 1 ICH - internal battery charger current measurement +Channel 2 TBAT - output from the battery NTC +Channel 3 VBAT - measurement of the battery voltage +Channel 4 ADC_IN4 - high impedance input (0 - 2.5V) +Channel 5 ADC_IN5 - high impedance input (0 - 2.5V) +Channel 6 ADC_IN6 - high impedance input (0 - 2.5V) +Channel 7 XY - TSI interface to measure the X and Y voltage of the touch + screen resistive potentiometers +Channel 8 Internal Tjunc. - sense (internal temp. sensor) +Channel 9 VBBAT - measurement of the backup battery voltage += === By using sysfs attributes we can measure the system voltage VDDOUT, the battery charging current ICH, battery temperature TBAT, battery junction temperature @@ -37,12 +46,15 @@ Voltage Monitoring Voltages are sampled by a 10 bit ADC. The battery voltage is calculated as: + Milli volt = ((ADC value * 1000) / 512) + 2500 The backup battery voltage is calculated as: + Milli volt = (ADC value * 2500) / 512; The voltages on ADC channels 4, 5 and 6 are calculated as: + Milli volt = (ADC value * 2500) / 1023 Temperature Monitoring @@ -52,10 +64,14 @@ Temperatures are sampled by a 10 bit ADC. Junction and battery temperatures are monitored by the ADC channels. The junction temperature is calculated: + Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8 + The junction temperature attribute is supported by the driver. The battery temperature is calculated: - Degree Celsius = 1 / (t1 + 1/298)- 273 + + Degree Celsius = 1 / (t1 + 1/298) - 273 + where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255)) Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively. diff --git a/Documentation/hwmon/da9055 b/Documentation/hwmon/da9055 index 855c3f536e00..beae271a3312 100644 --- a/Documentation/hwmon/da9055 +++ b/Documentation/hwmon/da9055 @@ -1,6 +1,11 @@ +Kernel driver da9055 + + Supported chips: * Dialog Semiconductors DA9055 PMIC + Prefix: 'da9055' + Datasheet: Datasheet is not publicly available. Authors: David Dajun Chen @@ -15,11 +20,12 @@ different inputs. The track and hold circuit ensures stable input voltages at the input of the ADC during the conversion. The ADC is used to measure the following inputs: -Channel 0: VDDOUT - measurement of the system voltage -Channel 1: ADC_IN1 - high impedance input (0 - 2.5V) -Channel 2: ADC_IN2 - high impedance input (0 - 2.5V) -Channel 3: ADC_IN3 - high impedance input (0 - 2.5V) -Channel 4: Internal Tjunc. - sense (internal temp. sensor) + +- Channel 0: VDDOUT - measurement of the system voltage +- Channel 1: ADC_IN1 - high impedance input (0 - 2.5V) +- Channel 2: ADC_IN2 - high impedance input (0 - 2.5V) +- Channel 3: ADC_IN3 - high impedance input (0 - 2.5V) +- Channel 4: Internal Tjunc. - sense (internal temp. sensor) By using sysfs attributes we can measure the system voltage VDDOUT, chip junction temperature and auxiliary channels voltages. @@ -31,9 +37,11 @@ Voltages are sampled in a AUTO mode it can be manually sampled too and results are stored in a 10 bit ADC. The system voltage is calculated as: + Milli volt = ((ADC value * 1000) / 85) + 2500
[PATCH v2 12/21] docs: hwmon: asc7621: convert to ReST format
Convert asc7621 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/asc7621 | 146 ++-- 1 file changed, 88 insertions(+), 58 deletions(-) diff --git a/Documentation/hwmon/asc7621 b/Documentation/hwmon/asc7621 index 7287be7e1f21..b5a9fad0f172 100644 --- a/Documentation/hwmon/asc7621 +++ b/Documentation/hwmon/asc7621 @@ -1,10 +1,15 @@ += Kernel driver asc7621 -== += Supported chips: + Andigilog aSC7621 and aSC7621a + Prefix: 'asc7621' + Addresses scanned: I2C 0x2c, 0x2d, 0x2e + Datasheet: http://www.fairview5.com/linux/asc7621/asc7621.pdf Author: @@ -73,8 +78,10 @@ Finally, we have added a tach disable function that turns off the tach measurement system for individual tachs in order to save power. That is in register 75h. --- +-- + aSC7621 Product Description +=== The aSC7621 has a two wire digital interface compatible with SMBus 2.0. Using a 10-bit ADC, the aSC7621 measures the temperature of two remote diode @@ -102,6 +109,8 @@ System voltages of VCCP, 2.5V, 3.3V, 5.0V, and 12V motherboard power are monitored efficiently with internal scaling resistors. Features + + - Supports PECI interface and monitors internal and remote thermal diodes - 2-wire, SMBus 2.0 compliant, serial interface - 10-bit ADC @@ -110,7 +119,7 @@ Features - Noise filtering of temperature reading for fan speed control - 0.25C digital temperature sensor resolution - 3 PWM fan speed control outputs for 2-, 3- or 4-wire fans and up to 4 fan - tachometer inputs + tachometer inputs - Enhanced measured temperature to Temperature Zone assignment. - Provides high and low PWM frequency ranges - 3 GPIO pins for custom use @@ -123,17 +132,20 @@ Except where noted below, the sysfs entries created by this driver follow the standards defined in "sysfs-interface". temp1_source + = === 0 (default) peci_legacy = 0, Remote 1 Temperature - peci_legacy = 1, PECI Processor Temperature 0 + peci_legacy = 1, PECI Processor Temperature 0 1 Remote 1 Temperature 2 Remote 2 Temperature 3 Internal Temperature 4 PECI Processor Temperature 0 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 - 7 PECI Processor Temperature 3 + 7 PECI Processor Temperature 3 + = === temp2_source + = === 0 (default) Internal Temperature 1 Remote 1 Temperature 2 Remote 2 Temperature @@ -142,8 +154,10 @@ temp2_source 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 7 PECI Processor Temperature 3 + = === temp3_source + = === 0 (default) Remote 2 Temperature 1 Remote 1 Temperature 2 Remote 2 Temperature @@ -152,10 +166,12 @@ temp3_source 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 7 PECI Processor Temperature 3 + = === temp4_source + = === 0 (default) peci_legacy = 0, PECI Processor Temperature 0 - peci_legacy = 1, Remote 1 Temperature + peci_legacy = 1, Remote 1 Temperature 1 Remote 1 Temperature 2 Remote 2 Temperature 3 Internal Temperature @@ -163,58 +179,65 @@ temp4_source 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 7 PECI Processor Temperature 3 + = === -temp[1-4]_smoothing_enable -temp[1-4]_smoothing_time +temp[1-4]_smoothing_enable / temp[1-4]_smoothing_time Smooths spikes in temp readings caused by noise. Valid values in milliseconds are: - 35000 - 17600 - 11800 -7000 -4400 -3000 -1600 - 800 + + * 35000 + * 17600 + * 11800 + * 7000 + * 4400 + * 3000 + * 1600 + * 800 temp[1-4]_crit When the corresponding zone temperature reaches this value, ALL pwm outputs will got to 100%. -temp[5-8]_input -temp[5-8]_enable +temp[5-8]_input / temp[5-8]_enable The aSC7621 can also read temperatures provided by the processor via the PECI bus. Usually these
[PATCH v2 02/21] docs: hwmon: vexpress: convert to ReST format
Convert vexpress to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/vexpress | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/hwmon/vexpress b/Documentation/hwmon/vexpress index 557d6d5ad90d..8c861c8151ac 100644 --- a/Documentation/hwmon/vexpress +++ b/Documentation/hwmon/vexpress @@ -2,14 +2,21 @@ Kernel driver vexpress == Supported systems: + * ARM Ltd. Versatile Express platform + Prefix: 'vexpress' + Datasheets: + * "Hardware Description" sections of the Technical Reference Manuals -for the Versatile Express boards: - http://infocenter.arm.com/help/topic/com.arm.doc.subset.boards.express/index.html + for the Versatile Express boards: + + - http://infocenter.arm.com/help/topic/com.arm.doc.subset.boards.express/index.html + * Section "4.4.14. System Configuration registers" of the V2M-P1 TRM: - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0447-/index.html + + - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0447-/index.html Author: Pawel Moll -- 2.20.1
[PATCH v2 14/21] docs: hwmon: dme1737, vt1211: convert to ReST format
Convert dme1737 and vt1211 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/dme1737 | 88 ++--- Documentation/hwmon/vt1211 | 84 +-- 2 files changed, 114 insertions(+), 58 deletions(-) diff --git a/Documentation/hwmon/dme1737 b/Documentation/hwmon/dme1737 index 4d2935145a1c..82fcbc6b2b43 100644 --- a/Documentation/hwmon/dme1737 +++ b/Documentation/hwmon/dme1737 @@ -2,21 +2,37 @@ Kernel driver dme1737 = Supported chips: + * SMSC DME1737 and compatibles (like Asus A8000) + Prefix: 'dme1737' + Addresses scanned: I2C 0x2c, 0x2d, 0x2e + Datasheet: Provided by SMSC upon request and under NDA + * SMSC SCH3112, SCH3114, SCH3116 + Prefix: 'sch311x' + Addresses scanned: none, address read from Super-I/O config space + Datasheet: Available on the Internet + * SMSC SCH5027 + Prefix: 'sch5027' + Addresses scanned: I2C 0x2c, 0x2d, 0x2e + Datasheet: Provided by SMSC upon request and under NDA + * SMSC SCH5127 + Prefix: 'sch5127' + Addresses scanned: none, address read from Super-I/O config space + Datasheet: Provided by SMSC upon request and under NDA Authors: @@ -26,11 +42,14 @@ Authors: Module Parameters - -* force_start: boolEnables the monitoring of voltage, fan and temp inputs +* force_start: bool + Enables the monitoring of voltage, fan and temp inputs and PWM output control functions. Using this parameter shouldn't be required since the BIOS usually takes care of this. -* probe_all_addr: bool Include non-standard LPC addresses 0x162e and 0x164e + +* probe_all_addr: bool + Include non-standard LPC addresses 0x162e and 0x164e when probing for ISA devices. This is required for the following boards: - VIA EPIA SN18000 @@ -70,7 +89,8 @@ scaling resistors. The values returned by the driver therefore reflect true millivolts and don't need scaling. The voltage inputs are mapped as follows (the last column indicates the input ranges): -DME1737, A8000: +DME1737, A8000:: + in0: +5VTR (+5V standby) 0V - 6.64V in1: Vccp (processor core)0V - 3V in2: VCC(internal +3.3V)0V - 4.38V @@ -79,7 +99,8 @@ DME1737, A8000: in5: VTR(+3.3V standby) 0V - 4.38V in6: Vbat (+3.0V) 0V - 4.38V -SCH311x: +SCH311x:: + in0: +2.5V 0V - 3.32V in1: Vccp (processor core)0V - 2V in2: VCC(internal +3.3V)0V - 4.38V @@ -88,7 +109,8 @@ SCH311x: in5: VTR(+3.3V standby) 0V - 4.38V in6: Vbat (+3.0V) 0V - 4.38V -SCH5027: +SCH5027:: + in0: +5VTR (+5V standby) 0V - 6.64V in1: Vccp (processor core)0V - 3V in2: VCC(internal +3.3V)0V - 4.38V @@ -97,7 +119,8 @@ SCH5027: in5: VTR(+3.3V standby) 0V - 4.38V in6: Vbat (+3.0V) 0V - 4.38V -SCH5127: +SCH5127:: + in0: +2.5 0V - 3.32V in1: Vccp (processor core)0V - 3V in2: VCC(internal +3.3V)0V - 4.38V @@ -119,7 +142,7 @@ Celsius. The chip also features offsets for all 3 temperature inputs which - when programmed - get added to the input readings. The chip does all the scaling by itself and the driver therefore reports true temperatures that don't need any user-space adjustments. The temperature inputs are mapped as follows -(the last column indicates the input ranges): +(the last column indicates the input ranges):: temp1: Remote diode 1 (3904 type) temperature -127C - +127C temp2: DME1737 internal temperature -127C - +127C @@ -171,6 +194,7 @@ pwm[1-3]_auto_pwm_min, respectively. The thermal thresholds of the zones are programmed via zone[1-3]_auto_point[1-3]_temp and zone[1-3]_auto_point1_temp_hyst: + === === pwm[1-3]_auto_point2_pwmfull-speed duty-cycle (255, i.e., 100%) pwm[1-3]_auto_point1_pwmlow-speed duty-cycle pwm[1-3]_auto_pwm_min min-speed duty-cycle @@ -179,6 +203,7 @@ zone[1-3]_auto_point1_temp_hyst: zone[1-3]_auto_point2_temp full-speed temp zone[1-3]_auto_point1_temp low-speed temp zone[1-3]_auto_point1_temp_hyst min-speed temp + === === The chip adjusts the output duty-cycle linearly in the range of auto_point1_pwm to
[PATCH v2 10/21] docs: hwmon: aspeed-pwm-tacho: convert to ReST format
Convert aspeed-pwm-tacho to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/aspeed-pwm-tacho | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/hwmon/aspeed-pwm-tacho b/Documentation/hwmon/aspeed-pwm-tacho index 7cfb34977460..6dcec845fbc7 100644 --- a/Documentation/hwmon/aspeed-pwm-tacho +++ b/Documentation/hwmon/aspeed-pwm-tacho @@ -15,8 +15,10 @@ controller supports up to 16 tachometer inputs. The driver provides the following sensor accesses in sysfs: +=== === = fanX_input ro provide current fan rotation value in RPM as reported by the fan to the device. pwmX rw get or set PWM fan control value. This is an integer value between 0(off) and 255(full speed). +=== === = -- 2.20.1
[PATCH v2 19/21] docs: hwmon: misc files: convert to ReST format
Convert other files maintained by Guenter to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/ina209 | 18 -- Documentation/hwmon/ina2xx | 39 +--- Documentation/hwmon/jc42 | 55 - Documentation/hwmon/lm95234 | 11 +++- Documentation/hwmon/ltc4261 | 16 +++-- Documentation/hwmon/max16065 | 24 +++- Documentation/hwmon/max6697 | 33 ++ Documentation/hwmon/nct6775 | 114 --- Documentation/hwmon/smm665 | 42 +++-- Documentation/hwmon/tmp401 | 30 - 10 files changed, 328 insertions(+), 54 deletions(-) diff --git a/Documentation/hwmon/ina209 b/Documentation/hwmon/ina209 index 672501de4509..64322075a145 100644 --- a/Documentation/hwmon/ina209 +++ b/Documentation/hwmon/ina209 @@ -1,16 +1,21 @@ Kernel driver ina209 -= + Supported chips: + * Burr-Brown / Texas Instruments INA209 + Prefix: 'ina209' + Addresses scanned: - + Datasheet: -http://www.ti.com/lit/gpn/ina209 + http://www.ti.com/lit/gpn/ina209 -Author: Paul Hays -Author: Ira W. Snyder -Author: Guenter Roeck +Author: + - Paul Hays + - Ira W. Snyder + - Guenter Roeck Description @@ -31,7 +36,7 @@ the I2C bus. See the datasheet for details. This tries to expose most monitoring features of the hardware via sysfs. It does not support every feature of this chip. - +=== === in0_input shunt voltage (mV) in0_input_highest shunt voltage historical maximum reading (mV) in0_input_lowest shunt voltage historical minimum reading (mV) @@ -70,6 +75,7 @@ curr1_input current measurement (mA) update_intervaldata conversion time; affects number of samples used to average results for shunt and bus voltages. +=== === General Remarks --- diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx index 0f36c021192d..95badf9c396f 100644 --- a/Documentation/hwmon/ina2xx +++ b/Documentation/hwmon/ina2xx @@ -2,35 +2,56 @@ Kernel driver ina2xx Supported chips: + * Texas Instruments INA219 + + Prefix: 'ina219' Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA220 + Prefix: 'ina220' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA226 + Prefix: 'ina226' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA230 + Prefix: 'ina230' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA231 + Prefix: 'ina231' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ Author: Lothar Felten @@ -64,16 +85,20 @@ lower limit of the update_interval is 2 ms, the upper limit is 2253 ms. The actual programmed interval may vary from the desired value. General sysfs entries -- +- +=== === in0_input Shunt voltage(mV) channel in1_input Bus voltage(mV) channel curr1_inputCurrent(mA) measurement channel power1_input Power(uW) measurement channel shunt_resistor Shunt resistance(uOhm) channel +=== === Sysfs entries for ina226, ina230 and ina231 only -- + +=== update_intervaldata conversion time; affects number of samples used to average results for shunt and bus voltages. +=== diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42 index b4b671f22453..5b14b49bb6f7 100644 --- a/Documentation/hwmon/jc42 +++ b/Documentation/hwmon/jc42 @@ -2,53 +2,100 @@ Kernel driver jc42 == Supported chips: + * Analog Devices ADT7408 + Datasheets: + http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf + * Atmel AT30TS00,
[PATCH v2 21/21] docs: hwmon: Add an index file and rename docs to *.rst
Now that all files were converted to ReST format, rename them and add an index. Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/hwmon/g762.txt| 2 +- Documentation/hwmon/{ab8500 => ab8500.rst}| 2 +- ...guru-datasheet => abituguru-datasheet.rst} | 0 .../hwmon/{abituguru => abituguru.rst}| 0 .../hwmon/{abituguru3 => abituguru3.rst} | 0 Documentation/hwmon/{abx500 => abx500.rst}| 0 ...{acpi_power_meter => acpi_power_meter.rst} | 2 +- Documentation/hwmon/{ad7314 => ad7314.rst}| 0 .../hwmon/{adc128d818 => adc128d818.rst} | 0 Documentation/hwmon/{adm1021 => adm1021.rst} | 0 Documentation/hwmon/{adm1025 => adm1025.rst} | 0 Documentation/hwmon/{adm1026 => adm1026.rst} | 0 Documentation/hwmon/{adm1031 => adm1031.rst} | 0 Documentation/hwmon/{adm1275 => adm1275.rst} | 4 +- Documentation/hwmon/{adm9240 => adm9240.rst} | 0 Documentation/hwmon/{ads1015 => ads1015.rst} | 0 Documentation/hwmon/{ads7828 => ads7828.rst} | 0 Documentation/hwmon/{adt7410 => adt7410.rst} | 0 Documentation/hwmon/{adt7411 => adt7411.rst} | 0 Documentation/hwmon/{adt7462 => adt7462.rst} | 0 Documentation/hwmon/{adt7470 => adt7470.rst} | 0 Documentation/hwmon/{adt7475 => adt7475.rst} | 0 Documentation/hwmon/{amc6821 => amc6821.rst} | 0 Documentation/hwmon/{asb100 => asb100.rst}| 0 Documentation/hwmon/{asc7621 => asc7621.rst} | 0 ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} | 0 .../hwmon/{coretemp => coretemp.rst} | 0 Documentation/hwmon/{da9052 => da9052.rst}| 0 Documentation/hwmon/{da9055 => da9055.rst}| 0 Documentation/hwmon/{dme1737 => dme1737.rst} | 0 Documentation/hwmon/{ds1621 => ds1621.rst}| 0 Documentation/hwmon/{ds620 => ds620.rst} | 0 Documentation/hwmon/{emc1403 => emc1403.rst} | 0 Documentation/hwmon/{emc2103 => emc2103.rst} | 0 .../hwmon/{emc6w201 => emc6w201.rst} | 0 Documentation/hwmon/{f71805f => f71805f.rst} | 0 .../hwmon/{f71882fg => f71882fg.rst} | 0 .../hwmon/{fam15h_power => fam15h_power.rst} | 0 .../hwmon/{ftsteutates => ftsteutates.rst}| 0 Documentation/hwmon/{g760a => g760a.rst} | 0 Documentation/hwmon/{g762 => g762.rst}| 2 +- Documentation/hwmon/{gl518sm => gl518sm.rst} | 0 Documentation/hwmon/{hih6130 => hih6130.rst} | 0 ...on-kernel-api.txt => hwmon-kernel-api.rst} | 4 +- .../hwmon/{ibm-cffps => ibm-cffps.rst}| 0 Documentation/hwmon/{ibmaem => ibmaem.rst}| 0 .../hwmon/{ibmpowernv => ibmpowernv.rst} | 0 Documentation/hwmon/{ina209 => ina209.rst}| 0 Documentation/hwmon/{ina2xx => ina2xx.rst}| 2 +- Documentation/hwmon/{ina3221 => ina3221.rst} | 0 Documentation/hwmon/index.rst | 179 ++ Documentation/hwmon/{ir35221 => ir35221.rst} | 0 Documentation/hwmon/{it87 => it87.rst}| 0 Documentation/hwmon/{jc42 => jc42.rst}| 0 Documentation/hwmon/{k10temp => k10temp.rst} | 0 Documentation/hwmon/{k8temp => k8temp.rst}| 0 .../hwmon/{lineage-pem => lineage-pem.rst}| 0 Documentation/hwmon/{lm25066 => lm25066.rst} | 2 +- Documentation/hwmon/{lm63 => lm63.rst}| 0 Documentation/hwmon/{lm70 => lm70.rst}| 0 Documentation/hwmon/{lm73 => lm73.rst}| 0 Documentation/hwmon/{lm75 => lm75.rst}| 0 Documentation/hwmon/{lm77 => lm77.rst}| 0 Documentation/hwmon/{lm78 => lm78.rst}| 0 Documentation/hwmon/{lm80 => lm80.rst}| 0 Documentation/hwmon/{lm83 => lm83.rst}| 0 Documentation/hwmon/{lm85 => lm85.rst}| 0 Documentation/hwmon/{lm87 => lm87.rst}| 0 Documentation/hwmon/{lm90 => lm90.rst}| 0 Documentation/hwmon/{lm92 => lm92.rst}| 0 Documentation/hwmon/{lm93 => lm93.rst}| 0 Documentation/hwmon/{lm95234 => lm95234.rst} | 0 Documentation/hwmon/{lm95245 => lm95245.rst} | 0 Documentation/hwmon/{ltc2945 => ltc2945.rst} | 0 Documentation/hwmon/{ltc2978 => ltc2978.rst} | 0 Documentation/hwmon/{ltc2990 => ltc2990.rst} | 0 Documentation/hwmon/{ltc3815 => ltc3815.rst} | 0 Documentation/hwmon/{ltc4151 => ltc4151.rst} | 0 Documentation/hwmon/{ltc4215 => ltc4215.rst} | 0 Documentation/hwmon/{ltc4245 => ltc4245.rst} | 0 Documentation/hwmon/{ltc4260 => ltc4260.rst} | 0 Documentation/hwmon/{ltc4261 => ltc4261.rst} | 0 .../hwmon/{max16064 => max16064.rst} | 2 +- .../hwmon/{max16065 => max16065.rst} | 0 Documentation/hwmon/{max1619 => max1619.rst} | 0 Documentation/hwmon/{max1668 => max1668.rst} | 0 Documentation/hwmon/{max197 => max197.rst}| 0 .../hwmon/{max20751 => max20751.rst} | 2 +- .../hwmon/{max31722 => max31722.rst} | 0 .../hwmon/{max31785 => max31785.rst} | 0 .../hwmon/{max31790 => max31790.rst} | 0
[PATCH v2 00/21] Convert hwmon documentation to ReST
This series converts the contents of Documentation/hwmon to ReST format. PS.: I opted to group the conversion files per groups of maintainer set, as, if I were to generate one patch per file, it would give around 160 patches. I also added those patches to my development tree at: https://git.linuxtv.org/mchehab/experimental.git/log/?h=hwmon If you want to see the results, they're at: https://www.infradead.org/~mchehab/hwmon/ Version 2: - Fixed broken SOB lines; - changed submitting-patches.rst to mention that drivers should be documented as Documentation/hwmon/.rst, as suggested by Jonathan Neusch�fer. Mauro Carvalho Chehab (21): docs: hwmon: k10temp: convert to ReST format docs: hwmon: vexpress: convert to ReST format docs: hwmon: menf21bmc: convert to ReST format docs: hwmon: sch5627: convert to ReST format docs: hwmon: emc2103: convert to ReST format docs: hwmon: pc87360: convert to ReST format docs: hwmon: fam15h_power: convert to ReST format docs: hwmon: w83791d: convert to ReST format docs: hwmon: coretemp: convert to ReST format docs: hwmon: aspeed-pwm-tacho: convert to ReST format docs: hwmon: ibmpowernv: convert to ReST format docs: hwmon: asc7621: convert to ReST format docs: hwmon: ads1015: convert to ReST format docs: hwmon: dme1737, vt1211: convert to ReST format docs: hwmon: wm831x, wm8350: convert to ReST format docs: hwmon: da9052, da9055: convert to ReST format docs: hwmon: k8temp, w83793: convert to ReST format docs: hwmon: pmbus files: convert to ReST format docs: hwmon: misc files: convert to ReST format docs: hwmon: convert remaining files to ReST format docs: hwmon: Add an index file and rename docs to *.rst .../devicetree/bindings/hwmon/g762.txt| 2 +- Documentation/hwmon/{ab8500 => ab8500.rst}| 10 +- Documentation/hwmon/abituguru | 92 --- ...guru-datasheet => abituguru-datasheet.rst} | 160 ++-- Documentation/hwmon/abituguru.rst | 113 +++ .../hwmon/{abituguru3 => abituguru3.rst} | 36 +- Documentation/hwmon/{abx500 => abx500.rst}| 8 +- ...{acpi_power_meter => acpi_power_meter.rst} | 25 +- Documentation/hwmon/{ad7314 => ad7314.rst}| 9 + .../hwmon/{adc128d818 => adc128d818.rst} | 7 +- Documentation/hwmon/{adm1021 => adm1021.rst} | 44 +- Documentation/hwmon/{adm1025 => adm1025.rst} | 13 +- Documentation/hwmon/{adm1026 => adm1026.rst} | 24 +- Documentation/hwmon/{adm1031 => adm1031.rst} | 16 +- Documentation/hwmon/{adm1275 => adm1275.rst} | 30 +- Documentation/hwmon/{adm9240 => adm9240.rst} | 50 +- Documentation/hwmon/{ads1015 => ads1015.rst} | 72 +- Documentation/hwmon/{ads7828 => ads7828.rst} | 29 +- Documentation/hwmon/{adt7410 => adt7410.rst} | 49 +- Documentation/hwmon/{adt7411 => adt7411.rst} | 20 +- Documentation/hwmon/{adt7462 => adt7462.rst} | 10 +- Documentation/hwmon/{adt7470 => adt7470.rst} | 8 +- Documentation/hwmon/{adt7475 => adt7475.rst} | 38 +- Documentation/hwmon/{amc6821 => amc6821.rst} | 19 +- Documentation/hwmon/{asb100 => asb100.rst}| 50 +- Documentation/hwmon/{asc7621 => asc7621.rst} | 146 ++-- ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} | 2 + .../hwmon/{coretemp => coretemp.rst} | 46 +- Documentation/hwmon/{da9052 => da9052.rst}| 40 +- Documentation/hwmon/{da9055 => da9055.rst}| 20 +- Documentation/hwmon/{dme1737 => dme1737.rst} | 88 ++- Documentation/hwmon/{ds1621 => ds1621.rst}| 154 ++-- Documentation/hwmon/{ds620 => ds620.rst} | 12 +- Documentation/hwmon/{emc1403 => emc1403.rst} | 33 +- Documentation/hwmon/{emc2103 => emc2103.rst} | 6 +- .../hwmon/{emc6w201 => emc6w201.rst} | 5 + Documentation/hwmon/{f71805f => f71805f.rst} | 36 +- .../hwmon/{f71882fg => f71882fg.rst} | 56 +- .../hwmon/{fam15h_power => fam15h_power.rst} | 85 ++- .../hwmon/{ftsteutates => ftsteutates.rst}| 14 +- Documentation/hwmon/{g760a => g760a.rst} | 4 + Documentation/hwmon/{g762 => g762.rst}| 67 +- Documentation/hwmon/{gl518sm => gl518sm.rst} | 21 +- Documentation/hwmon/{hih6130 => hih6130.rst} | 14 +- ...on-kernel-api.txt => hwmon-kernel-api.rst} | 298 .../hwmon/{ibm-cffps => ibm-cffps.rst}| 3 + Documentation/hwmon/{ibmaem => ibmaem.rst}| 10 +- .../hwmon/{ibmpowernv => ibmpowernv.rst} | 3 + Documentation/hwmon/{ina209 => ina209.rst}| 18 +- Documentation/hwmon/{ina2xx => ina2xx.rst}| 41 +- Documentation/hwmon/{ina3221 => ina3221.rst} | 17 +- Documentation/hwmon/index.rst | 179 + Documentation/hwmon/{ir35221 => ir35221.rst} | 12 +- Documentation/hwmon/{it87 => it87.rst}| 102 ++- Documentation/hwmon/{jc42 => jc42.rst}| 55 +- Documentation/hwmon/{k10temp => k10temp.rst} | 37 +- Documentation/hwmon/{k8temp => k8temp.rst}| 17 +- .../hwmon/{lineage-pem => lineage-pem.rst}| 16 +-
Re: [PATCH 01/21] docs: hwmon: k10temp: convert to ReST format
On Wed, Apr 10, 2019 at 08:11:51AM -0300, Mauro Carvalho Chehab wrote: > Convert k10temp to ReST format, in order to allow it to > be parsed by Sphinx. > > Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab The first Signed-off-by: is bad. This affects all patches in the series. Guenter > --- > Documentation/hwmon/k10temp | 37 - > 1 file changed, 36 insertions(+), 1 deletion(-) > > diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp > index 254d2f55345a..12a86ba17de9 100644 > --- a/Documentation/hwmon/k10temp > +++ b/Documentation/hwmon/k10temp > @@ -2,42 +2,77 @@ Kernel driver k10temp > = > > Supported chips: > + > * AMD Family 10h processors: > + >Socket F: Quad-Core/Six-Core/Embedded Opteron (but see below) > + >Socket AM2+: Quad-Core Opteron, Phenom (II) X3/X4, Athlon X2 (but see > below) > + >Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II > + >Socket S1G3: Athlon II, Sempron, Turion II > + > * AMD Family 11h processors: > + >Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) > + > * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) > + > * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) > + > * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity", "Kaveri", > "Carrizo" > + > * AMD Family 16h processors: "Kabini", "Mullins" > >Prefix: 'k10temp' > + >Addresses scanned: PCI space > + >Datasheets: > + >BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors: > + > http://support.amd.com/us/Processor_TechDocs/31116.pdf > + >BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors: > + > http://support.amd.com/us/Processor_TechDocs/41256.pdf > + >BIOS and Kernel Developer's Guide (BKDG) for AMD Family 12h Processors: > + > http://support.amd.com/us/Processor_TechDocs/41131.pdf > + >BIOS and Kernel Developer's Guide (BKDG) for AMD Family 14h Models 00h-0Fh > Processors: > + > http://support.amd.com/us/Processor_TechDocs/43170.pdf > + >Revision Guide for AMD Family 10h Processors: > + > http://support.amd.com/us/Processor_TechDocs/41322.pdf > + >Revision Guide for AMD Family 11h Processors: > + > http://support.amd.com/us/Processor_TechDocs/41788.pdf > + >Revision Guide for AMD Family 12h Processors: > + > http://support.amd.com/us/Processor_TechDocs/44739.pdf > + >Revision Guide for AMD Family 14h Models 00h-0Fh Processors: > + > http://support.amd.com/us/Processor_TechDocs/47534.pdf > + >AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks: > + > http://support.amd.com/us/Processor_TechDocs/43373.pdf > + >AMD Family 10h Server and Workstation Processor Power and Thermal Data > Sheet: > + > http://support.amd.com/us/Processor_TechDocs/43374.pdf > + >AMD Family 10h Desktop Processor Power and Thermal Data Sheet: > + > http://support.amd.com/us/Processor_TechDocs/43375.pdf > > Author: Clemens Ladisch > @@ -60,7 +95,7 @@ are using an AM3 processor on an AM2+ mainboard, you can > safely use the > > There is one temperature measurement value, available as temp1_input in > sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree. > -Please note that it is defined as a relative value; to quote the AMD manual: > +Please note that it is defined as a relative value; to quote the AMD manual:: > >Tctl is the processor temperature control value, used by the platform to >control cooling systems. Tctl is a non-physical temperature on an
Re: [PATCH v2 1/2] hwmon: (occ) Move common code to a separate module
On Wed, Apr 10, 2019 at 11:21:47AM -0700, Guenter Roeck wrote: > Jean, > > On Wed, Apr 10, 2019 at 12:47:26PM +0200, Jean Delvare wrote: > > Instead of duplicating the common code into the 2 (binary) drivers, > > move the common code to a separate module. This is cleaner. > > > > Signed-off-by: Jean Delvare > > Cc: Eddie James > > Cc: Guenter Roeck > > what is the parent release for this patch ? I tried to apply it to mainline > and to hwmon-next using git am, but both failed. > Never mind, found it - v5.0. Both patches applied to hwmon-next. Thanks, Guenter > Thanks, > Guenter > > > --- > > Eddie, can you please give it a try and confirm it works? > > > > Note: I kept the module names as they were before, hence the extra > > "*-objs :=" statements. They could be removed if we rename the source > > files, but that's better done in git directly. I don't mind either way > > personally. > > > > drivers/hwmon/occ/Kconfig |3 +-- > > drivers/hwmon/occ/Makefile |6 -- > > drivers/hwmon/occ/common.c |7 +++ > > drivers/hwmon/occ/sysfs.c |2 ++ > > 4 files changed, 14 insertions(+), 4 deletions(-) > > > > --- linux-5.0.orig/drivers/hwmon/occ/Kconfig2019-04-10 > > 11:30:05.579537638 +0200 > > +++ linux-5.0/drivers/hwmon/occ/Kconfig 2019-04-10 11:31:20.843383376 > > +0200 > > @@ -27,5 +27,4 @@ config SENSORS_OCC_P9_SBE > > called occ-p9-hwmon. > > > > config SENSORS_OCC > > - bool "POWER On-Chip Controller" > > - depends on SENSORS_OCC_P8_I2C || SENSORS_OCC_P9_SBE > > + tristate > > --- linux-5.0.orig/drivers/hwmon/occ/Makefile 2019-03-04 > > 00:21:29.0 +0100 > > +++ linux-5.0/drivers/hwmon/occ/Makefile2019-04-10 11:33:23.631765535 > > +0200 > > @@ -1,5 +1,7 @@ > > -occ-p8-hwmon-objs := common.o sysfs.o p8_i2c.o > > -occ-p9-hwmon-objs := common.o sysfs.o p9_sbe.o > > +occ-hwmon-common-objs := common.o sysfs.o > > +occ-p8-hwmon-objs := p8_i2c.o > > +occ-p9-hwmon-objs := p9_sbe.o > > > > +obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o > > obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o > > obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o > > --- linux-5.0.orig/drivers/hwmon/occ/common.c 2019-03-04 > > 00:21:29.0 +0100 > > +++ linux-5.0/drivers/hwmon/occ/common.c2019-04-10 11:44:53.035573580 > > +0200 > > @@ -1,11 +1,13 @@ > > // SPDX-License-Identifier: GPL-2.0 > > > > #include > > +#include > > #include > > #include > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -1096,3 +1098,8 @@ int occ_setup(struct occ *occ, const cha > > > > return rc; > > } > > +EXPORT_SYMBOL_GPL(occ_setup); > > + > > +MODULE_AUTHOR("Eddie James "); > > +MODULE_DESCRIPTION("Common OCC hwmon code"); > > +MODULE_LICENSE("GPL"); > > --- linux-5.0.orig/drivers/hwmon/occ/sysfs.c2019-03-04 > > 00:21:29.0 +0100 > > +++ linux-5.0/drivers/hwmon/occ/sysfs.c 2019-04-10 11:39:38.627003382 > > +0200 > > @@ -12,6 +12,7 @@ > > > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -186,3 +187,4 @@ void occ_shutdown(struct occ *occ) > > { > > sysfs_remove_group(>bus_dev->kobj, _sysfs); > > } > > +EXPORT_SYMBOL_GPL(occ_shutdown); > > > > > > -- > > Jean Delvare > > SUSE L3 Support
Re: [PATCH v2 1/2] hwmon: (occ) Move common code to a separate module
Jean, On Wed, Apr 10, 2019 at 12:47:26PM +0200, Jean Delvare wrote: > Instead of duplicating the common code into the 2 (binary) drivers, > move the common code to a separate module. This is cleaner. > > Signed-off-by: Jean Delvare > Cc: Eddie James > Cc: Guenter Roeck what is the parent release for this patch ? I tried to apply it to mainline and to hwmon-next using git am, but both failed. Thanks, Guenter > --- > Eddie, can you please give it a try and confirm it works? > > Note: I kept the module names as they were before, hence the extra > "*-objs :=" statements. They could be removed if we rename the source > files, but that's better done in git directly. I don't mind either way > personally. > > drivers/hwmon/occ/Kconfig |3 +-- > drivers/hwmon/occ/Makefile |6 -- > drivers/hwmon/occ/common.c |7 +++ > drivers/hwmon/occ/sysfs.c |2 ++ > 4 files changed, 14 insertions(+), 4 deletions(-) > > --- linux-5.0.orig/drivers/hwmon/occ/Kconfig 2019-04-10 11:30:05.579537638 > +0200 > +++ linux-5.0/drivers/hwmon/occ/Kconfig 2019-04-10 11:31:20.843383376 > +0200 > @@ -27,5 +27,4 @@ config SENSORS_OCC_P9_SBE >called occ-p9-hwmon. > > config SENSORS_OCC > - bool "POWER On-Chip Controller" > - depends on SENSORS_OCC_P8_I2C || SENSORS_OCC_P9_SBE > + tristate > --- linux-5.0.orig/drivers/hwmon/occ/Makefile 2019-03-04 00:21:29.0 > +0100 > +++ linux-5.0/drivers/hwmon/occ/Makefile 2019-04-10 11:33:23.631765535 > +0200 > @@ -1,5 +1,7 @@ > -occ-p8-hwmon-objs := common.o sysfs.o p8_i2c.o > -occ-p9-hwmon-objs := common.o sysfs.o p9_sbe.o > +occ-hwmon-common-objs := common.o sysfs.o > +occ-p8-hwmon-objs := p8_i2c.o > +occ-p9-hwmon-objs := p9_sbe.o > > +obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o > obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o > obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o > --- linux-5.0.orig/drivers/hwmon/occ/common.c 2019-03-04 00:21:29.0 > +0100 > +++ linux-5.0/drivers/hwmon/occ/common.c 2019-04-10 11:44:53.035573580 > +0200 > @@ -1,11 +1,13 @@ > // SPDX-License-Identifier: GPL-2.0 > > #include > +#include > #include > #include > #include > #include > #include > +#include > #include > #include > #include > @@ -1096,3 +1098,8 @@ int occ_setup(struct occ *occ, const cha > > return rc; > } > +EXPORT_SYMBOL_GPL(occ_setup); > + > +MODULE_AUTHOR("Eddie James "); > +MODULE_DESCRIPTION("Common OCC hwmon code"); > +MODULE_LICENSE("GPL"); > --- linux-5.0.orig/drivers/hwmon/occ/sysfs.c 2019-03-04 00:21:29.0 > +0100 > +++ linux-5.0/drivers/hwmon/occ/sysfs.c 2019-04-10 11:39:38.627003382 > +0200 > @@ -12,6 +12,7 @@ > > #include > #include > +#include > #include > #include > #include > @@ -186,3 +187,4 @@ void occ_shutdown(struct occ *occ) > { > sysfs_remove_group(>bus_dev->kobj, _sysfs); > } > +EXPORT_SYMBOL_GPL(occ_shutdown); > > > -- > Jean Delvare > SUSE L3 Support
Re: [PATCH v2 2/2] hwmon: OCC drivers are ARM-only
On 4/10/19 5:56 AM, Jean Delvare wrote: These drivers are for a BMC inside PowerPC servers. The BMC runs on ARM hardware, so only propose the drivers on this architecture, unless build-testing. Thanks! Reviewed-by: Eddie James Signed-off-by: Jean Delvare Cc: Eddie James Cc: Guenter Roeck --- If PowerPC BMCs are ever based on another architecture and these drivers are compatible with them, then the list can be extended. drivers/hwmon/occ/Kconfig |2 ++ 1 file changed, 2 insertions(+) --- linux-5.0.orig/drivers/hwmon/occ/Kconfig2019-04-10 11:54:07.014895111 +0200 +++ linux-5.0/drivers/hwmon/occ/Kconfig 2019-04-10 12:12:27.379725640 +0200 @@ -5,6 +5,7 @@ config SENSORS_OCC_P8_I2C tristate "POWER8 OCC through I2C" depends on I2C + depends on ARM || ARM64 || COMPILE_TEST select SENSORS_OCC help This option enables support for monitoring sensors provided by the @@ -17,6 +18,7 @@ config SENSORS_OCC_P8_I2C config SENSORS_OCC_P9_SBE tristate "POWER9 OCC through SBE" depends on FSI_OCC + depends on ARM || ARM64 || COMPILE_TEST select SENSORS_OCC help This option enables support for monitoring sensors provided by the
Re: [PATCH v2 1/2] hwmon: (occ) Move common code to a separate module
On 4/10/19 5:47 AM, Jean Delvare wrote: Instead of duplicating the common code into the 2 (binary) drivers, move the common code to a separate module. This is cleaner. Signed-off-by: Jean Delvare Cc: Eddie James Cc: Guenter Roeck --- Eddie, can you please give it a try and confirm it works? Yes, this works well. Reviewed-by: Eddie James Tested-by: Eddie James Note: I kept the module names as they were before, hence the extra "*-objs :=" statements. They could be removed if we rename the source files, but that's better done in git directly. I don't mind either way personally. drivers/hwmon/occ/Kconfig |3 +-- drivers/hwmon/occ/Makefile |6 -- drivers/hwmon/occ/common.c |7 +++ drivers/hwmon/occ/sysfs.c |2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) --- linux-5.0.orig/drivers/hwmon/occ/Kconfig2019-04-10 11:30:05.579537638 +0200 +++ linux-5.0/drivers/hwmon/occ/Kconfig 2019-04-10 11:31:20.843383376 +0200 @@ -27,5 +27,4 @@ config SENSORS_OCC_P9_SBE called occ-p9-hwmon. config SENSORS_OCC - bool "POWER On-Chip Controller" - depends on SENSORS_OCC_P8_I2C || SENSORS_OCC_P9_SBE + tristate --- linux-5.0.orig/drivers/hwmon/occ/Makefile 2019-03-04 00:21:29.0 +0100 +++ linux-5.0/drivers/hwmon/occ/Makefile2019-04-10 11:33:23.631765535 +0200 @@ -1,5 +1,7 @@ -occ-p8-hwmon-objs := common.o sysfs.o p8_i2c.o -occ-p9-hwmon-objs := common.o sysfs.o p9_sbe.o +occ-hwmon-common-objs := common.o sysfs.o +occ-p8-hwmon-objs := p8_i2c.o +occ-p9-hwmon-objs := p9_sbe.o +obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o --- linux-5.0.orig/drivers/hwmon/occ/common.c 2019-03-04 00:21:29.0 +0100 +++ linux-5.0/drivers/hwmon/occ/common.c2019-04-10 11:44:53.035573580 +0200 @@ -1,11 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include #include #include +#include #include #include #include @@ -1096,3 +1098,8 @@ int occ_setup(struct occ *occ, const cha return rc; } +EXPORT_SYMBOL_GPL(occ_setup); + +MODULE_AUTHOR("Eddie James "); +MODULE_DESCRIPTION("Common OCC hwmon code"); +MODULE_LICENSE("GPL"); --- linux-5.0.orig/drivers/hwmon/occ/sysfs.c2019-03-04 00:21:29.0 +0100 +++ linux-5.0/drivers/hwmon/occ/sysfs.c 2019-04-10 11:39:38.627003382 +0200 @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -186,3 +187,4 @@ void occ_shutdown(struct occ *occ) { sysfs_remove_group(>bus_dev->kobj, _sysfs); } +EXPORT_SYMBOL_GPL(occ_shutdown);
Re: [PATCH 21/21] docs: hwmon: Add an index file and rename docs to *.rst
Hello, On Wed, Apr 10, 2019 at 08:12:11AM -0300, Mauro Carvalho Chehab wrote: > Now that all files were converted to ReST format, rename them > and add an index. > > Signed-off-by: Mauro Carvalho Chehab > --- [...] > diff --git a/Documentation/hwmon/submitting-patches > b/Documentation/hwmon/submitting-patches.rst > similarity index 99% > rename from Documentation/hwmon/submitting-patches > rename to Documentation/hwmon/submitting-patches.rst > index 12540b7d9b50..6120db7556aa 100644 > --- a/Documentation/hwmon/submitting-patches > +++ b/Documentation/hwmon/submitting-patches.rst I'd additionally suggest: diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches.rst index f88221b46153..a86be4b9 100644 --- a/Documentation/hwmon/submitting-patches +++ b/Documentation/hwmon/submitting-patches.rst @@ -38,7 +38,7 @@ increase the chances of your change being accepted. 2. Adding functionality to existing drivers --- -* Make sure the documentation in Documentation/hwmon/ is up to +* Make sure the documentation in Documentation/hwmon/.rst is up to date. * Make sure the information in Kconfig is up to date. @@ -60,7 +60,7 @@ increase the chances of your change being accepted. * Consider adding yourself to MAINTAINERS. -* Document the driver in Documentation/hwmon/. +* Document the driver in Documentation/hwmon/.rst. * Add the driver to Kconfig and Makefile in alphabetical order. Thanks, Jonathan Neuschäfer signature.asc Description: PGP signature
[PATCH 05/21] docs: hwmon: emc2103: convert to ReST format
Convert emc2103 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/emc2103 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/hwmon/emc2103 b/Documentation/hwmon/emc2103 index a12b2c127140..6a6ca6d1b34e 100644 --- a/Documentation/hwmon/emc2103 +++ b/Documentation/hwmon/emc2103 @@ -2,13 +2,17 @@ Kernel driver emc2103 == Supported chips: + * SMSC EMC2103 + Addresses scanned: I2C 0x2e + Prefix: 'emc2103' + Datasheet: Not public Authors: -Steve Glendinning + Steve Glendinning Description --- -- 2.20.1
[PATCH 13/21] docs: hwmon: ads1015: convert to ReST format
Convert ads1015 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/ads1015 | 72 ++--- 1 file changed, 43 insertions(+), 29 deletions(-) diff --git a/Documentation/hwmon/ads1015 b/Documentation/hwmon/ads1015 index 02d2a459385f..e0951c4e57bb 100644 --- a/Documentation/hwmon/ads1015 +++ b/Documentation/hwmon/ads1015 @@ -2,17 +2,25 @@ Kernel driver ads1015 = Supported chips: + * Texas Instruments ADS1015 + Prefix: 'ads1015' -Datasheet: Publicly available at the Texas Instruments website : - http://focus.ti.com/lit/ds/symlink/ads1015.pdf + +Datasheet: Publicly available at the Texas Instruments website: + + http://focus.ti.com/lit/ds/symlink/ads1015.pdf + * Texas Instruments ADS1115 + Prefix: 'ads1115' -Datasheet: Publicly available at the Texas Instruments website : - http://focus.ti.com/lit/ds/symlink/ads1115.pdf + +Datasheet: Publicly available at the Texas Instruments website: + + http://focus.ti.com/lit/ds/symlink/ads1115.pdf Authors: -Dirk Eibach, Guntermann & Drunck GmbH + Dirk Eibach, Guntermann & Drunck GmbH Description --- @@ -24,14 +32,15 @@ This device is a 12/16-bit A-D converter with 4 inputs. The inputs can be used single ended or in certain differential combinations. The inputs can be made available by 8 sysfs input files in0_input - in7_input: -in0: Voltage over AIN0 and AIN1. -in1: Voltage over AIN0 and AIN3. -in2: Voltage over AIN1 and AIN3. -in3: Voltage over AIN2 and AIN3. -in4: Voltage over AIN0 and GND. -in5: Voltage over AIN1 and GND. -in6: Voltage over AIN2 and GND. -in7: Voltage over AIN3 and GND. + + - in0: Voltage over AIN0 and AIN1. + - in1: Voltage over AIN0 and AIN3. + - in2: Voltage over AIN1 and AIN3. + - in3: Voltage over AIN2 and AIN3. + - in4: Voltage over AIN0 and GND. + - in5: Voltage over AIN1 and GND. + - in6: Voltage over AIN2 and GND. + - in7: Voltage over AIN3 and GND. Which inputs are available can be configured using platform data or devicetree. @@ -42,29 +51,34 @@ Platform Data In linux/platform_data/ads1015.h platform data is defined, channel_data contains configuration data for the used input combinations: + - pga is the programmable gain amplifier (values are full scale) - 0: +/- 6.144 V - 1: +/- 4.096 V - 2: +/- 2.048 V - 3: +/- 1.024 V - 4: +/- 0.512 V - 5: +/- 0.256 V + +- 0: +/- 6.144 V +- 1: +/- 4.096 V +- 2: +/- 2.048 V +- 3: +/- 1.024 V +- 4: +/- 0.512 V +- 5: +/- 0.256 V + - data_rate in samples per second - 0: 128 - 1: 250 - 2: 490 - 3: 920 - 4: 1600 - 5: 2400 - 6: 3300 -Example: -struct ads1015_platform_data data = { +- 0: 128 +- 1: 250 +- 2: 490 +- 3: 920 +- 4: 1600 +- 5: 2400 +- 6: 3300 + +Example:: + + struct ads1015_platform_data data = { .channel_data = { [2] = { .enabled = true, .pga = 1, .data_rate = 0 }, [4] = { .enabled = true, .pga = 4, .data_rate = 5 }, } -}; + }; In this case only in2_input (FS +/- 4.096 V, 128 SPS) and in4_input (FS +/- 0.512 V, 2400 SPS) would be created. -- 2.20.1
[PATCH 01/21] docs: hwmon: k10temp: convert to ReST format
Convert k10temp to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/k10temp | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp index 254d2f55345a..12a86ba17de9 100644 --- a/Documentation/hwmon/k10temp +++ b/Documentation/hwmon/k10temp @@ -2,42 +2,77 @@ Kernel driver k10temp = Supported chips: + * AMD Family 10h processors: + Socket F: Quad-Core/Six-Core/Embedded Opteron (but see below) + Socket AM2+: Quad-Core Opteron, Phenom (II) X3/X4, Athlon X2 (but see below) + Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II + Socket S1G3: Athlon II, Sempron, Turion II + * AMD Family 11h processors: + Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) + * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) + * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) + * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity", "Kaveri", "Carrizo" + * AMD Family 16h processors: "Kabini", "Mullins" Prefix: 'k10temp' + Addresses scanned: PCI space + Datasheets: + BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors: + http://support.amd.com/us/Processor_TechDocs/31116.pdf + BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors: + http://support.amd.com/us/Processor_TechDocs/41256.pdf + BIOS and Kernel Developer's Guide (BKDG) for AMD Family 12h Processors: + http://support.amd.com/us/Processor_TechDocs/41131.pdf + BIOS and Kernel Developer's Guide (BKDG) for AMD Family 14h Models 00h-0Fh Processors: + http://support.amd.com/us/Processor_TechDocs/43170.pdf + Revision Guide for AMD Family 10h Processors: + http://support.amd.com/us/Processor_TechDocs/41322.pdf + Revision Guide for AMD Family 11h Processors: + http://support.amd.com/us/Processor_TechDocs/41788.pdf + Revision Guide for AMD Family 12h Processors: + http://support.amd.com/us/Processor_TechDocs/44739.pdf + Revision Guide for AMD Family 14h Models 00h-0Fh Processors: + http://support.amd.com/us/Processor_TechDocs/47534.pdf + AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks: + http://support.amd.com/us/Processor_TechDocs/43373.pdf + AMD Family 10h Server and Workstation Processor Power and Thermal Data Sheet: + http://support.amd.com/us/Processor_TechDocs/43374.pdf + AMD Family 10h Desktop Processor Power and Thermal Data Sheet: + http://support.amd.com/us/Processor_TechDocs/43375.pdf Author: Clemens Ladisch @@ -60,7 +95,7 @@ are using an AM3 processor on an AM2+ mainboard, you can safely use the There is one temperature measurement value, available as temp1_input in sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree. -Please note that it is defined as a relative value; to quote the AMD manual: +Please note that it is defined as a relative value; to quote the AMD manual:: Tctl is the processor temperature control value, used by the platform to control cooling systems. Tctl is a non-physical temperature on an -- 2.20.1
[PATCH 06/21] docs: hwmon: pc87360: convert to ReST format
Convert pc87360 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/pc87360 | 38 + 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/Documentation/hwmon/pc87360 b/Documentation/hwmon/pc87360 index d5f5cf16ce59..4bad07bce54b 100644 --- a/Documentation/hwmon/pc87360 +++ b/Documentation/hwmon/pc87360 @@ -2,14 +2,19 @@ Kernel driver pc87360 = Supported chips: + * National Semiconductor PC87360, PC87363, PC87364, PC87365 and PC87366 + Prefixes: 'pc87360', 'pc87363', 'pc87364', 'pc87365', 'pc87366' + Addresses scanned: none, address read from Super I/O config space + Datasheets: No longer available Authors: Jean Delvare Thanks to Sandeep Mehta, Tonko de Rooy and Daniel Ceregatti for testing. + Thanks to Rudolf Marek for helping me investigate conversion issues. @@ -17,11 +22,13 @@ Module Parameters - * init int - Chip initialization level: - 0: None - *1: Forcibly enable internal voltage and temperature channels, except in9 - 2: Forcibly enable all voltage and temperature channels, except in9 - 3: Forcibly enable all voltage and temperature channels, including in9 +Chip initialization level: + +- 0: None +- **1**: Forcibly enable internal voltage and temperature channels, + except in9 +- 2: Forcibly enable all voltage and temperature channels, except in9 +- 3: Forcibly enable all voltage and temperature channels, including in9 Note that this parameter has no effect for the PC87360, PC87363 and PC87364 chips. @@ -43,13 +50,15 @@ hardware monitoring chipsets, not only controlling and monitoring three fans, but also monitoring eleven voltage inputs and two (PC87365) or up to four (PC87366) temperatures. + === === === === === = Chip#vin#fan#pwm#temp devid - + === === === === === = PC87360 - 2 2 - 0xE1 PC87363 - 2 2 - 0xE8 PC87364 - 3 3 - 0xE4 PC87365 11 3 3 2 0xE5 PC87366 11 3 3 3-4 0xE9 + === === === === === = The driver assumes that no more than one chip is present, and one of the standard Super I/O addresses is used (0x2E/0x2F or 0x4E/0x4F) @@ -68,18 +77,23 @@ have to care no more. For reference, here are a few values about clock dividers: -slowest accuracyhighest -measurable around 3000 accurate +=== === === === + slowest accuracyhighest + measurable around 3000 accurate divider speed (RPM) RPM (RPM) speed (RPM) - 11882 18 6928 - 2 941 37 4898 - 4 470 74 3464 - 8 235 150 2449 +=== === === === +11882 18 6928 +2 941 37 4898 +4 470 74 3464 +8 235 150 2449 +=== === === === For the curious, here is how the values above were computed: + * slowest measurable speed: clock/(255*divider) * accuracy around 3000 RPM: 3000^2/clock * highest accurate speed: sqrt(clock*100) + The clock speed for the PC87360 family is 480 kHz. I arbitrarily chose 100 RPM as the lowest acceptable accuracy. -- 2.20.1
[PATCH 07/21] docs: hwmon: fam15h_power: convert to ReST format
Convert fam15h_power to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/fam15h_power | 85 +--- 1 file changed, 57 insertions(+), 28 deletions(-) diff --git a/Documentation/hwmon/fam15h_power b/Documentation/hwmon/fam15h_power index fb594c281c46..fdde632c93a3 100644 --- a/Documentation/hwmon/fam15h_power +++ b/Documentation/hwmon/fam15h_power @@ -2,15 +2,20 @@ Kernel driver fam15h_power == Supported chips: + * AMD Family 15h Processors + * AMD Family 16h Processors Prefix: 'fam15h_power' + Addresses scanned: PCI space + Datasheets: - BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors - BIOS and Kernel Developer's Guide (BKDG) For AMD Family 16h Processors - AMD64 Architecture Programmer's Manual Volume 2: System Programming + + - BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors + - BIOS and Kernel Developer's Guide (BKDG) For AMD Family 16h Processors + - AMD64 Architecture Programmer's Manual Volume 2: System Programming Author: Andreas Herrmann @@ -31,14 +36,19 @@ For AMD Family 15h and 16h processors the following power values can be calculated using different processor northbridge function registers: -* BasePwrWatts: Specifies in watts the maximum amount of power - consumed by the processor for NB and logic external to the core. -* ProcessorPwrWatts: Specifies in watts the maximum amount of power - the processor can support. -* CurrPwrWatts: Specifies in watts the current amount of power being - consumed by the processor. +* BasePwrWatts: +Specifies in watts the maximum amount of power +consumed by the processor for NB and logic external to the core. + +* ProcessorPwrWatts: +Specifies in watts the maximum amount of power +the processor can support. +* CurrPwrWatts: +Specifies in watts the current amount of power being +consumed by the processor. This driver provides ProcessorPwrWatts and CurrPwrWatts: + * power1_crit (ProcessorPwrWatts) * power1_input (CurrPwrWatts) @@ -53,35 +63,53 @@ calculate the average power consumed by a processor during a measurement interval Tm. The feature of accumulated power mechanism is indicated by CPUID Fn8000_0007_EDX[12]. -* Tsample: compute unit power accumulator sample period -* Tref: the PTSC counter period -* PTSC: performance timestamp counter -* N: the ratio of compute unit power accumulator sample period to the - PTSC period -* Jmax: max compute unit accumulated power which is indicated by - MaxCpuSwPwrAcc MSR C001007b -* Jx/Jy: compute unit accumulated power which is indicated by - CpuSwPwrAcc MSR C001007a -* Tx/Ty: the value of performance timestamp counter which is indicated - by CU_PTSC MSR C0010280 -* PwrCPUave: CPU average power +* Tsample: + compute unit power accumulator sample period + +* Tref: + the PTSC counter period + +* PTSC: + performance timestamp counter + +* N: + the ratio of compute unit power accumulator sample period to the + PTSC period + +* Jmax: + max compute unit accumulated power which is indicated by + MaxCpuSwPwrAcc MSR C001007b + +* Jx/Jy: + compute unit accumulated power which is indicated by + CpuSwPwrAcc MSR C001007a +* Tx/Ty: + the value of performance timestamp counter which is indicated + by CU_PTSC MSR C0010280 + +* PwrCPUave: + CPU average power i. Determine the ratio of Tsample to Tref by executing CPUID Fn8000_0007. + N = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]]. ii. Read the full range of the cumulative energy value from the new -MSR MaxCpuSwPwrAcc. +MSR MaxCpuSwPwrAcc. + Jmax = value returned. + iii. At time x, SW reads CpuSwPwrAcc MSR and samples the PTSC. - Jx = value read from CpuSwPwrAcc and Tx = value read from -PTSC. + + Jx = value read from CpuSwPwrAcc and Tx = value read from PTSC. iv. At time y, SW reads CpuSwPwrAcc MSR and samples the PTSC. - Jy = value read from CpuSwPwrAcc and Ty = value read from -PTSC. + + Jy = value read from CpuSwPwrAcc and Ty = value read from PTSC. v. Calculate the average power consumption for a compute unit over -time period (y-x). Unit of result is uWatt. + time period (y-x). Unit of result is uWatt:: + if (Jy < Jx) // Rollover has occurred Jdelta = (Jy + Jmax) - Jx else @@ -90,13 +118,14 @@ time period (y-x). Unit of result is uWatt. This driver provides PwrCPUave and interval(default is 10 millisecond and maximum is 1 second): + * power1_average (PwrCPUave) * power1_average_interval (Interval) The power1_average_interval can be updated at /etc/sensors3.conf file as below: -chip "fam15h_power-*" +chip `fam15h_power-*` set power1_average_interval 0.01 Then save it with "sensors -s". -- 2.20.1
[PATCH 10/21] docs: hwmon: aspeed-pwm-tacho: convert to ReST format
Convert aspeed-pwm-tacho to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/aspeed-pwm-tacho | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/hwmon/aspeed-pwm-tacho b/Documentation/hwmon/aspeed-pwm-tacho index 7cfb34977460..6dcec845fbc7 100644 --- a/Documentation/hwmon/aspeed-pwm-tacho +++ b/Documentation/hwmon/aspeed-pwm-tacho @@ -15,8 +15,10 @@ controller supports up to 16 tachometer inputs. The driver provides the following sensor accesses in sysfs: +=== === = fanX_input ro provide current fan rotation value in RPM as reported by the fan to the device. pwmX rw get or set PWM fan control value. This is an integer value between 0(off) and 255(full speed). +=== === = -- 2.20.1
[PATCH 12/21] docs: hwmon: asc7621: convert to ReST format
Convert asc7621 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/asc7621 | 146 ++-- 1 file changed, 88 insertions(+), 58 deletions(-) diff --git a/Documentation/hwmon/asc7621 b/Documentation/hwmon/asc7621 index 7287be7e1f21..b5a9fad0f172 100644 --- a/Documentation/hwmon/asc7621 +++ b/Documentation/hwmon/asc7621 @@ -1,10 +1,15 @@ += Kernel driver asc7621 -== += Supported chips: + Andigilog aSC7621 and aSC7621a + Prefix: 'asc7621' + Addresses scanned: I2C 0x2c, 0x2d, 0x2e + Datasheet: http://www.fairview5.com/linux/asc7621/asc7621.pdf Author: @@ -73,8 +78,10 @@ Finally, we have added a tach disable function that turns off the tach measurement system for individual tachs in order to save power. That is in register 75h. --- +-- + aSC7621 Product Description +=== The aSC7621 has a two wire digital interface compatible with SMBus 2.0. Using a 10-bit ADC, the aSC7621 measures the temperature of two remote diode @@ -102,6 +109,8 @@ System voltages of VCCP, 2.5V, 3.3V, 5.0V, and 12V motherboard power are monitored efficiently with internal scaling resistors. Features + + - Supports PECI interface and monitors internal and remote thermal diodes - 2-wire, SMBus 2.0 compliant, serial interface - 10-bit ADC @@ -110,7 +119,7 @@ Features - Noise filtering of temperature reading for fan speed control - 0.25C digital temperature sensor resolution - 3 PWM fan speed control outputs for 2-, 3- or 4-wire fans and up to 4 fan - tachometer inputs + tachometer inputs - Enhanced measured temperature to Temperature Zone assignment. - Provides high and low PWM frequency ranges - 3 GPIO pins for custom use @@ -123,17 +132,20 @@ Except where noted below, the sysfs entries created by this driver follow the standards defined in "sysfs-interface". temp1_source + = === 0 (default) peci_legacy = 0, Remote 1 Temperature - peci_legacy = 1, PECI Processor Temperature 0 + peci_legacy = 1, PECI Processor Temperature 0 1 Remote 1 Temperature 2 Remote 2 Temperature 3 Internal Temperature 4 PECI Processor Temperature 0 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 - 7 PECI Processor Temperature 3 + 7 PECI Processor Temperature 3 + = === temp2_source + = === 0 (default) Internal Temperature 1 Remote 1 Temperature 2 Remote 2 Temperature @@ -142,8 +154,10 @@ temp2_source 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 7 PECI Processor Temperature 3 + = === temp3_source + = === 0 (default) Remote 2 Temperature 1 Remote 1 Temperature 2 Remote 2 Temperature @@ -152,10 +166,12 @@ temp3_source 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 7 PECI Processor Temperature 3 + = === temp4_source + = === 0 (default) peci_legacy = 0, PECI Processor Temperature 0 - peci_legacy = 1, Remote 1 Temperature + peci_legacy = 1, Remote 1 Temperature 1 Remote 1 Temperature 2 Remote 2 Temperature 3 Internal Temperature @@ -163,58 +179,65 @@ temp4_source 5 PECI Processor Temperature 1 6 PECI Processor Temperature 2 7 PECI Processor Temperature 3 + = === -temp[1-4]_smoothing_enable -temp[1-4]_smoothing_time +temp[1-4]_smoothing_enable / temp[1-4]_smoothing_time Smooths spikes in temp readings caused by noise. Valid values in milliseconds are: - 35000 - 17600 - 11800 -7000 -4400 -3000 -1600 - 800 + + * 35000 + * 17600 + * 11800 + * 7000 + * 4400 + * 3000 + * 1600 + * 800 temp[1-4]_crit When the corresponding zone temperature reaches this value, ALL pwm outputs will got to 100%. -temp[5-8]_input -temp[5-8]_enable +temp[5-8]_input / temp[5-8]_enable The aSC7621 can also read temperatures provided by the processor via the PECI bus. Usually these
[PATCH 08/21] docs: hwmon: w83791d: convert to ReST format
Convert w83791d to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/w83791d | 123 +--- 1 file changed, 71 insertions(+), 52 deletions(-) diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d index f4021a285460..a91f9e5fb0c6 100644 --- a/Documentation/hwmon/w83791d +++ b/Documentation/hwmon/w83791d @@ -2,9 +2,13 @@ Kernel driver w83791d = Supported chips: + * Winbond W83791D + Prefix: 'w83791d' + Addresses scanned: I2C 0x2c - 0x2f + Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf Author: Charles Spirakis @@ -12,39 +16,46 @@ Author: Charles Spirakis This driver was derived from the w83781d.c and w83792d.c source files. Credits: + w83781d.c: -Frodo Looijaard , -Philip Edelbrock , -and Mark Studebaker + +- Frodo Looijaard , +- Philip Edelbrock , +- Mark Studebaker + w83792d.c: -Shane Huang (Winbond), -Rudolf Marek + +- Shane Huang (Winbond), +- Rudolf Marek Additional contributors: -Sven Anders -Marc Hulsman + +- Sven Anders +- Marc Hulsman Module Parameters - * init boolean - (default 0) - Use 'init=1' to have the driver do extra software initializations. - The default behavior is to do the minimum initialization possible - and depend on the BIOS to properly setup the chip. If you know you - have a w83791d and you're having problems, try init=1 before trying - reset=1. +(default 0) + +Use 'init=1' to have the driver do extra software initializations. +The default behavior is to do the minimum initialization possible +and depend on the BIOS to properly setup the chip. If you know you +have a w83791d and you're having problems, try init=1 before trying +reset=1. * reset boolean - (default 0) - Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default - behavior is no chip reset to preserve BIOS settings. +(default 0) + +Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default +behavior is no chip reset to preserve BIOS settings. * force_subclients=bus,caddr,saddr,saddr - This is used to force the i2c addresses for subclients of - a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b' - to force the subclients of chip 0x2f on bus 0 to i2c addresses - 0x4a and 0x4b. +This is used to force the i2c addresses for subclients of +a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b` +to force the subclients of chip 0x2f on bus 0 to i2c addresses +0x4a and 0x4b. Description @@ -91,11 +102,11 @@ This file is used for both legacy and new code. The sysfs interface to the beep bitmask has migrated from the original legacy method of a single sysfs beep_mask file to a newer method using multiple -*_beep files as described in .../Documentation/hwmon/sysfs-interface. +`*_beep` files as described in `Documentation/hwmon/sysfs-interface`. A similar change has occurred for the bitmap corresponding to the alarms. The original legacy method used a single sysfs alarms file containing a bitmap -of triggered alarms. The newer method uses multiple sysfs *_alarm files +of triggered alarms. The newer method uses multiple sysfs `*_alarm` files (again following the pattern described in sysfs-interface). Since both methods read and write the underlying hardware, they can be used @@ -116,46 +127,54 @@ User mode code requesting values more often will receive cached values. The sysfs-interface is documented in the 'sysfs-interface' file. Only chip-specific options are documented here. -pwm[1-3]_enable - this file controls mode of fan/temperature control for +=== === +pwm[1-3]_enablethis file controls mode of fan/temperature control for fan 1-3. Fan/PWM 4-5 only support manual mode. - * 1 Manual mode - * 2 Thermal Cruise mode - * 3 Fan Speed Cruise mode (no further support) -temp[1-3]_target - defines the target temperature for Thermal Cruise mode. + * 1 Manual mode + * 2 Thermal Cruise mode + * 3 Fan Speed Cruise mode (no further support) + +temp[1-3]_target defines the target temperature for Thermal Cruise mode. Unit: millidegree Celsius RW -temp[1-3]_tolerance - temperature tolerance for Thermal Cruise mode. +temp[1-3]_tolerancetemperature tolerance for Thermal Cruise mode. Specifies an interval around the target temperature in which the fan speed is not changed. Unit: millidegree
[PATCH 15/21] docs: hwmon: wm831x, wm8350: convert to ReST format
Convert wm831x and wm8350 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/wm831x | 9 ++--- Documentation/hwmon/wm8350 | 10 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Documentation/hwmon/wm831x b/Documentation/hwmon/wm831x index 11446757c8c8..c56fb35a2fb3 100644 --- a/Documentation/hwmon/wm831x +++ b/Documentation/hwmon/wm831x @@ -3,11 +3,14 @@ Kernel driver wm831x-hwmon Supported chips: * Wolfson Microelectronics WM831x PMICs + Prefix: 'wm831x' + Datasheet: - http://www.wolfsonmicro.com/products/WM8310 - http://www.wolfsonmicro.com/products/WM8311 - http://www.wolfsonmicro.com/products/WM8312 + + - http://www.wolfsonmicro.com/products/WM8310 + - http://www.wolfsonmicro.com/products/WM8311 + - http://www.wolfsonmicro.com/products/WM8312 Authors: Mark Brown diff --git a/Documentation/hwmon/wm8350 b/Documentation/hwmon/wm8350 index 98f923bd2e92..cec044ca5900 100644 --- a/Documentation/hwmon/wm8350 +++ b/Documentation/hwmon/wm8350 @@ -2,12 +2,16 @@ Kernel driver wm8350-hwmon == Supported chips: + * Wolfson Microelectronics WM835x PMICs + Prefix: 'wm8350' + Datasheet: - http://www.wolfsonmicro.com/products/WM8350 - http://www.wolfsonmicro.com/products/WM8351 - http://www.wolfsonmicro.com/products/WM8352 + + - http://www.wolfsonmicro.com/products/WM8350 + - http://www.wolfsonmicro.com/products/WM8351 + - http://www.wolfsonmicro.com/products/WM8352 Authors: Mark Brown -- 2.20.1
[PATCH 17/21] docs: hwmon: k8temp, w83793: convert to ReST format
Convert k8temp and w83793 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/k8temp | 17 +++-- Documentation/hwmon/w83793 | 123 - 2 files changed, 77 insertions(+), 63 deletions(-) diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp index 716dc24c7237..72da12aa17e5 100644 --- a/Documentation/hwmon/k8temp +++ b/Documentation/hwmon/k8temp @@ -2,12 +2,17 @@ Kernel driver k8temp Supported chips: + * AMD Athlon64/FX or Opteron CPUs + Prefix: 'k8temp' + Addresses scanned: PCI space + Datasheet: http://support.amd.com/us/Processor_TechDocs/32559.pdf Author: Rudolf Marek + Contact: Rudolf Marek Description @@ -27,10 +32,12 @@ implemented sensors. Mapping of /sys files is as follows: -temp1_input - temperature of Core 0 and "place" 0 -temp2_input - temperature of Core 0 and "place" 1 -temp3_input - temperature of Core 1 and "place" 0 -temp4_input - temperature of Core 1 and "place" 1 += === +temp1_input temperature of Core 0 and "place" 0 +temp2_input temperature of Core 0 and "place" 1 +temp3_input temperature of Core 1 and "place" 0 +temp4_input temperature of Core 1 and "place" 1 += === Temperatures are measured in degrees Celsius and measurement resolution is 1 degree C. It is expected that future CPU will have better resolution. The @@ -48,7 +55,7 @@ computed temperature called TControl, which must be lower than TControlMax. The relationship is following: -temp1_input - TjOffset*2 < TControlMax, + temp1_input - TjOffset*2 < TControlMax, TjOffset is not yet exported by the driver, TControlMax is usually 70 degrees C. The rule of the thumb -> CPU temperature should not cross diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793 index 6cc5f639b721..83bb40c48645 100644 --- a/Documentation/hwmon/w83793 +++ b/Documentation/hwmon/w83793 @@ -2,29 +2,34 @@ Kernel driver w83793 Supported chips: + * Winbond W83793G/W83793R + Prefix: 'w83793' + Addresses scanned: I2C 0x2c - 0x2f + Datasheet: Still not published Authors: -Yuan Mu (Winbond Electronics) -Rudolf Marek +- Yuan Mu (Winbond Electronics) +- Rudolf Marek Module parameters - * reset int - (default 0) - This parameter is not recommended, it will lose motherboard specific - settings. Use 'reset=1' to reset the chip when loading this module. +(default 0) + +This parameter is not recommended, it will lose motherboard specific +settings. Use 'reset=1' to reset the chip when loading this module. * force_subclients=bus,caddr,saddr1,saddr2 - This is used to force the i2c addresses for subclients of - a certain chip. Typical usage is `force_subclients=0,0x2f,0x4a,0x4b' - to force the subclients of chip 0x2f on bus 0 to i2c addresses - 0x4a and 0x4b. +This is used to force the i2c addresses for subclients of +a certain chip. Typical usage is `force_subclients=0,0x2f,0x4a,0x4b` +to force the subclients of chip 0x2f on bus 0 to i2c addresses +0x4a and 0x4b. Description @@ -33,70 +38,72 @@ Description This driver implements support for Winbond W83793G/W83793R chips. * Exported features - This driver exports 10 voltage sensors, up to 12 fan tachometer inputs, - 6 remote temperatures, up to 8 sets of PWM fan controls, SmartFan - (automatic fan speed control) on all temperature/PWM combinations, 2 - sets of 6-pin CPU VID input. +This driver exports 10 voltage sensors, up to 12 fan tachometer inputs, +6 remote temperatures, up to 8 sets of PWM fan controls, SmartFan +(automatic fan speed control) on all temperature/PWM combinations, 2 +sets of 6-pin CPU VID input. * Sensor resolutions - If your motherboard maker used the reference design, the resolution of - voltage0-2 is 2mV, resolution of voltage3/4/5 is 16mV, 8mV for voltage6, - 24mV for voltage7/8. Temp1-4 have a 0.25 degree Celsius resolution, - temp5-6 have a 1 degree Celsiis resolution. +If your motherboard maker used the reference design, the resolution of +voltage0-2 is 2mV, resolution of voltage3/4/5 is 16mV, 8mV for voltage6, +24mV for voltage7/8. Temp1-4 have a 0.25 degree Celsius resolution, +temp5-6 have a 1 degree Celsiis resolution. * Temperature sensor types - Temp1-4 have 2 possible types. It can be read from (and written to) - temp[1-4]_type. - - If the value is 3, it starts monitoring using a remote termal diode -(default). - - If the value is 6, it starts monitoring using the temperature sensor -in Intel CPU and get result by PECI. - Temp5-6 can be connected to external thermistors (value of - temp[5-6]_type is 4). +Temp1-4 have 2 possible types. It can be read from (and written to) +
[PATCH 02/21] docs: hwmon: vexpress: convert to ReST format
Convert vexpress to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/vexpress | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/hwmon/vexpress b/Documentation/hwmon/vexpress index 557d6d5ad90d..8c861c8151ac 100644 --- a/Documentation/hwmon/vexpress +++ b/Documentation/hwmon/vexpress @@ -2,14 +2,21 @@ Kernel driver vexpress == Supported systems: + * ARM Ltd. Versatile Express platform + Prefix: 'vexpress' + Datasheets: + * "Hardware Description" sections of the Technical Reference Manuals -for the Versatile Express boards: - http://infocenter.arm.com/help/topic/com.arm.doc.subset.boards.express/index.html + for the Versatile Express boards: + + - http://infocenter.arm.com/help/topic/com.arm.doc.subset.boards.express/index.html + * Section "4.4.14. System Configuration registers" of the V2M-P1 TRM: - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0447-/index.html + + - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0447-/index.html Author: Pawel Moll -- 2.20.1
[PATCH 19/21] docs: hwmon: misc files: convert to ReST format
Convert other files maintained by Guenter to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/ina209 | 18 -- Documentation/hwmon/ina2xx | 39 +--- Documentation/hwmon/jc42 | 55 - Documentation/hwmon/lm95234 | 11 +++- Documentation/hwmon/ltc4261 | 16 +++-- Documentation/hwmon/max16065 | 24 +++- Documentation/hwmon/max6697 | 33 ++ Documentation/hwmon/nct6775 | 114 --- Documentation/hwmon/smm665 | 42 +++-- Documentation/hwmon/tmp401 | 30 - 10 files changed, 328 insertions(+), 54 deletions(-) diff --git a/Documentation/hwmon/ina209 b/Documentation/hwmon/ina209 index 672501de4509..64322075a145 100644 --- a/Documentation/hwmon/ina209 +++ b/Documentation/hwmon/ina209 @@ -1,16 +1,21 @@ Kernel driver ina209 -= + Supported chips: + * Burr-Brown / Texas Instruments INA209 + Prefix: 'ina209' + Addresses scanned: - + Datasheet: -http://www.ti.com/lit/gpn/ina209 + http://www.ti.com/lit/gpn/ina209 -Author: Paul Hays -Author: Ira W. Snyder -Author: Guenter Roeck +Author: + - Paul Hays + - Ira W. Snyder + - Guenter Roeck Description @@ -31,7 +36,7 @@ the I2C bus. See the datasheet for details. This tries to expose most monitoring features of the hardware via sysfs. It does not support every feature of this chip. - +=== === in0_input shunt voltage (mV) in0_input_highest shunt voltage historical maximum reading (mV) in0_input_lowest shunt voltage historical minimum reading (mV) @@ -70,6 +75,7 @@ curr1_input current measurement (mA) update_intervaldata conversion time; affects number of samples used to average results for shunt and bus voltages. +=== === General Remarks --- diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx index 0f36c021192d..95badf9c396f 100644 --- a/Documentation/hwmon/ina2xx +++ b/Documentation/hwmon/ina2xx @@ -2,35 +2,56 @@ Kernel driver ina2xx Supported chips: + * Texas Instruments INA219 + + Prefix: 'ina219' Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA220 + Prefix: 'ina220' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA226 + Prefix: 'ina226' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA230 + Prefix: 'ina230' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ * Texas Instruments INA231 + Prefix: 'ina231' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website - http://www.ti.com/ + + http://www.ti.com/ Author: Lothar Felten @@ -64,16 +85,20 @@ lower limit of the update_interval is 2 ms, the upper limit is 2253 ms. The actual programmed interval may vary from the desired value. General sysfs entries -- +- +=== === in0_input Shunt voltage(mV) channel in1_input Bus voltage(mV) channel curr1_inputCurrent(mA) measurement channel power1_input Power(uW) measurement channel shunt_resistor Shunt resistance(uOhm) channel +=== === Sysfs entries for ina226, ina230 and ina231 only -- + +=== update_intervaldata conversion time; affects number of samples used to average results for shunt and bus voltages. +=== diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42 index b4b671f22453..5b14b49bb6f7 100644 --- a/Documentation/hwmon/jc42 +++ b/Documentation/hwmon/jc42 @@ -2,53 +2,100 @@ Kernel driver jc42 == Supported chips: + * Analog Devices ADT7408 + Datasheets: + http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf + * Atmel AT30TS00,
[PATCH 16/21] docs: hwmon: da9052, da9055: convert to ReST format
Convert da9052 and da9055 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/da9052 | 40 ++ Documentation/hwmon/da9055 | 20 ++- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052 index 5bc51346b689..556e2778b9e5 100644 --- a/Documentation/hwmon/da9052 +++ b/Documentation/hwmon/da9052 @@ -1,6 +1,12 @@ +Kernel driver da9052 + + Supported chips: + * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs + Prefix: 'da9052' + Datasheet: Datasheet is not publicly available. Authors: David Dajun Chen @@ -15,17 +21,20 @@ different inputs. The track and hold circuit ensures stable input voltages at the input of the ADC during the conversion. The ADC is used to measure the following inputs: -Channel 0: VDDOUT - measurement of the system voltage -Channel 1: ICH - internal battery charger current measurement -Channel 2: TBAT - output from the battery NTC -Channel 3: VBAT - measurement of the battery voltage -Channel 4: ADC_IN4 - high impedance input (0 - 2.5V) -Channel 5: ADC_IN5 - high impedance input (0 - 2.5V) -Channel 6: ADC_IN6 - high impedance input (0 - 2.5V) -Channel 7: XY - TSI interface to measure the X and Y voltage of the touch - screen resistive potentiometers -Channel 8: Internal Tjunc. - sense (internal temp. sensor) -Channel 9: VBBAT - measurement of the backup battery voltage + += === +Channel 0 VDDOUT - measurement of the system voltage +Channel 1 ICH - internal battery charger current measurement +Channel 2 TBAT - output from the battery NTC +Channel 3 VBAT - measurement of the battery voltage +Channel 4 ADC_IN4 - high impedance input (0 - 2.5V) +Channel 5 ADC_IN5 - high impedance input (0 - 2.5V) +Channel 6 ADC_IN6 - high impedance input (0 - 2.5V) +Channel 7 XY - TSI interface to measure the X and Y voltage of the touch + screen resistive potentiometers +Channel 8 Internal Tjunc. - sense (internal temp. sensor) +Channel 9 VBBAT - measurement of the backup battery voltage += === By using sysfs attributes we can measure the system voltage VDDOUT, the battery charging current ICH, battery temperature TBAT, battery junction temperature @@ -37,12 +46,15 @@ Voltage Monitoring Voltages are sampled by a 10 bit ADC. The battery voltage is calculated as: + Milli volt = ((ADC value * 1000) / 512) + 2500 The backup battery voltage is calculated as: + Milli volt = (ADC value * 2500) / 512; The voltages on ADC channels 4, 5 and 6 are calculated as: + Milli volt = (ADC value * 2500) / 1023 Temperature Monitoring @@ -52,10 +64,14 @@ Temperatures are sampled by a 10 bit ADC. Junction and battery temperatures are monitored by the ADC channels. The junction temperature is calculated: + Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8 + The junction temperature attribute is supported by the driver. The battery temperature is calculated: - Degree Celsius = 1 / (t1 + 1/298)- 273 + + Degree Celsius = 1 / (t1 + 1/298) - 273 + where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255)) Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively. diff --git a/Documentation/hwmon/da9055 b/Documentation/hwmon/da9055 index 855c3f536e00..beae271a3312 100644 --- a/Documentation/hwmon/da9055 +++ b/Documentation/hwmon/da9055 @@ -1,6 +1,11 @@ +Kernel driver da9055 + + Supported chips: * Dialog Semiconductors DA9055 PMIC + Prefix: 'da9055' + Datasheet: Datasheet is not publicly available. Authors: David Dajun Chen @@ -15,11 +20,12 @@ different inputs. The track and hold circuit ensures stable input voltages at the input of the ADC during the conversion. The ADC is used to measure the following inputs: -Channel 0: VDDOUT - measurement of the system voltage -Channel 1: ADC_IN1 - high impedance input (0 - 2.5V) -Channel 2: ADC_IN2 - high impedance input (0 - 2.5V) -Channel 3: ADC_IN3 - high impedance input (0 - 2.5V) -Channel 4: Internal Tjunc. - sense (internal temp. sensor) + +- Channel 0: VDDOUT - measurement of the system voltage +- Channel 1: ADC_IN1 - high impedance input (0 - 2.5V) +- Channel 2: ADC_IN2 - high impedance input (0 - 2.5V) +- Channel 3: ADC_IN3 - high impedance input (0 - 2.5V) +- Channel 4: Internal Tjunc. - sense (internal temp. sensor) By using sysfs attributes we can measure the system voltage VDDOUT, chip junction temperature and auxiliary channels voltages. @@ -31,9 +37,11 @@ Voltages are sampled in a AUTO mode it can be manually sampled too and results are stored in a 10 bit ADC. The system voltage is calculated as: + Milli volt = ((ADC value * 1000) / 85) + 2500
[PATCH 11/21] docs: hwmon: ibmpowernv: convert to ReST format
Convert ibmpowernv to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/ibmpowernv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/hwmon/ibmpowernv b/Documentation/hwmon/ibmpowernv index 56468258711f..3f1feae3901c 100644 --- a/Documentation/hwmon/ibmpowernv +++ b/Documentation/hwmon/ibmpowernv @@ -2,6 +2,7 @@ Kernel Driver IBMPOWERNV Supported systems: + * Any recent IBM P servers based on POWERNV platform Author: Neelesh Gupta @@ -29,6 +30,7 @@ CONFIG_SENSORS_IBMPOWERNV. It can also be built as module 'ibmpowernv'. Sysfs attributes +=== === fanX_input Measured RPM value. fanX_min Threshold RPM for alert generation. fanX_fault 0: No fail condition @@ -78,3 +80,4 @@ currX_enable Enable/disable all current sensors belonging to the 0: Disable energyX_input Cumulative energy (microJoule) +=== === -- 2.20.1
[PATCH 18/21] docs: hwmon: pmbus files: convert to ReST format
Convert pmbus files to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/adm1275| 26 Documentation/hwmon/ibm-cffps | 3 + Documentation/hwmon/ir35221| 12 +- Documentation/hwmon/lm25066| 30 Documentation/hwmon/ltc2978| 267 + Documentation/hwmon/ltc3815| 12 +- Documentation/hwmon/max16064 | 15 +- Documentation/hwmon/max20751 | 7 + Documentation/hwmon/max31785 | 6 + Documentation/hwmon/max34440 | 88 +-- Documentation/hwmon/max8688| 18 ++- Documentation/hwmon/pmbus | 90 +++ Documentation/hwmon/pmbus-core | 173 - Documentation/hwmon/tps40422 | 23 ++- Documentation/hwmon/ucd9000| 31 ++-- Documentation/hwmon/ucd9200| 42 -- Documentation/hwmon/zl6100 | 69 - 17 files changed, 685 insertions(+), 227 deletions(-) diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275 index 5e277b0d91ce..5c5860011d6e 100644 --- a/Documentation/hwmon/adm1275 +++ b/Documentation/hwmon/adm1275 @@ -2,29 +2,53 @@ Kernel driver adm1275 = Supported chips: + * Analog Devices ADM1075 + Prefix: 'adm1075' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1075.pdf + * Analog Devices ADM1272 + Prefix: 'adm1272' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1272.pdf + * Analog Devices ADM1275 + Prefix: 'adm1275' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1275.pdf + * Analog Devices ADM1276 + Prefix: 'adm1276' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf + * Analog Devices ADM1278 + Prefix: 'adm1278' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1278.pdf + * Analog Devices ADM1293/ADM1294 + Prefix: 'adm1293', 'adm1294' + Addresses scanned: - + Datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/ADM1293_1294.pdf Author: Guenter Roeck @@ -75,6 +99,7 @@ Sysfs entries The following attributes are supported. Limits are read-write, history reset attributes are write-only, all other attributes are read-only. +=== === inX_label "vin1" or "vout1" depending on chip variant and configuration. On ADM1075, ADM1293, and ADM1294, vout1 reports the voltage on the VAUX pin. @@ -120,3 +145,4 @@ temp1_reset_history Write any value to reset history. Temperature attributes are supported on ADM1272 and ADM1278. +=== === diff --git a/Documentation/hwmon/ibm-cffps b/Documentation/hwmon/ibm-cffps index e05ecd8ecfcf..52e74e39463a 100644 --- a/Documentation/hwmon/ibm-cffps +++ b/Documentation/hwmon/ibm-cffps @@ -2,6 +2,7 @@ Kernel driver ibm-cffps === Supported chips: + * IBM Common Form Factor power supply Author: Eddie James @@ -24,6 +25,7 @@ Sysfs entries The following attributes are supported: +=== == curr1_alarmOutput current over-current alarm. curr1_inputMeasured output current in mA. curr1_label"iout1" @@ -52,3 +54,4 @@ temp2_alarm Secondary rectifier temp over-temperature alarm. temp2_inputMeasured secondary rectifier temp in millidegrees C. temp3_alarmORing FET temperature over-temperature alarm. temp3_inputMeasured ORing FET temperature in millidegrees C. +=== == diff --git a/Documentation/hwmon/ir35221 b/Documentation/hwmon/ir35221 index f7e112752c04..4e757a766177 100644 --- a/Documentation/hwmon/ir35221 +++ b/Documentation/hwmon/ir35221 @@ -2,9 +2,13 @@ Kernel driver ir35221 = Supported chips: + * Infinion IR35221 + Prefix: 'ir35221' + Addresses scanned: - + Datasheet: Datasheet is not publicly available. Author: Samuel Mendoza-Jonas @@ -23,15 +27,16 @@ This driver does not probe for PMBus devices. You will have to instantiate devices explicitly. Example: the following commands will load the driver for an IR35221 -at address 0x70 on I2C bus #4: +at address 0x70 on I2C bus #4:: -# modprobe ir35221 -# echo ir35221 0x70 > /sys/bus/i2c/devices/i2c-4/new_device + # modprobe ir35221 + # echo ir35221 0x70 > /sys/bus/i2c/devices/i2c-4/new_device Sysfs attributes +===
[PATCH 14/21] docs: hwmon: dme1737, vt1211: convert to ReST format
Convert dme1737 and vt1211 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/dme1737 | 88 ++--- Documentation/hwmon/vt1211 | 84 +-- 2 files changed, 114 insertions(+), 58 deletions(-) diff --git a/Documentation/hwmon/dme1737 b/Documentation/hwmon/dme1737 index 4d2935145a1c..82fcbc6b2b43 100644 --- a/Documentation/hwmon/dme1737 +++ b/Documentation/hwmon/dme1737 @@ -2,21 +2,37 @@ Kernel driver dme1737 = Supported chips: + * SMSC DME1737 and compatibles (like Asus A8000) + Prefix: 'dme1737' + Addresses scanned: I2C 0x2c, 0x2d, 0x2e + Datasheet: Provided by SMSC upon request and under NDA + * SMSC SCH3112, SCH3114, SCH3116 + Prefix: 'sch311x' + Addresses scanned: none, address read from Super-I/O config space + Datasheet: Available on the Internet + * SMSC SCH5027 + Prefix: 'sch5027' + Addresses scanned: I2C 0x2c, 0x2d, 0x2e + Datasheet: Provided by SMSC upon request and under NDA + * SMSC SCH5127 + Prefix: 'sch5127' + Addresses scanned: none, address read from Super-I/O config space + Datasheet: Provided by SMSC upon request and under NDA Authors: @@ -26,11 +42,14 @@ Authors: Module Parameters - -* force_start: boolEnables the monitoring of voltage, fan and temp inputs +* force_start: bool + Enables the monitoring of voltage, fan and temp inputs and PWM output control functions. Using this parameter shouldn't be required since the BIOS usually takes care of this. -* probe_all_addr: bool Include non-standard LPC addresses 0x162e and 0x164e + +* probe_all_addr: bool + Include non-standard LPC addresses 0x162e and 0x164e when probing for ISA devices. This is required for the following boards: - VIA EPIA SN18000 @@ -70,7 +89,8 @@ scaling resistors. The values returned by the driver therefore reflect true millivolts and don't need scaling. The voltage inputs are mapped as follows (the last column indicates the input ranges): -DME1737, A8000: +DME1737, A8000:: + in0: +5VTR (+5V standby) 0V - 6.64V in1: Vccp (processor core)0V - 3V in2: VCC(internal +3.3V)0V - 4.38V @@ -79,7 +99,8 @@ DME1737, A8000: in5: VTR(+3.3V standby) 0V - 4.38V in6: Vbat (+3.0V) 0V - 4.38V -SCH311x: +SCH311x:: + in0: +2.5V 0V - 3.32V in1: Vccp (processor core)0V - 2V in2: VCC(internal +3.3V)0V - 4.38V @@ -88,7 +109,8 @@ SCH311x: in5: VTR(+3.3V standby) 0V - 4.38V in6: Vbat (+3.0V) 0V - 4.38V -SCH5027: +SCH5027:: + in0: +5VTR (+5V standby) 0V - 6.64V in1: Vccp (processor core)0V - 3V in2: VCC(internal +3.3V)0V - 4.38V @@ -97,7 +119,8 @@ SCH5027: in5: VTR(+3.3V standby) 0V - 4.38V in6: Vbat (+3.0V) 0V - 4.38V -SCH5127: +SCH5127:: + in0: +2.5 0V - 3.32V in1: Vccp (processor core)0V - 3V in2: VCC(internal +3.3V)0V - 4.38V @@ -119,7 +142,7 @@ Celsius. The chip also features offsets for all 3 temperature inputs which - when programmed - get added to the input readings. The chip does all the scaling by itself and the driver therefore reports true temperatures that don't need any user-space adjustments. The temperature inputs are mapped as follows -(the last column indicates the input ranges): +(the last column indicates the input ranges):: temp1: Remote diode 1 (3904 type) temperature -127C - +127C temp2: DME1737 internal temperature -127C - +127C @@ -171,6 +194,7 @@ pwm[1-3]_auto_pwm_min, respectively. The thermal thresholds of the zones are programmed via zone[1-3]_auto_point[1-3]_temp and zone[1-3]_auto_point1_temp_hyst: + === === pwm[1-3]_auto_point2_pwmfull-speed duty-cycle (255, i.e., 100%) pwm[1-3]_auto_point1_pwmlow-speed duty-cycle pwm[1-3]_auto_pwm_min min-speed duty-cycle @@ -179,6 +203,7 @@ zone[1-3]_auto_point1_temp_hyst: zone[1-3]_auto_point2_temp full-speed temp zone[1-3]_auto_point1_temp low-speed temp zone[1-3]_auto_point1_temp_hyst min-speed temp + === === The chip adjusts the output duty-cycle linearly in the range of auto_point1_pwm to
[PATCH 00/21] Convert hwmon documentation to ReST
This series converts the contents of Documentation/hwmon to ReST format. PS.: I opted to group the conversion files per groups of maintainer set, as, if I were to generate one patch per file, it would give around 160 patches. I also added those patches to my development tree at: https://git.linuxtv.org/mchehab/experimental.git/log/?h=hwmon If you want to see the results, they're at: https://www.infradead.org/~mchehab/hwmon/ Mauro Carvalho Chehab (21): docs: hwmon: k10temp: convert to ReST format docs: hwmon: vexpress: convert to ReST format docs: hwmon: menf21bmc: convert to ReST format docs: hwmon: sch5627: convert to ReST format docs: hwmon: emc2103: convert to ReST format docs: hwmon: pc87360: convert to ReST format docs: hwmon: fam15h_power: convert to ReST format docs: hwmon: w83791d: convert to ReST format docs: hwmon: coretemp: convert to ReST format docs: hwmon: aspeed-pwm-tacho: convert to ReST format docs: hwmon: ibmpowernv: convert to ReST format docs: hwmon: asc7621: convert to ReST format docs: hwmon: ads1015: convert to ReST format docs: hwmon: dme1737, vt1211: convert to ReST format docs: hwmon: wm831x, wm8350: convert to ReST format docs: hwmon: da9052, da9055: convert to ReST format docs: hwmon: k8temp, w83793: convert to ReST format docs: hwmon: pmbus files: convert to ReST format docs: hwmon: misc files: convert to ReST format docs: hwmon: convert remaining files to ReST format docs: hwmon: Add an index file and rename docs to *.rst .../devicetree/bindings/hwmon/g762.txt| 2 +- Documentation/hwmon/{ab8500 => ab8500.rst}| 10 +- Documentation/hwmon/abituguru | 92 --- ...guru-datasheet => abituguru-datasheet.rst} | 160 ++-- Documentation/hwmon/abituguru.rst | 113 +++ .../hwmon/{abituguru3 => abituguru3.rst} | 36 +- Documentation/hwmon/{abx500 => abx500.rst}| 8 +- ...{acpi_power_meter => acpi_power_meter.rst} | 25 +- Documentation/hwmon/{ad7314 => ad7314.rst}| 9 + .../hwmon/{adc128d818 => adc128d818.rst} | 7 +- Documentation/hwmon/{adm1021 => adm1021.rst} | 44 +- Documentation/hwmon/{adm1025 => adm1025.rst} | 13 +- Documentation/hwmon/{adm1026 => adm1026.rst} | 24 +- Documentation/hwmon/{adm1031 => adm1031.rst} | 16 +- Documentation/hwmon/{adm1275 => adm1275.rst} | 30 +- Documentation/hwmon/{adm9240 => adm9240.rst} | 50 +- Documentation/hwmon/{ads1015 => ads1015.rst} | 72 +- Documentation/hwmon/{ads7828 => ads7828.rst} | 29 +- Documentation/hwmon/{adt7410 => adt7410.rst} | 49 +- Documentation/hwmon/{adt7411 => adt7411.rst} | 20 +- Documentation/hwmon/{adt7462 => adt7462.rst} | 10 +- Documentation/hwmon/{adt7470 => adt7470.rst} | 8 +- Documentation/hwmon/{adt7475 => adt7475.rst} | 38 +- Documentation/hwmon/{amc6821 => amc6821.rst} | 19 +- Documentation/hwmon/{asb100 => asb100.rst}| 50 +- Documentation/hwmon/{asc7621 => asc7621.rst} | 146 ++-- ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} | 2 + .../hwmon/{coretemp => coretemp.rst} | 46 +- Documentation/hwmon/{da9052 => da9052.rst}| 40 +- Documentation/hwmon/{da9055 => da9055.rst}| 20 +- Documentation/hwmon/{dme1737 => dme1737.rst} | 88 ++- Documentation/hwmon/{ds1621 => ds1621.rst}| 154 ++-- Documentation/hwmon/{ds620 => ds620.rst} | 12 +- Documentation/hwmon/{emc1403 => emc1403.rst} | 33 +- Documentation/hwmon/{emc2103 => emc2103.rst} | 6 +- .../hwmon/{emc6w201 => emc6w201.rst} | 5 + Documentation/hwmon/{f71805f => f71805f.rst} | 36 +- .../hwmon/{f71882fg => f71882fg.rst} | 56 +- .../hwmon/{fam15h_power => fam15h_power.rst} | 85 ++- .../hwmon/{ftsteutates => ftsteutates.rst}| 14 +- Documentation/hwmon/{g760a => g760a.rst} | 4 + Documentation/hwmon/{g762 => g762.rst}| 67 +- Documentation/hwmon/{gl518sm => gl518sm.rst} | 21 +- Documentation/hwmon/{hih6130 => hih6130.rst} | 14 +- ...on-kernel-api.txt => hwmon-kernel-api.rst} | 298 .../hwmon/{ibm-cffps => ibm-cffps.rst}| 3 + Documentation/hwmon/{ibmaem => ibmaem.rst}| 10 +- .../hwmon/{ibmpowernv => ibmpowernv.rst} | 3 + Documentation/hwmon/{ina209 => ina209.rst}| 18 +- Documentation/hwmon/{ina2xx => ina2xx.rst}| 41 +- Documentation/hwmon/{ina3221 => ina3221.rst} | 17 +- Documentation/hwmon/index.rst | 179 + Documentation/hwmon/{ir35221 => ir35221.rst} | 12 +- Documentation/hwmon/{it87 => it87.rst}| 102 ++- Documentation/hwmon/{jc42 => jc42.rst}| 55 +- Documentation/hwmon/{k10temp => k10temp.rst} | 37 +- Documentation/hwmon/{k8temp => k8temp.rst}| 17 +- .../hwmon/{lineage-pem => lineage-pem.rst}| 16 +- Documentation/hwmon/{lm25066 => lm25066.rst} | 32 +- Documentation/hwmon/{lm63 => lm63.rst}| 24 +- Documentation/hwmon/{lm70 => lm70.rst}| 13 +- Documentation/hwmon/{lm73 =>
[PATCH 21/21] docs: hwmon: Add an index file and rename docs to *.rst
Now that all files were converted to ReST format, rename them and add an index. Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/hwmon/g762.txt| 2 +- Documentation/hwmon/{ab8500 => ab8500.rst}| 2 +- ...guru-datasheet => abituguru-datasheet.rst} | 0 .../hwmon/{abituguru => abituguru.rst}| 0 .../hwmon/{abituguru3 => abituguru3.rst} | 0 Documentation/hwmon/{abx500 => abx500.rst}| 0 ...{acpi_power_meter => acpi_power_meter.rst} | 2 +- Documentation/hwmon/{ad7314 => ad7314.rst}| 0 .../hwmon/{adc128d818 => adc128d818.rst} | 0 Documentation/hwmon/{adm1021 => adm1021.rst} | 0 Documentation/hwmon/{adm1025 => adm1025.rst} | 0 Documentation/hwmon/{adm1026 => adm1026.rst} | 0 Documentation/hwmon/{adm1031 => adm1031.rst} | 0 Documentation/hwmon/{adm1275 => adm1275.rst} | 4 +- Documentation/hwmon/{adm9240 => adm9240.rst} | 0 Documentation/hwmon/{ads1015 => ads1015.rst} | 0 Documentation/hwmon/{ads7828 => ads7828.rst} | 0 Documentation/hwmon/{adt7410 => adt7410.rst} | 0 Documentation/hwmon/{adt7411 => adt7411.rst} | 0 Documentation/hwmon/{adt7462 => adt7462.rst} | 0 Documentation/hwmon/{adt7470 => adt7470.rst} | 0 Documentation/hwmon/{adt7475 => adt7475.rst} | 0 Documentation/hwmon/{amc6821 => amc6821.rst} | 0 Documentation/hwmon/{asb100 => asb100.rst}| 0 Documentation/hwmon/{asc7621 => asc7621.rst} | 0 ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} | 0 .../hwmon/{coretemp => coretemp.rst} | 0 Documentation/hwmon/{da9052 => da9052.rst}| 0 Documentation/hwmon/{da9055 => da9055.rst}| 0 Documentation/hwmon/{dme1737 => dme1737.rst} | 0 Documentation/hwmon/{ds1621 => ds1621.rst}| 0 Documentation/hwmon/{ds620 => ds620.rst} | 0 Documentation/hwmon/{emc1403 => emc1403.rst} | 0 Documentation/hwmon/{emc2103 => emc2103.rst} | 0 .../hwmon/{emc6w201 => emc6w201.rst} | 0 Documentation/hwmon/{f71805f => f71805f.rst} | 0 .../hwmon/{f71882fg => f71882fg.rst} | 0 .../hwmon/{fam15h_power => fam15h_power.rst} | 0 .../hwmon/{ftsteutates => ftsteutates.rst}| 0 Documentation/hwmon/{g760a => g760a.rst} | 0 Documentation/hwmon/{g762 => g762.rst}| 2 +- Documentation/hwmon/{gl518sm => gl518sm.rst} | 0 Documentation/hwmon/{hih6130 => hih6130.rst} | 0 ...on-kernel-api.txt => hwmon-kernel-api.rst} | 4 +- .../hwmon/{ibm-cffps => ibm-cffps.rst}| 0 Documentation/hwmon/{ibmaem => ibmaem.rst}| 0 .../hwmon/{ibmpowernv => ibmpowernv.rst} | 0 Documentation/hwmon/{ina209 => ina209.rst}| 0 Documentation/hwmon/{ina2xx => ina2xx.rst}| 2 +- Documentation/hwmon/{ina3221 => ina3221.rst} | 0 Documentation/hwmon/index.rst | 179 ++ Documentation/hwmon/{ir35221 => ir35221.rst} | 0 Documentation/hwmon/{it87 => it87.rst}| 0 Documentation/hwmon/{jc42 => jc42.rst}| 0 Documentation/hwmon/{k10temp => k10temp.rst} | 0 Documentation/hwmon/{k8temp => k8temp.rst}| 0 .../hwmon/{lineage-pem => lineage-pem.rst}| 0 Documentation/hwmon/{lm25066 => lm25066.rst} | 2 +- Documentation/hwmon/{lm63 => lm63.rst}| 0 Documentation/hwmon/{lm70 => lm70.rst}| 0 Documentation/hwmon/{lm73 => lm73.rst}| 0 Documentation/hwmon/{lm75 => lm75.rst}| 0 Documentation/hwmon/{lm77 => lm77.rst}| 0 Documentation/hwmon/{lm78 => lm78.rst}| 0 Documentation/hwmon/{lm80 => lm80.rst}| 0 Documentation/hwmon/{lm83 => lm83.rst}| 0 Documentation/hwmon/{lm85 => lm85.rst}| 0 Documentation/hwmon/{lm87 => lm87.rst}| 0 Documentation/hwmon/{lm90 => lm90.rst}| 0 Documentation/hwmon/{lm92 => lm92.rst}| 0 Documentation/hwmon/{lm93 => lm93.rst}| 0 Documentation/hwmon/{lm95234 => lm95234.rst} | 0 Documentation/hwmon/{lm95245 => lm95245.rst} | 0 Documentation/hwmon/{ltc2945 => ltc2945.rst} | 0 Documentation/hwmon/{ltc2978 => ltc2978.rst} | 0 Documentation/hwmon/{ltc2990 => ltc2990.rst} | 0 Documentation/hwmon/{ltc3815 => ltc3815.rst} | 0 Documentation/hwmon/{ltc4151 => ltc4151.rst} | 0 Documentation/hwmon/{ltc4215 => ltc4215.rst} | 0 Documentation/hwmon/{ltc4245 => ltc4245.rst} | 0 Documentation/hwmon/{ltc4260 => ltc4260.rst} | 0 Documentation/hwmon/{ltc4261 => ltc4261.rst} | 0 .../hwmon/{max16064 => max16064.rst} | 2 +- .../hwmon/{max16065 => max16065.rst} | 0 Documentation/hwmon/{max1619 => max1619.rst} | 0 Documentation/hwmon/{max1668 => max1668.rst} | 0 Documentation/hwmon/{max197 => max197.rst}| 0 .../hwmon/{max20751 => max20751.rst} | 2 +- .../hwmon/{max31722 => max31722.rst} | 0 .../hwmon/{max31785 => max31785.rst} | 0 .../hwmon/{max31790 => max31790.rst} | 0
[PATCH 03/21] docs: hwmon: menf21bmc: convert to ReST format
Convert menf21bmc to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/menf21bmc | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/hwmon/menf21bmc b/Documentation/hwmon/menf21bmc index 2a273a065c5e..1f0c6b2235ab 100644 --- a/Documentation/hwmon/menf21bmc +++ b/Documentation/hwmon/menf21bmc @@ -2,8 +2,11 @@ Kernel driver menf21bmc_hwmon = Supported chips: + * MEN 14F021P00 + Prefix: 'menf21bmc_hwmon' + Adresses scanned: - Author: Andreas Werner @@ -34,6 +37,7 @@ Sysfs entries The following attributes are supported. All attributes are read only The Limits are read once by the driver. +=== == in0_input +3.3V input voltage in1_input +5.0V input voltage in2_input +12.0V input voltage @@ -48,3 +52,4 @@ in1_label "MON_5V" in2_label "MON_12V" in3_label "5V_STANDBY" in4_label "VBAT" +=== == -- 2.20.1
[PATCH 04/21] docs: hwmon: sch5627: convert to ReST format
Convert sch5627 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/sch5627 | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627 index 0551d266c51c..187682e99114 100644 --- a/Documentation/hwmon/sch5627 +++ b/Documentation/hwmon/sch5627 @@ -2,9 +2,13 @@ Kernel driver sch5627 = Supported chips: + * SMSC SCH5627 + Prefix: 'sch5627' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Application Note available upon request Author: Hans de Goede -- 2.20.1
[PATCH v2 2/2] hwmon: OCC drivers are ARM-only
These drivers are for a BMC inside PowerPC servers. The BMC runs on ARM hardware, so only propose the drivers on this architecture, unless build-testing. Signed-off-by: Jean Delvare Cc: Eddie James Cc: Guenter Roeck --- If PowerPC BMCs are ever based on another architecture and these drivers are compatible with them, then the list can be extended. drivers/hwmon/occ/Kconfig |2 ++ 1 file changed, 2 insertions(+) --- linux-5.0.orig/drivers/hwmon/occ/Kconfig2019-04-10 11:54:07.014895111 +0200 +++ linux-5.0/drivers/hwmon/occ/Kconfig 2019-04-10 12:12:27.379725640 +0200 @@ -5,6 +5,7 @@ config SENSORS_OCC_P8_I2C tristate "POWER8 OCC through I2C" depends on I2C + depends on ARM || ARM64 || COMPILE_TEST select SENSORS_OCC help This option enables support for monitoring sensors provided by the @@ -17,6 +18,7 @@ config SENSORS_OCC_P8_I2C config SENSORS_OCC_P9_SBE tristate "POWER9 OCC through SBE" depends on FSI_OCC + depends on ARM || ARM64 || COMPILE_TEST select SENSORS_OCC help This option enables support for monitoring sensors provided by the -- Jean Delvare SUSE L3 Support
[PATCH v2 1/2] hwmon: (occ) Move common code to a separate module
Instead of duplicating the common code into the 2 (binary) drivers, move the common code to a separate module. This is cleaner. Signed-off-by: Jean Delvare Cc: Eddie James Cc: Guenter Roeck --- Eddie, can you please give it a try and confirm it works? Note: I kept the module names as they were before, hence the extra "*-objs :=" statements. They could be removed if we rename the source files, but that's better done in git directly. I don't mind either way personally. drivers/hwmon/occ/Kconfig |3 +-- drivers/hwmon/occ/Makefile |6 -- drivers/hwmon/occ/common.c |7 +++ drivers/hwmon/occ/sysfs.c |2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) --- linux-5.0.orig/drivers/hwmon/occ/Kconfig2019-04-10 11:30:05.579537638 +0200 +++ linux-5.0/drivers/hwmon/occ/Kconfig 2019-04-10 11:31:20.843383376 +0200 @@ -27,5 +27,4 @@ config SENSORS_OCC_P9_SBE called occ-p9-hwmon. config SENSORS_OCC - bool "POWER On-Chip Controller" - depends on SENSORS_OCC_P8_I2C || SENSORS_OCC_P9_SBE + tristate --- linux-5.0.orig/drivers/hwmon/occ/Makefile 2019-03-04 00:21:29.0 +0100 +++ linux-5.0/drivers/hwmon/occ/Makefile2019-04-10 11:33:23.631765535 +0200 @@ -1,5 +1,7 @@ -occ-p8-hwmon-objs := common.o sysfs.o p8_i2c.o -occ-p9-hwmon-objs := common.o sysfs.o p9_sbe.o +occ-hwmon-common-objs := common.o sysfs.o +occ-p8-hwmon-objs := p8_i2c.o +occ-p9-hwmon-objs := p9_sbe.o +obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o --- linux-5.0.orig/drivers/hwmon/occ/common.c 2019-03-04 00:21:29.0 +0100 +++ linux-5.0/drivers/hwmon/occ/common.c2019-04-10 11:44:53.035573580 +0200 @@ -1,11 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include #include #include +#include #include #include #include @@ -1096,3 +1098,8 @@ int occ_setup(struct occ *occ, const cha return rc; } +EXPORT_SYMBOL_GPL(occ_setup); + +MODULE_AUTHOR("Eddie James "); +MODULE_DESCRIPTION("Common OCC hwmon code"); +MODULE_LICENSE("GPL"); --- linux-5.0.orig/drivers/hwmon/occ/sysfs.c2019-03-04 00:21:29.0 +0100 +++ linux-5.0/drivers/hwmon/occ/sysfs.c 2019-04-10 11:39:38.627003382 +0200 @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -186,3 +187,4 @@ void occ_shutdown(struct occ *occ) { sysfs_remove_group(>bus_dev->kobj, _sysfs); } +EXPORT_SYMBOL_GPL(occ_shutdown); -- Jean Delvare SUSE L3 Support
Re: pmbus based power regulator
On 09. 04. 19 15:20, Guenter Roeck wrote: > On 4/9/19 5:56 AM, Michal Simek wrote: >> Hi, >> >> I have one question about hwmon/pmbus. I have tps544b25 on the board. I >> have enabled this chip via DT to get probed. Patch below. >> >> I can't see any issue with monitoring but I am curious how to enable >> setting up voltage. I expect this should be moved to regulator folder or >> better split done as MFD device. >> >> I see there wm831x-hwmon and also wm8350-hwmon but nothing with pmbus >> wiring. >> Can you please suggest a way how this should be done? >> > > Hit the wrong button with my earlier email. Please ignore. > > The pmbus core code does support for registering regulators. See > drivers/hwmon/pmbus/ltc2978.c for an example. You would have to write a > front-end driver for the TI chip to pass the necessary parameters to the > pmbus core. We could try to add generic regulator support to pmbus.c, but > I hesitate doing that because regulator support is much more critical than > monitoring code and may require chip specific workarounds. > > Sure, we could try to move the pmbus core code to mfd and try to split out > regulator and hwmon code from it. That would require moving the core plus > all front-end drivers. It would be a substantial effort with, as far as I > can see, little benefit. ok. It means use pmbus functions from pmbus_regulator_ops and add missing would be the way to go. const struct regulator_ops pmbus_regulator_ops = { .enable = pmbus_regulator_enable, .disable = pmbus_regulator_disable, .is_enabled = pmbus_regulator_is_enabled, }; The way how it is connected on the board is that power regulator has gpio pin for enabling/disabling and also monitoring feature. And this is just enabling power for different chip. Thanks, Michal