mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v6 2/5] hwmon: (core) Add support for humidity min/max alarm
Date: Fri, 2 Feb 2024 10:55:08 -0800	[thread overview]
Message-ID: <d4e8d58b-840b-4b7b-a7d9-ae8a4d1531ce@roeck-us.net> (raw)
In-Reply-To: <20240130-topic-chipcap2-v6-2-260bea05cf9b@gmail.com>

On Tue, Jan 30, 2024 at 10:06:45PM +0100, Javier Carrasco wrote:
> Add min_alarm and max_alarm attributes for humidityX to support devices
> that can generate these alarms.
> Such attributes already exist for other magnitudes such as tempX.
> 
> Tested with a ChipCap 2 temperature-humidity sensor.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/hwmon.c | 2 ++
>  include/linux/hwmon.h | 4 ++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
> index c7dd3f5b2bd5..b51d13f08d27 100644
> --- a/drivers/hwmon/hwmon.c
> +++ b/drivers/hwmon/hwmon.c
> @@ -586,6 +586,8 @@ static const char * const hwmon_humidity_attr_templates[] = {
>  	[hwmon_humidity_fault] = "humidity%d_fault",
>  	[hwmon_humidity_rated_min] = "humidity%d_rated_min",
>  	[hwmon_humidity_rated_max] = "humidity%d_rated_max",
> +	[hwmon_humidity_min_alarm] = "humidity%d_min_alarm",
> +	[hwmon_humidity_max_alarm] = "humidity%d_max_alarm",
>  };
>  
>  static const char * const hwmon_fan_attr_templates[] = {
> diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
> index 8cd6a6b33593..f553f8cd6946 100644
> --- a/include/linux/hwmon.h
> +++ b/include/linux/hwmon.h
> @@ -293,6 +293,8 @@ enum hwmon_humidity_attributes {
>  	hwmon_humidity_fault,
>  	hwmon_humidity_rated_min,
>  	hwmon_humidity_rated_max,
> +	hwmon_humidity_min_alarm,
> +	hwmon_humidity_max_alarm,
>  };
>  
>  #define HWMON_H_ENABLE			BIT(hwmon_humidity_enable)
> @@ -306,6 +308,8 @@ enum hwmon_humidity_attributes {
>  #define HWMON_H_FAULT			BIT(hwmon_humidity_fault)
>  #define HWMON_H_RATED_MIN		BIT(hwmon_humidity_rated_min)
>  #define HWMON_H_RATED_MAX		BIT(hwmon_humidity_rated_max)
> +#define HWMON_H_MIN_ALARM		BIT(hwmon_humidity_min_alarm)
> +#define HWMON_H_MAX_ALARM		BIT(hwmon_humidity_max_alarm)
>  
>  enum hwmon_fan_attributes {
>  	hwmon_fan_enable,

  reply	other threads:[~2024-02-02 18:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 21:06 [PATCH v6 0/5] hwmon: Add support for Amphenol ChipCap 2 Javier Carrasco
2024-01-30 21:06 ` [PATCH v6 1/5] dt-bindings: vendor-prefixes: add Amphenol Javier Carrasco
2024-02-02 18:54   ` Guenter Roeck
2024-01-30 21:06 ` [PATCH v6 2/5] hwmon: (core) Add support for humidity min/max alarm Javier Carrasco
2024-02-02 18:55   ` Guenter Roeck [this message]
2024-01-30 21:06 ` [PATCH v6 3/5] ABI: sysfs-class-hwmon: add descriptions for humidity min/max alarms Javier Carrasco
2024-02-02 18:55   ` Guenter Roeck
2024-01-30 21:06 ` [PATCH v6 4/5] dt-bindings: hwmon: Add Amphenol ChipCap 2 Javier Carrasco
2024-02-02 18:56   ` Guenter Roeck
2024-01-30 21:06 ` [PATCH v6 5/5] hwmon: Add support for " Javier Carrasco
2024-02-02 18:57   ` Guenter Roeck

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=d4e8d58b-840b-4b7b-a7d9-ae8a4d1531ce@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®