public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: jdelvare@suse.com, afd@ti.com, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] hwmon: (core) Add hwmon_in_enable attribute
Date: Sat, 6 Oct 2018 12:24:49 -0700	[thread overview]
Message-ID: <20181006192449.GA30010@roeck-us.net> (raw)
In-Reply-To: <20181005235905.29403-2-nicoleotsuka@gmail.com>

On Fri, Oct 05, 2018 at 04:59:04PM -0700, Nicolin Chen wrote:
> According to hwmon ABI, in%d_enable is a sysfs interface that
> allows user space to enable and disable the input sensor. So
> this patch just simply adds the attribute to the list.
> 
> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/hwmon.c | 1 +
>  include/linux/hwmon.h | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
> index 33d51281272b..ac1cdf88840f 100644
> --- a/drivers/hwmon/hwmon.c
> +++ b/drivers/hwmon/hwmon.c
> @@ -356,6 +356,7 @@ static const char * const hwmon_in_attr_templates[] = {
>  	[hwmon_in_max_alarm] = "in%d_max_alarm",
>  	[hwmon_in_lcrit_alarm] = "in%d_lcrit_alarm",
>  	[hwmon_in_crit_alarm] = "in%d_crit_alarm",
> +	[hwmon_in_enable] = "in%d_enable",
>  };
>  
>  static const char * const hwmon_curr_attr_templates[] = {
> diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
> index 9493d4a388db..99e0c1b0b5fb 100644
> --- a/include/linux/hwmon.h
> +++ b/include/linux/hwmon.h
> @@ -118,6 +118,7 @@ enum hwmon_in_attributes {
>  	hwmon_in_max_alarm,
>  	hwmon_in_lcrit_alarm,
>  	hwmon_in_crit_alarm,
> +	hwmon_in_enable,
>  };
>  
>  #define HWMON_I_INPUT		BIT(hwmon_in_input)
> @@ -135,6 +136,7 @@ enum hwmon_in_attributes {
>  #define HWMON_I_MAX_ALARM	BIT(hwmon_in_max_alarm)
>  #define HWMON_I_LCRIT_ALARM	BIT(hwmon_in_lcrit_alarm)
>  #define HWMON_I_CRIT_ALARM	BIT(hwmon_in_crit_alarm)
> +#define HWMON_I_ENABLE		BIT(hwmon_in_enable)
>  
>  enum hwmon_curr_attributes {
>  	hwmon_curr_input,

  reply	other threads:[~2018-10-06 19:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05 23:59 [PATCH 0/2] hwmon: (ina3221) Apply _info API Nicolin Chen
2018-10-05 23:59 ` [PATCH 1/2] hwmon: (core) Add hwmon_in_enable attribute Nicolin Chen
2018-10-06 19:24   ` Guenter Roeck [this message]
2018-10-05 23:59 ` [PATCH 2/2] hwmon: (ina3221) Use _info API to register hwmon device Nicolin Chen
2018-10-06 20:05   ` Guenter Roeck
2018-10-07  7:07     ` Nicolin Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181006192449.GA30010@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=afd@ti.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicoleotsuka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox