* [PATCH] hwmon: Add support for samples attributes
@ 2019-04-15 20:27 Guenter Roeck
2019-04-15 21:47 ` Nicolin Chen
0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-04-15 20:27 UTC (permalink / raw)
To: Hardware Monitoring
Cc: Jean Delvare, Guenter Roeck, Krzysztof Adamski, Nicolin Chen
Add support for the new samples attributes to the hwmon core.
Cc: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/hwmon/hwmon.c | 5 +++++
include/linux/hwmon.h | 11 +++++++++++
2 files changed, 16 insertions(+)
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index c22dc1e07911..cd91510a5387 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -324,6 +324,11 @@ static const char * const hwmon_chip_attrs[] = {
[hwmon_chip_power_reset_history] = "power_reset_history",
[hwmon_chip_update_interval] = "update_interval",
[hwmon_chip_alarms] = "alarms",
+ [hwmon_chip_samples] = "samples",
+ [hwmon_chip_curr_samples] = "curr_samples",
+ [hwmon_chip_in_samples] = "in_samples",
+ [hwmon_chip_power_samples] = "power_samples",
+ [hwmon_chip_temp_samples] = "temp_samples",
};
static const char * const hwmon_temp_attr_templates[] = {
diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
index 7a8cc06a0d61..7b18a6150a11 100644
--- a/include/linux/hwmon.h
+++ b/include/linux/hwmon.h
@@ -40,6 +40,12 @@ enum hwmon_chip_attributes {
hwmon_chip_register_tz,
hwmon_chip_update_interval,
hwmon_chip_alarms,
+ hwmon_chip_samples,
+ hwmon_chip_curr_samples,
+ hwmon_chip_in_samples,
+ hwmon_chip_power_samples,
+ hwmon_chip_temp_samples,
+
};
#define HWMON_C_TEMP_RESET_HISTORY BIT(hwmon_chip_temp_reset_history)
@@ -49,6 +55,11 @@ enum hwmon_chip_attributes {
#define HWMON_C_REGISTER_TZ BIT(hwmon_chip_register_tz)
#define HWMON_C_UPDATE_INTERVAL BIT(hwmon_chip_update_interval)
#define HWMON_C_ALARMS BIT(hwmon_chip_alarms)
+#define HWMON_C_SAMPLES BIT(hwmon_chip_samples)
+#define HWMON_C_CURR_SAMPLES BIT(hwmon_chip_curr_samples)
+#define HWMON_C_IN_SAMPLES BIT(hwmon_chip_in_samples)
+#define HWMON_C_POWER_SAMPLES BIT(hwmon_chip_power_samples)
+#define HWMON_C_TEMP_SAMPLES BIT(hwmon_chip_temp_samples)
enum hwmon_temp_attributes {
hwmon_temp_input = 0,
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hwmon: Add support for samples attributes
2019-04-15 20:27 [PATCH] hwmon: Add support for samples attributes Guenter Roeck
@ 2019-04-15 21:47 ` Nicolin Chen
2019-04-15 22:00 ` Guenter Roeck
0 siblings, 1 reply; 3+ messages in thread
From: Nicolin Chen @ 2019-04-15 21:47 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Hardware Monitoring, Jean Delvare, Krzysztof Adamski
Thanks for adding this.
On Mon, Apr 15, 2019 at 01:27:12PM -0700, Guenter Roeck wrote:
> Add support for the new samples attributes to the hwmon core.
>
> Cc: Krzysztof Adamski <krzysztof.adamski@nokia.com>
> Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Will redo my change and test through API later.
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/hwmon/hwmon.c | 5 +++++
> include/linux/hwmon.h | 11 +++++++++++
> 2 files changed, 16 insertions(+)
> diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
> index 7a8cc06a0d61..7b18a6150a11 100644
> --- a/include/linux/hwmon.h
> +++ b/include/linux/hwmon.h
> @@ -40,6 +40,12 @@ enum hwmon_chip_attributes {
> hwmon_chip_register_tz,
> hwmon_chip_update_interval,
> hwmon_chip_alarms,
> + hwmon_chip_samples,
> + hwmon_chip_curr_samples,
> + hwmon_chip_in_samples,
> + hwmon_chip_power_samples,
> + hwmon_chip_temp_samples,
> +
> };
Why add a blank line at the end?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hwmon: Add support for samples attributes
2019-04-15 21:47 ` Nicolin Chen
@ 2019-04-15 22:00 ` Guenter Roeck
0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2019-04-15 22:00 UTC (permalink / raw)
To: Nicolin Chen; +Cc: Hardware Monitoring, Jean Delvare, Krzysztof Adamski
On Mon, Apr 15, 2019 at 02:47:16PM -0700, Nicolin Chen wrote:
> Thanks for adding this.
>
> On Mon, Apr 15, 2019 at 01:27:12PM -0700, Guenter Roeck wrote:
> > Add support for the new samples attributes to the hwmon core.
> >
> > Cc: Krzysztof Adamski <krzysztof.adamski@nokia.com>
> > Cc: Nicolin Chen <nicoleotsuka@gmail.com>
>
> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
>
> Will redo my change and test through API later.
>
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > drivers/hwmon/hwmon.c | 5 +++++
> > include/linux/hwmon.h | 11 +++++++++++
> > 2 files changed, 16 insertions(+)
>
> > diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
> > index 7a8cc06a0d61..7b18a6150a11 100644
> > --- a/include/linux/hwmon.h
> > +++ b/include/linux/hwmon.h
> > @@ -40,6 +40,12 @@ enum hwmon_chip_attributes {
> > hwmon_chip_register_tz,
> > hwmon_chip_update_interval,
> > hwmon_chip_alarms,
> > + hwmon_chip_samples,
> > + hwmon_chip_curr_samples,
> > + hwmon_chip_in_samples,
> > + hwmon_chip_power_samples,
> > + hwmon_chip_temp_samples,
> > +
> > };
>
> Why add a blank line at the end?
No idea. I'll drop it. Thanks for having a look!
Guenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-15 22:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-15 20:27 [PATCH] hwmon: Add support for samples attributes Guenter Roeck
2019-04-15 21:47 ` Nicolin Chen
2019-04-15 22:00 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).