All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
@ 2012-05-16 15:46 Jon Brenner
  2012-05-16 16:06 ` Jonathan Cameron
  2012-06-13 22:09 ` Peter Meerwald
  0 siblings, 2 replies; 8+ messages in thread
From: Jon Brenner @ 2012-05-16 15:46 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Linux Kernel

Add iio channel type and modifiers for Correlated Color Temperature (CCT)
and RGBC (red/green/blue/clear) data.
Add CCT and RGBC descriptions to documentation.

Changes:
Revised/condensed RGBC descriptions.

Signed-off-by: Jon Brenner <jbrenner@taosinc.com>
---
 drivers/iio/industrialio-core.c                    |    5 ++++
 .../staging/iio/Documentation/sysfs-bus-iio-light  |   23 ++++++++++++++++++++
 include/linux/iio/types.h                          |    5 ++++
 3 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 1ddd886..34d8cc9 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -64,6 +64,7 @@ static const char * const iio_chan_type_name_spec[] = {
 	[IIO_TIMESTAMP] = "timestamp",
 	[IIO_CAPACITANCE] = "capacitance",
 	[IIO_ALTVOLTAGE] = "altvoltage",
+	[IIO_CCT] = "cct",
 };

 static const char * const iio_modifier_names[] = {
@@ -72,6 +73,10 @@ static const char * const iio_modifier_names[] = {
 	[IIO_MOD_Z] = "z",
 	[IIO_MOD_LIGHT_BOTH] = "both",
 	[IIO_MOD_LIGHT_IR] = "ir",
+	[IIO_MOD_LIGHT_CLEAR] = "clear",
+	[IIO_MOD_LIGHT_RED] = "red",
+	[IIO_MOD_LIGHT_GREEN] = "green",
+	[IIO_MOD_LIGHT_BLUE] = "blue",
 };

 /* relies on pairs of these shared then separate */
diff --git a/drivers/staging/iio/Documentation/sysfs-bus-iio-light b/drivers/staging/iio/Documentation/sysfs-bus-iio-light
index 715c74d..83a2876 100644
--- a/drivers/staging/iio/Documentation/sysfs-bus-iio-light
+++ b/drivers/staging/iio/Documentation/sysfs-bus-iio-light
@@ -34,6 +34,15 @@ Description:
 		it comes back in SI units, it should also include _input else it
 		should include _raw to signify it is not in SI units.

+What:		/sys/bus/iio/devices/device[n]/in_cct0[_input|_raw]
+KernelVersion:	3.4.0
+Contact:	linux-iio@vger.kernel.org
+Description:
+		This should return the correlated color temperature from the
+		light sensor. If it comes back in SI units, it should also
+		include _input else it should include _raw to signify it is not
+		in SI units.
+
 What:		/sys/.../device[n]/proximity_on_chip_ambient_infrared_supression
 KernelVersion:	2.6.37
 Contact:	linux-iio@vger.kernel.org
@@ -82,3 +91,17 @@ Contact:	linux-iio@vger.kernel.org
 Description:
 		This property gets/sets the table of coefficients
 		used in calculating illuminance in lux.
+
+What:		/sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
+What:		/sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
+What:		/sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw]
+What:		/sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
+KernelVersion:	3.4.0
+Contact:	linux-iio@vger.kernel.org
+Description:
+		This property is supported by sensors that have a RGBC
+		sensing mode. This value should be the output from a reading
+		and if expressed in SI units, should include _input. If this
+		value is not in SI units (irradiance, uW/mm), then it should
+		include _raw.
+
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
index 1b073b1..a7de5d9 100644
--- a/include/linux/iio/types.h
+++ b/include/linux/iio/types.h
@@ -28,6 +28,7 @@ enum iio_chan_type {
 	IIO_TIMESTAMP,
 	IIO_CAPACITANCE,
 	IIO_ALTVOLTAGE,
+	IIO_CCT,
 };

 enum iio_modifier {
@@ -45,6 +46,10 @@ enum iio_modifier {
 	IIO_MOD_X_OR_Y_OR_Z,
 	IIO_MOD_LIGHT_BOTH,
 	IIO_MOD_LIGHT_IR,
+	IIO_MOD_LIGHT_CLEAR,
+	IIO_MOD_LIGHT_RED,
+	IIO_MOD_LIGHT_GREEN,
+	IIO_MOD_LIGHT_BLUE,
 };

 #define IIO_VAL_INT 1
--
1.7.4.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
  2012-05-16 15:46 [PATCH V2] IIO channel type and modifiers for CCT and RGBC data Jon Brenner
@ 2012-05-16 16:06 ` Jonathan Cameron
  2012-06-13 22:09 ` Peter Meerwald
  1 sibling, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2012-05-16 16:06 UTC (permalink / raw)
  To: Jon Brenner; +Cc: linux-iio, Linux Kernel



Jon Brenner <jbrenner@taosinc.com> wrote:

>Add iio channel type and modifiers for Correlated Color Temperature
>(CCT)
>and RGBC (red/green/blue/clear) data.
>Add CCT and RGBC descriptions to documentation.
>
>Changes:
>Revised/condensed RGBC descriptions.
>
>Signed-off-by: Jon Brenner <jbrenner@taosinc.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
>---
> drivers/iio/industrialio-core.c                    |    5 ++++
>.../staging/iio/Documentation/sysfs-bus-iio-light  |   23
>++++++++++++++++++++
> include/linux/iio/types.h                          |    5 ++++
> 3 files changed, 33 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/iio/industrialio-core.c
>b/drivers/iio/industrialio-core.c
>index 1ddd886..34d8cc9 100644
>--- a/drivers/iio/industrialio-core.c
>+++ b/drivers/iio/industrialio-core.c
>@@ -64,6 +64,7 @@ static const char * const iio_chan_type_name_spec[] =
>{
> 	[IIO_TIMESTAMP] = "timestamp",
> 	[IIO_CAPACITANCE] = "capacitance",
> 	[IIO_ALTVOLTAGE] = "altvoltage",
>+	[IIO_CCT] = "cct",
> };
>
> static const char * const iio_modifier_names[] = {
>@@ -72,6 +73,10 @@ static const char * const iio_modifier_names[] = {
> 	[IIO_MOD_Z] = "z",
> 	[IIO_MOD_LIGHT_BOTH] = "both",
> 	[IIO_MOD_LIGHT_IR] = "ir",
>+	[IIO_MOD_LIGHT_CLEAR] = "clear",
>+	[IIO_MOD_LIGHT_RED] = "red",
>+	[IIO_MOD_LIGHT_GREEN] = "green",
>+	[IIO_MOD_LIGHT_BLUE] = "blue",
> };
>
> /* relies on pairs of these shared then separate */
>diff --git a/drivers/staging/iio/Documentation/sysfs-bus-iio-light
>b/drivers/staging/iio/Documentation/sysfs-bus-iio-light
>index 715c74d..83a2876 100644
>--- a/drivers/staging/iio/Documentation/sysfs-bus-iio-light
>+++ b/drivers/staging/iio/Documentation/sysfs-bus-iio-light
>@@ -34,6 +34,15 @@ Description:
> 		it comes back in SI units, it should also include _input else it
> 		should include _raw to signify it is not in SI units.
>
>+What:		/sys/bus/iio/devices/device[n]/in_cct0[_input|_raw]
>+KernelVersion:	3.4.0
>+Contact:	linux-iio@vger.kernel.org
>+Description:
>+		This should return the correlated color temperature from the
>+		light sensor. If it comes back in SI units, it should also
>+		include _input else it should include _raw to signify it is not
>+		in SI units.
>+
>What:		/sys/.../device[n]/proximity_on_chip_ambient_infrared_supression
> KernelVersion:	2.6.37
> Contact:	linux-iio@vger.kernel.org
>@@ -82,3 +91,17 @@ Contact:	linux-iio@vger.kernel.org
> Description:
> 		This property gets/sets the table of coefficients
> 		used in calculating illuminance in lux.
>+
>+What:		/sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
>+What:		/sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
>+What:		/sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw]
>+What:		/sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
>+KernelVersion:	3.4.0
>+Contact:	linux-iio@vger.kernel.org
>+Description:
>+		This property is supported by sensors that have a RGBC
>+		sensing mode. This value should be the output from a reading
>+		and if expressed in SI units, should include _input. If this
>+		value is not in SI units (irradiance, uW/mm), then it should
>+		include _raw.
>+
>diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
>index 1b073b1..a7de5d9 100644
>--- a/include/linux/iio/types.h
>+++ b/include/linux/iio/types.h
>@@ -28,6 +28,7 @@ enum iio_chan_type {
> 	IIO_TIMESTAMP,
> 	IIO_CAPACITANCE,
> 	IIO_ALTVOLTAGE,
>+	IIO_CCT,
> };
>
> enum iio_modifier {
>@@ -45,6 +46,10 @@ enum iio_modifier {
> 	IIO_MOD_X_OR_Y_OR_Z,
> 	IIO_MOD_LIGHT_BOTH,
> 	IIO_MOD_LIGHT_IR,
>+	IIO_MOD_LIGHT_CLEAR,
>+	IIO_MOD_LIGHT_RED,
>+	IIO_MOD_LIGHT_GREEN,
>+	IIO_MOD_LIGHT_BLUE,
> };
>
> #define IIO_VAL_INT 1
>--
>1.7.4.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
  2012-05-16 15:46 [PATCH V2] IIO channel type and modifiers for CCT and RGBC data Jon Brenner
  2012-05-16 16:06 ` Jonathan Cameron
@ 2012-06-13 22:09 ` Peter Meerwald
  2012-06-14  7:19   ` Jonathan Cameron
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Meerwald @ 2012-06-13 22:09 UTC (permalink / raw)
  To: Jon Brenner; +Cc: Jonathan Cameron, linux-iio


> Add iio channel type and modifiers for Correlated Color Temperature (CCT)
> and RGBC (red/green/blue/clear) data.

> +What:		/sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
> +What:		/sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
> +What:		/sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw]
> +What:		/sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
> +KernelVersion:	3.4.0
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		This property is supported by sensors that have a RGBC
> +		sensing mode. This value should be the output from a reading
> +		and if expressed in SI units, should include _input. If this
> +		value is not in SI units (irradiance, uW/mm), then it should
> +		include _raw.

should the irradiance unit be uW/mm^2 ??

p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
  2012-06-13 22:09 ` Peter Meerwald
@ 2012-06-14  7:19   ` Jonathan Cameron
  2012-07-10  8:08     ` Jonathan Cameron
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Cameron @ 2012-06-14  7:19 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: Jon Brenner, linux-iio

On 6/13/2012 11:09 PM, Peter Meerwald wrote:
>
>> Add iio channel type and modifiers for Correlated Color Temperature (CCT)
>> and RGBC (red/green/blue/clear) data.
>
>> +What:		/sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
>> +What:		/sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
>> +What:		/sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw]
>> +What:		/sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
>> +KernelVersion:	3.4.0
>> +Contact:	linux-iio@vger.kernel.org
>> +Description:
>> +		This property is supported by sensors that have a RGBC
>> +		sensing mode. This value should be the output from a reading
>> +		and if expressed in SI units, should include _input. If this
>> +		value is not in SI units (irradiance, uW/mm), then it should
>> +		include _raw.
>
> should the irradiance unit be uW/mm^2 ??
or just W/m^2? Whichever people prefer! Good spot Peter.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
  2012-06-14  7:19   ` Jonathan Cameron
@ 2012-07-10  8:08     ` Jonathan Cameron
  2012-07-10 18:01       ` Jonathan Cameron
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Cameron @ 2012-07-10  8:08 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Peter Meerwald, Jon Brenner, linux-iio

Jon,

Peter raised the question below about this.

Now we have two varients of this patch. As it was original yours
Jon, could you rustle up a new version incorporating Peter's
one and if both of you sign off / ack it, I'll merge it.

Jonathan
> On 6/13/2012 11:09 PM, Peter Meerwald wrote:
>>
>>> Add iio channel type and modifiers for Correlated Color Temperature
>>> (CCT)
>>> and RGBC (red/green/blue/clear) data.
>>
>>> +What:
>>> /sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
>>> +What:
>>> /sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
>>> +What:
>>> /sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw]
>>> +What:
>>> /sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
>>> +KernelVersion:    3.4.0
>>> +Contact:    linux-iio@vger.kernel.org
>>> +Description:
>>> +        This property is supported by sensors that have a RGBC
>>> +        sensing mode. This value should be the output from a reading
>>> +        and if expressed in SI units, should include _input. If this
>>> +        value is not in SI units (irradiance, uW/mm), then it should
>>> +        include _raw.
>>
>> should the irradiance unit be uW/mm^2 ??
> or just W/m^2? Whichever people prefer! Good spot Peter.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
  2012-07-10  8:08     ` Jonathan Cameron
@ 2012-07-10 18:01       ` Jonathan Cameron
  2012-07-10 18:15         ` Peter Meerwald
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Cameron @ 2012-07-10 18:01 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Peter Meerwald, Jon Brenner, linux-iio

On 07/10/2012 09:08 AM, Jonathan Cameron wrote:
> Jon,
> 
> Peter raised the question below about this.
> 
> Now we have two varients of this patch. As it was original yours
> Jon, could you rustle up a new version incorporating Peter's
> one and if both of you sign off / ack it, I'll merge it.

At Jon's request I've made the minor change below and done the merge
with the current tree.  Could people take a look to make sure I haven't
messed it up (was a little fiddly due to changing context).

I'll send out the pull if no one shouts. It's getting vaguely near the
end of this cycle...

Jonathan
> 
> Jonathan
>> On 6/13/2012 11:09 PM, Peter Meerwald wrote:
>>>
>>>> Add iio channel type and modifiers for Correlated Color Temperature
>>>> (CCT)
>>>> and RGBC (red/green/blue/clear) data.
>>>
>>>> +What:
>>>> /sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
>>>> +What:
>>>> /sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
>>>> +What:
>>>> /sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw]
>>>> +What:
>>>> /sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
>>>> +KernelVersion:    3.4.0
>>>> +Contact:    linux-iio@vger.kernel.org
>>>> +Description:
>>>> +        This property is supported by sensors that have a RGBC
>>>> +        sensing mode. This value should be the output from a reading
>>>> +        and if expressed in SI units, should include _input. If this
>>>> +        value is not in SI units (irradiance, uW/mm), then it should
>>>> +        include _raw.
>>>
>>> should the irradiance unit be uW/mm^2 ??
>> or just W/m^2? Whichever people prefer! Good spot Peter.
>>
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
  2012-07-10 18:01       ` Jonathan Cameron
@ 2012-07-10 18:15         ` Peter Meerwald
  2012-07-10 19:32           ` Jonathan Cameron
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Meerwald @ 2012-07-10 18:15 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Jon Brenner, linux-iio


> I'll send out the pull if no one shouts. It's getting vaguely near the
> end of this cycle...

I'm happy this got merged finally

> >>>> +KernelVersion:    3.4.0
> >>>> +Contact:    linux-iio@vger.kernel.org

should be 3.6?

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] IIO channel type and modifiers for CCT and RGBC data
  2012-07-10 18:15         ` Peter Meerwald
@ 2012-07-10 19:32           ` Jonathan Cameron
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2012-07-10 19:32 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: Jonathan Cameron, Jon Brenner, linux-iio

On 07/10/2012 07:15 PM, Peter Meerwald wrote:
>> I'll send out the pull if no one shouts. It's getting vaguely near the
>> end of this cycle...
> I'm happy this got merged finally
>
>>>>>> +KernelVersion:    3.4.0
>>>>>> +Contact:    linux-iio@vger.kernel.org
> should be 3.6?
Good spot. I'll do a trivial fixup patch to follow it.
Will add a reported-by.
>
> regards, p.
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-10 19:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 15:46 [PATCH V2] IIO channel type and modifiers for CCT and RGBC data Jon Brenner
2012-05-16 16:06 ` Jonathan Cameron
2012-06-13 22:09 ` Peter Meerwald
2012-06-14  7:19   ` Jonathan Cameron
2012-07-10  8:08     ` Jonathan Cameron
2012-07-10 18:01       ` Jonathan Cameron
2012-07-10 18:15         ` Peter Meerwald
2012-07-10 19:32           ` Jonathan Cameron

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.