Message ID | 20240130-topic-chipcap2-v6-2-260bea05cf9b@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-45316-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1496649dyb; Tue, 30 Jan 2024 13:07:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMDzPZUn4epVRx+Bs9jWTOXYO3fAgr5rqPkWR2UIj0xrAh8ffWgCCeqkGYEBKzW2KitLgc X-Received: by 2002:ad4:5f4c:0:b0:68c:5442:74 with SMTP id p12-20020ad45f4c000000b0068c54420074mr5479372qvg.20.1706648864570; Tue, 30 Jan 2024 13:07:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706648864; cv=pass; d=google.com; s=arc-20160816; b=Jzg/wVuXGyWRPFrnNY91PeHOml2R7uTvyA7jOCRWGv7RE0KeUz+PGzZl8azO26tZRf /yMTkMovD/J4G5+kfviOPghFrLbFJNuqIhyZCKlwZZQvXJumFKAMsR7/5Qi+q+32lYI0 cI6165dA0O639RnZHau/LQWH+pHqHVVSG4oWnL2hsBYFM48phlCnfK+7nR5AIFVvN3fJ gyN/0YHAKbFvcJOT4m7JZUyttUgn7wgS9RE2pTPfGwP5+P6erb8W8RUk/3oBZuHTbycz CSmKVhXhqprKONZ5RxLV+AtHtZUjGQohHiGE/Brzt63ll7z+sOMuAegZXaUZyjzTiPG7 IPsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=IQtvJUU+OqNUf9TfCmUtoX2TLTtaGeLRFukm+fQ1w2U=; fh=BhgptoEUHHIBEHgXVGG0kPFbmqQnYZSFfCxI4r2nG+I=; b=Mi3xEddZgAf8zdAg0pPTL9NiAN3RkOosgzq2oqZE9pzCLhtR1347rnH4idvwDojRR9 7USdMldJYCSYt5p0h9RzJJfycc/WDfPG5vZlPQzPg+y1fgZ7nA5wG4/C+q+0NGikuSTg nmQ60O7y/olnC4TRQW8Ji4aDTYn7v8IPaVqEtymwQE1iKsTvySDD+0CMmhUO993Oe2yN QQ8FpheDZStQONHjqUKMZtGJsYzIEt4EtkFYtT+5lDtpXmU2zxFnWkrSNWwUorPnrOnJ x9Sp2YtJDhHhVK3GujgdvnmWwb8ziFZDSs9EtxBB1DpyWFxsnlxqVb6u/nY7IA00c/OA s9NA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MYeLN6qN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-45316-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45316-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jn4-20020ad45de4000000b0068c67a1a985si885513qvb.380.2024.01.30.13.07.44 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 13:07:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45316-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MYeLN6qN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-45316-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45316-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5DBEE1C25218 for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 21:07:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C9EC71B52; Tue, 30 Jan 2024 21:06:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MYeLN6qN" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98EBA762DD; Tue, 30 Jan 2024 21:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706648816; cv=none; b=Bh3uZIiI0rkCCgoVRrDzMzB+q+V09rbuhDgyskfbd/E0ilSkbp5fGLyT8+QhPvvBxNjeK4lKessL7CX6Mln/hi+8O2xUPRMXKK0rd2QI/Ce8EVPVdYAibjHd1usYJghiJEFibk08Gy1+mrTvQKQhrXbZNUXIdkcJxonHs/aqgeA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706648816; c=relaxed/simple; bh=uLF/Qmue1+Wzk3XhIihfzQTCEXmbPTvk9jP+cW/SKMg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MxMUlQZiefJw0TQP2iWcgTzQnNg4yzUmATM53Hq3pzf4kuZmYlY0QbIagh4PYRak2YrEdaXpgmjAMLNoGTlFH7Zq6zY7CrYD/sLOyMDtiv2/7SgC2b9+c1e8CGMNVJPcXKTr5fpnOIrAWneaoBlvPXRUzswkV9G3MJyVz9kd1HQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MYeLN6qN; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a34c5ca2537so499045566b.0; Tue, 30 Jan 2024 13:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706648813; x=1707253613; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IQtvJUU+OqNUf9TfCmUtoX2TLTtaGeLRFukm+fQ1w2U=; b=MYeLN6qNjVVNybaJRV9FGYXqcsbFl/yr0Xz3BVO6n4UbecLHUpYtUn9/c4JDpjBVkk EjDTfZh9E0a2pvI/IBK3Fg9pX2aeUuieHVqHZa86RbC6Xs1QQqLr5cCaZl9S5LRB0dO9 z0MntVlI3oBxp6eVUdCqOC2MhdwYHeNupbZir/Yo/oWNxbLMrMkb2DJhHKK0DW9Ojqq0 OvXBOk0CQO2ztSiGO3Hn28bjWjbr2JrPaWuJI8NDwfbIUlSlfdqOUrjfd+d0zvCPj7Vt rThhsWL3x48uyNProxlNl1CwjFqPmMB2BVrWY63GPpUA8N4eOMtvhRV6X/P3aPwdbEh/ K5MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706648813; x=1707253613; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IQtvJUU+OqNUf9TfCmUtoX2TLTtaGeLRFukm+fQ1w2U=; b=F3dwt5kIxl3SZdugev3FoOUgyWb5QJJ/Zjpam5S7Y37tRXgbrk59+I5UMKn67BksGt IdFOmU2IP2J2wcrb4y88UloJRrzSZ8fsbMfB6ZfF5P8bNoheg2NfQYe0FP8TbSLB/K+X 08FO1Exh1Ycscga5uYEMh5xT5+yqTDyFKTUckrEeJY0oJSxrJgBDPuTZcOqejCfICyVW alzxrYgNuaxJRAiTjIyjZKIhS1c5OgzouynfCV4zSLwTIe67k8oFUUtRfkXRO5TaGlWw JzSBsy/pPczmJySWYXyIIH4yOIrfgtzGKOfm9B6050P1M6l0UU5EY1mYchstTZPLYy8Q ZFvQ== X-Gm-Message-State: AOJu0YxLST6uR1jEhOuZbwmi4RT2vIO45vBgAkoXI0SSry4RrIhz9lXa o4N8+J3QYmtpRmJrU8rPUrMGiNpfEUHclQ8ilWQyuQZzmEIm3zql X-Received: by 2002:a17:906:1703:b0:a28:2165:7c74 with SMTP id c3-20020a170906170300b00a2821657c74mr6714400eje.13.1706648812450; Tue, 30 Jan 2024 13:06:52 -0800 (PST) Received: from [127.0.1.1] (2a02-8389-41cf-e200-7400-ff68-7ab4-4169.cable.dynamic.v6.surfer.at. [2a02:8389:41cf:e200:7400:ff68:7ab4:4169]) by smtp.gmail.com with ESMTPSA id vv9-20020a170907a68900b00a354a5d2c39sm4177658ejc.31.2024.01.30.13.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 13:06:52 -0800 (PST) From: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Tue, 30 Jan 2024 22:06:45 +0100 Subject: [PATCH v6 2/5] hwmon: (core) Add support for humidity min/max alarm Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240130-topic-chipcap2-v6-2-260bea05cf9b@gmail.com> References: <20240130-topic-chipcap2-v6-0-260bea05cf9b@gmail.com> In-Reply-To: <20240130-topic-chipcap2-v6-0-260bea05cf9b@gmail.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, Jonathan Corbet <corbet@lwn.net>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org> Cc: Rob Herring <robh@kernel.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Javier Carrasco <javier.carrasco.cruz@gmail.com> X-Mailer: b4 0.13-dev-0434a X-Developer-Signature: v=1; a=ed25519-sha256; t=1706648808; l=1810; i=javier.carrasco.cruz@gmail.com; s=20230509; h=from:subject:message-id; bh=uLF/Qmue1+Wzk3XhIihfzQTCEXmbPTvk9jP+cW/SKMg=; b=Rw6EQWW4CWmGJ3m9Vp1Pt2qAtCMUx4XzR/QlV8oumy6at0oar4qK3QBRzng+inKt/Z1oYG3ID VYxEk5A8TEQDCtZQdVQnSHcvwqidbJiqEa6tbENi5lPscRlVarkpvwv X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789551039812061508 X-GMAIL-MSGID: 1789551039812061508 |
Series |
[v6,1/5] dt-bindings: vendor-prefixes: add Amphenol
|
|
Commit Message
Javier Carrasco
Jan. 30, 2024, 9:06 p.m. UTC
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>
---
drivers/hwmon/hwmon.c | 2 ++
include/linux/hwmon.h | 4 ++++
2 files changed, 6 insertions(+)
Comments
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,
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,