All of lore.kernel.org
 help / color / mirror / Atom feed
From: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
To: <jikos@kernel.org>, <benjamin.tissoires@redhat.com>,
	<jic23@kernel.org>, <lars@metafoo.de>,
	<srinivas.pandruvada@linux.intel.com>,
	<linux-input@vger.kernel.org>, <linux-iio@vger.kernel.org>
Cc: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Subject: [PATCH v2 2/9] iio: Add channel type light color temperature
Date: Tue, 19 Sep 2023 13:40:47 +0530	[thread overview]
Message-ID: <20230919081054.2050714-3-Basavaraj.Natikar@amd.com> (raw)
In-Reply-To: <20230919081054.2050714-1-Basavaraj.Natikar@amd.com>

In most cases, ambient color sensors also support light color
temperature, which is measured in kelvin. Thus, add channel type light
color temperature.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
---
 Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++
 drivers/iio/industrialio-core.c         | 1 +
 include/uapi/linux/iio/types.h          | 1 +
 tools/iio/iio_event_monitor.c           | 2 ++
 4 files changed, 11 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index a2854dc9a839..4cf7ed9ca57b 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -2179,3 +2179,10 @@ Contact:	linux-iio@vger.kernel.org
 Description:
 		Number of conditions that must occur, during a running
 		period, before an event is generated.
+
+What:		/sys/bus/iio/devices/iio:deviceX/in_colortemp_raw
+KernelVersion:	6.7
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Represents light color temperature, which measures light color
+		temperature in Kelvin.
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index d752e9c0499b..cba942cadf97 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -90,6 +90,7 @@ static const char * const iio_chan_type_name_spec[] = {
 	[IIO_POSITIONRELATIVE]  = "positionrelative",
 	[IIO_PHASE] = "phase",
 	[IIO_MASSCONCENTRATION] = "massconcentration",
+	[IIO_COLORTEMP] = "colortemp",
 };
 
 static const char * const iio_modifier_names[] = {
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index c79f2f046a0b..08c20e540c13 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -47,6 +47,7 @@ enum iio_chan_type {
 	IIO_POSITIONRELATIVE,
 	IIO_PHASE,
 	IIO_MASSCONCENTRATION,
+	IIO_COLORTEMP,
 };
 
 enum iio_modifier {
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index 0a5c2bb60030..a63741e43ddf 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -59,6 +59,7 @@ static const char * const iio_chan_type_name_spec[] = {
 	[IIO_POSITIONRELATIVE] = "positionrelative",
 	[IIO_PHASE] = "phase",
 	[IIO_MASSCONCENTRATION] = "massconcentration",
+	[IIO_COLORTEMP] = "colortemp",
 };
 
 static const char * const iio_ev_type_text[] = {
@@ -173,6 +174,7 @@ static bool event_is_known(struct iio_event_data *event)
 	case IIO_POSITIONRELATIVE:
 	case IIO_PHASE:
 	case IIO_MASSCONCENTRATION:
+	case IIO_COLORTEMP:
 		break;
 	default:
 		return false;
-- 
2.25.1


  parent reply	other threads:[~2023-09-19  8:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19  8:10 [PATCH v2 0/9] Support light color temperature and chromaticity Basavaraj Natikar
2023-09-19  8:10 ` [PATCH v2 1/9] iio: hid-sensor-als: Use channel index to support more hub attributes Basavaraj Natikar
2023-09-20 16:59   ` srinivas pandruvada
2023-09-19  8:10 ` Basavaraj Natikar [this message]
2023-09-19  8:10 ` [PATCH v2 3/9] iio: hid-sensor-als: Add light color temperature support Basavaraj Natikar
2023-09-20 17:00   ` srinivas pandruvada
2023-09-19  8:10 ` [PATCH v2 4/9] HID: amd_sfh: Add support for light color temperature Basavaraj Natikar
2023-09-20 15:25   ` Jiri Kosina
2023-09-19  8:10 ` [PATCH v2 5/9] HID: amd_sfh: Add support for SFH1.1 " Basavaraj Natikar
2023-09-20 15:25   ` Jiri Kosina
2023-09-19  8:10 ` [PATCH v2 6/9] iio: Add channel type for chromaticity Basavaraj Natikar
2023-09-24 12:31   ` Jonathan Cameron
2023-09-19  8:10 ` [PATCH v2 7/9] iio: hid-sensor-als: Add light chromaticity support Basavaraj Natikar
2023-09-20 17:10   ` srinivas pandruvada
2023-09-19  8:10 ` [PATCH v2 8/9] HID: amd_sfh: " Basavaraj Natikar
2023-09-20 15:25   ` Jiri Kosina
2023-09-19  8:10 ` [PATCH v2 9/9] HID: amd_sfh: Add light chromaticity for SFH1.1 Basavaraj Natikar
2023-09-20 15:26   ` Jiri Kosina
2023-09-20 14:13 ` [PATCH v2 0/9] Support light color temperature and chromaticity Jiri Kosina
2023-09-20 15:23   ` Basavaraj Natikar
2023-09-24 12:42     ` Jonathan Cameron
2023-09-24 14:20       ` Basavaraj Natikar
2023-12-06 23:39 ` Thomas Weißschuh
2023-12-10 11:07   ` Jonathan Cameron
2023-12-15 10:04     ` Linux regression tracking (Thorsten Leemhuis)
2023-12-15 17:33       ` srinivas pandruvada
2023-12-23  8:14   ` Linux regression tracking #update (Thorsten Leemhuis)

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=20230919081054.2050714-3-Basavaraj.Natikar@amd.com \
    --to=basavaraj.natikar@amd.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jic23@kernel.org \
    --cc=jikos@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.