* [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. @ 2015-05-29 8:04 Kevin Tsai 2015-05-29 8:07 ` Lars-Peter Clausen 2015-05-29 8:47 ` Peter Meerwald 0 siblings, 2 replies; 7+ messages in thread From: Kevin Tsai @ 2015-05-29 8:04 UTC (permalink / raw) To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, Irina Tirdea, Daniel Baluta, Srinivas Pandruvada, Reyad Attiyat, Kevin Tsai Cc: linux-iio, linux-kernel, linux-api Add Ultraviolet(UV) support: UVA: 315 ~ 400 nm UVB: 280 ~ 315 nm UVC: 100 ~ 280 nm Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> --- drivers/iio/industrialio-core.c | 3 +++ include/uapi/linux/iio/types.h | 3 +++ tools/iio/iio_event_monitor.c | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 3524b0d..ecbdd1e 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -89,6 +89,9 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LIGHT_RED] = "red", [IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_BLUE] = "blue", + [IIO_MOD_LIGHT_UVA] = "uva", + [IIO_MOD_LIGHT_UVB] = "uvb", + [IIO_MOD_LIGHT_UVC] = "uvc", [IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_TEMP_AMBIENT] = "ambient", [IIO_MOD_TEMP_OBJECT] = "object", diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index 2f8b117..5c99090 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -72,6 +72,9 @@ enum iio_modifier { IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, IIO_MOD_I, IIO_MOD_Q, + IIO_MOD_LIGHT_UVA, + IIO_MOD_LIGHT_UVB, + IIO_MOD_LIGHT_UVC, }; enum iio_event_type { diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index 427c271..46dd27f 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -88,6 +88,9 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LIGHT_RED] = "red", [IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_BLUE] = "blue", + [IIO_MOD_LIGHT_UVA] = "uva", + [IIO_MOD_LIGHT_UVB] = "uvb", + [IIO_MOD_LIGHT_UVC] = "uvc", [IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_TEMP_AMBIENT] = "ambient", [IIO_MOD_TEMP_OBJECT] = "object", @@ -156,6 +159,9 @@ static bool event_is_known(struct iio_event_data *event) case IIO_MOD_LIGHT_RED: case IIO_MOD_LIGHT_GREEN: case IIO_MOD_LIGHT_BLUE: + case IIO_MOD_LIGHT_UVA: + case IIO_MOD_LIGHT_UVB: + case IIO_MOD_LIGHT_UVC: case IIO_MOD_QUATERNION: case IIO_MOD_TEMP_AMBIENT: case IIO_MOD_TEMP_OBJECT: -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. 2015-05-29 8:04 [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc Kevin Tsai @ 2015-05-29 8:07 ` Lars-Peter Clausen 2015-05-29 8:47 ` Peter Meerwald 1 sibling, 0 replies; 7+ messages in thread From: Lars-Peter Clausen @ 2015-05-29 8:07 UTC (permalink / raw) To: Kevin Tsai, Jonathan Cameron, Hartmut Knaack, Peter Meerwald, Irina Tirdea, Daniel Baluta, Srinivas Pandruvada, Reyad Attiyat Cc: linux-iio, linux-kernel, linux-api On 05/29/2015 10:04 AM, Kevin Tsai wrote: > Add Ultraviolet(UV) support: > UVA: 315 ~ 400 nm > UVB: 280 ~ 315 nm > UVC: 100 ~ 280 nm We need documentation for these new modifiers in Documentation/ABI/testing/sys-bus-iio. Otherwise looks ok. - Lars ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. 2015-05-29 8:04 [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc Kevin Tsai 2015-05-29 8:07 ` Lars-Peter Clausen @ 2015-05-29 8:47 ` Peter Meerwald 2015-06-01 10:39 ` Jonathan Cameron 1 sibling, 1 reply; 7+ messages in thread From: Peter Meerwald @ 2015-05-29 8:47 UTC (permalink / raw) To: Kevin Tsai Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Irina Tirdea, Daniel Baluta, Srinivas Pandruvada, Reyad Attiyat, linux-iio On Fri, 29 May 2015, Kevin Tsai wrote: > Add Ultraviolet(UV) support: > UVA: 315 ~ 400 nm > UVB: 280 ~ 315 nm > UVC: 100 ~ 280 nm for what sensor chip do you intend this addition? I'm working on support for the Si1132 which exposes an UV Index measure, see http://www.silabs.com/Support%20Documents/TechnicalDocs/Si1132.pdf I just want to bring it up so we can plan how to support UV... > Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> > --- > drivers/iio/industrialio-core.c | 3 +++ > include/uapi/linux/iio/types.h | 3 +++ > tools/iio/iio_event_monitor.c | 6 ++++++ > 3 files changed, 12 insertions(+) > > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c > index 3524b0d..ecbdd1e 100644 > --- a/drivers/iio/industrialio-core.c > +++ b/drivers/iio/industrialio-core.c > @@ -89,6 +89,9 @@ static const char * const iio_modifier_names[] = { > [IIO_MOD_LIGHT_RED] = "red", > [IIO_MOD_LIGHT_GREEN] = "green", > [IIO_MOD_LIGHT_BLUE] = "blue", > + [IIO_MOD_LIGHT_UVA] = "uva", > + [IIO_MOD_LIGHT_UVB] = "uvb", > + [IIO_MOD_LIGHT_UVC] = "uvc", > [IIO_MOD_QUATERNION] = "quaternion", > [IIO_MOD_TEMP_AMBIENT] = "ambient", > [IIO_MOD_TEMP_OBJECT] = "object", > diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h > index 2f8b117..5c99090 100644 > --- a/include/uapi/linux/iio/types.h > +++ b/include/uapi/linux/iio/types.h > @@ -72,6 +72,9 @@ enum iio_modifier { > IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, > IIO_MOD_I, > IIO_MOD_Q, > + IIO_MOD_LIGHT_UVA, > + IIO_MOD_LIGHT_UVB, > + IIO_MOD_LIGHT_UVC, > }; > > enum iio_event_type { > diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c > index 427c271..46dd27f 100644 > --- a/tools/iio/iio_event_monitor.c > +++ b/tools/iio/iio_event_monitor.c > @@ -88,6 +88,9 @@ static const char * const iio_modifier_names[] = { > [IIO_MOD_LIGHT_RED] = "red", > [IIO_MOD_LIGHT_GREEN] = "green", > [IIO_MOD_LIGHT_BLUE] = "blue", > + [IIO_MOD_LIGHT_UVA] = "uva", > + [IIO_MOD_LIGHT_UVB] = "uvb", > + [IIO_MOD_LIGHT_UVC] = "uvc", > [IIO_MOD_QUATERNION] = "quaternion", > [IIO_MOD_TEMP_AMBIENT] = "ambient", > [IIO_MOD_TEMP_OBJECT] = "object", > @@ -156,6 +159,9 @@ static bool event_is_known(struct iio_event_data *event) > case IIO_MOD_LIGHT_RED: > case IIO_MOD_LIGHT_GREEN: > case IIO_MOD_LIGHT_BLUE: > + case IIO_MOD_LIGHT_UVA: > + case IIO_MOD_LIGHT_UVB: > + case IIO_MOD_LIGHT_UVC: > case IIO_MOD_QUATERNION: > case IIO_MOD_TEMP_AMBIENT: > case IIO_MOD_TEMP_OBJECT: > -- Peter Meerwald +43-664-2444418 (mobile) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. 2015-05-29 8:47 ` Peter Meerwald @ 2015-06-01 10:39 ` Jonathan Cameron 2015-06-02 19:36 ` Kevin Tsai 0 siblings, 1 reply; 7+ messages in thread From: Jonathan Cameron @ 2015-06-01 10:39 UTC (permalink / raw) To: Peter Meerwald, Kevin Tsai Cc: Hartmut Knaack, Lars-Peter Clausen, Irina Tirdea, Daniel Baluta, Srinivas Pandruvada, Reyad Attiyat, linux-iio On 29/05/15 09:47, Peter Meerwald wrote: > On Fri, 29 May 2015, Kevin Tsai wrote: > >> Add Ultraviolet(UV) support: >> UVA: 315 ~ 400 nm >> UVB: 280 ~ 315 nm >> UVC: 100 ~ 280 nm > > for what sensor chip do you intend this addition? > > I'm working on support for the Si1132 which exposes an UV Index measure, > see http://www.silabs.com/Support%20Documents/TechnicalDocs/Si1132.pdf > > I just want to bring it up so we can plan how to support UV... We did (long long ago in a galaxy far away) discuss a more general way of representing light sensors of all types... The thought was to have additional infomask elements describing the frequency range being detected. It's irritating complex in many cases, but some rough limits (like 3db points or similar) might be normally fine... We could still keep the types as a generic indicator, but include more specifics. E.g. in_intensity0_uva_raw in_intensity0_uva_min_wavelength in_intensity0_uva_max_wavelength with units in m (just to stretch our units system ;) So what other light sensors do people have access to? (I have x-ray ones :) though they are all analog. With and without various scintilators to make it more complex. Jonathan > >> Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> >> --- >> drivers/iio/industrialio-core.c | 3 +++ >> include/uapi/linux/iio/types.h | 3 +++ >> tools/iio/iio_event_monitor.c | 6 ++++++ >> 3 files changed, 12 insertions(+) >> >> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c >> index 3524b0d..ecbdd1e 100644 >> --- a/drivers/iio/industrialio-core.c >> +++ b/drivers/iio/industrialio-core.c >> @@ -89,6 +89,9 @@ static const char * const iio_modifier_names[] = { >> [IIO_MOD_LIGHT_RED] = "red", >> [IIO_MOD_LIGHT_GREEN] = "green", >> [IIO_MOD_LIGHT_BLUE] = "blue", >> + [IIO_MOD_LIGHT_UVA] = "uva", >> + [IIO_MOD_LIGHT_UVB] = "uvb", >> + [IIO_MOD_LIGHT_UVC] = "uvc", >> [IIO_MOD_QUATERNION] = "quaternion", >> [IIO_MOD_TEMP_AMBIENT] = "ambient", >> [IIO_MOD_TEMP_OBJECT] = "object", >> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h >> index 2f8b117..5c99090 100644 >> --- a/include/uapi/linux/iio/types.h >> +++ b/include/uapi/linux/iio/types.h >> @@ -72,6 +72,9 @@ enum iio_modifier { >> IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, >> IIO_MOD_I, >> IIO_MOD_Q, >> + IIO_MOD_LIGHT_UVA, >> + IIO_MOD_LIGHT_UVB, >> + IIO_MOD_LIGHT_UVC, >> }; >> >> enum iio_event_type { >> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c >> index 427c271..46dd27f 100644 >> --- a/tools/iio/iio_event_monitor.c >> +++ b/tools/iio/iio_event_monitor.c >> @@ -88,6 +88,9 @@ static const char * const iio_modifier_names[] = { >> [IIO_MOD_LIGHT_RED] = "red", >> [IIO_MOD_LIGHT_GREEN] = "green", >> [IIO_MOD_LIGHT_BLUE] = "blue", >> + [IIO_MOD_LIGHT_UVA] = "uva", >> + [IIO_MOD_LIGHT_UVB] = "uvb", >> + [IIO_MOD_LIGHT_UVC] = "uvc", >> [IIO_MOD_QUATERNION] = "quaternion", >> [IIO_MOD_TEMP_AMBIENT] = "ambient", >> [IIO_MOD_TEMP_OBJECT] = "object", >> @@ -156,6 +159,9 @@ static bool event_is_known(struct iio_event_data *event) >> case IIO_MOD_LIGHT_RED: >> case IIO_MOD_LIGHT_GREEN: >> case IIO_MOD_LIGHT_BLUE: >> + case IIO_MOD_LIGHT_UVA: >> + case IIO_MOD_LIGHT_UVB: >> + case IIO_MOD_LIGHT_UVC: >> case IIO_MOD_QUATERNION: >> case IIO_MOD_TEMP_AMBIENT: >> case IIO_MOD_TEMP_OBJECT: >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. 2015-06-01 10:39 ` Jonathan Cameron @ 2015-06-02 19:36 ` Kevin Tsai 2015-06-02 22:16 ` Jonathan Cameron 0 siblings, 1 reply; 7+ messages in thread From: Kevin Tsai @ 2015-06-02 19:36 UTC (permalink / raw) To: 'Jonathan Cameron', 'Peter Meerwald' Cc: 'Hartmut Knaack', 'Lars-Peter Clausen', 'Irina Tirdea', 'Daniel Baluta', 'Srinivas Pandruvada', 'Reyad Attiyat', linux-iio UVA is the wavelength from 315nm to 400 nm (from Wikipedia). Should we need to define the min/max wavelength? Can I use "mW/cm^2" as the unit of intensity? Kevin -----Original Message----- From: Jonathan Cameron [mailto:jic23@kernel.org] Sent: Monday, June 01, 2015 3:40 AM To: Peter Meerwald; Kevin Tsai Cc: Hartmut Knaack; Lars-Peter Clausen; Irina Tirdea; Daniel Baluta; Srinivas Pandruvada; Reyad Attiyat; linux-iio@vger.kernel.org Subject: Re: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. On 29/05/15 09:47, Peter Meerwald wrote: > On Fri, 29 May 2015, Kevin Tsai wrote: > >> Add Ultraviolet(UV) support: >> UVA: 315 ~ 400 nm >> UVB: 280 ~ 315 nm >> UVC: 100 ~ 280 nm > > for what sensor chip do you intend this addition? > > I'm working on support for the Si1132 which exposes an UV Index > measure, see > http://www.silabs.com/Support%20Documents/TechnicalDocs/Si1132.pdf > > I just want to bring it up so we can plan how to support UV... We did (long long ago in a galaxy far away) discuss a more general way of representing light sensors of all types... The thought was to have additional infomask elements describing the frequency range being detected. It's irritating complex in many cases, but some rough limits (like 3db points or similar) might be normally fine... We could still keep the types as a generic indicator, but include more specifics. E.g. in_intensity0_uva_raw in_intensity0_uva_min_wavelength in_intensity0_uva_max_wavelength with units in m (just to stretch our units system ;) So what other light sensors do people have access to? (I have x-ray ones :) though they are all analog. With and without various scintilators to make it more complex. Jonathan > >> Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> >> --- >> drivers/iio/industrialio-core.c | 3 +++ >> include/uapi/linux/iio/types.h | 3 +++ >> tools/iio/iio_event_monitor.c | 6 ++++++ >> 3 files changed, 12 insertions(+) >> >> diff --git a/drivers/iio/industrialio-core.c >> b/drivers/iio/industrialio-core.c index 3524b0d..ecbdd1e 100644 >> --- a/drivers/iio/industrialio-core.c >> +++ b/drivers/iio/industrialio-core.c >> @@ -89,6 +89,9 @@ static const char * const iio_modifier_names[] = { >> [IIO_MOD_LIGHT_RED] = "red", >> [IIO_MOD_LIGHT_GREEN] = "green", >> [IIO_MOD_LIGHT_BLUE] = "blue", >> + [IIO_MOD_LIGHT_UVA] = "uva", >> + [IIO_MOD_LIGHT_UVB] = "uvb", >> + [IIO_MOD_LIGHT_UVC] = "uvc", >> [IIO_MOD_QUATERNION] = "quaternion", >> [IIO_MOD_TEMP_AMBIENT] = "ambient", >> [IIO_MOD_TEMP_OBJECT] = "object", >> diff --git a/include/uapi/linux/iio/types.h >> b/include/uapi/linux/iio/types.h index 2f8b117..5c99090 100644 >> --- a/include/uapi/linux/iio/types.h >> +++ b/include/uapi/linux/iio/types.h >> @@ -72,6 +72,9 @@ enum iio_modifier { >> IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, >> IIO_MOD_I, >> IIO_MOD_Q, >> + IIO_MOD_LIGHT_UVA, >> + IIO_MOD_LIGHT_UVB, >> + IIO_MOD_LIGHT_UVC, >> }; >> >> enum iio_event_type { >> diff --git a/tools/iio/iio_event_monitor.c >> b/tools/iio/iio_event_monitor.c index 427c271..46dd27f 100644 >> --- a/tools/iio/iio_event_monitor.c >> +++ b/tools/iio/iio_event_monitor.c >> @@ -88,6 +88,9 @@ static const char * const iio_modifier_names[] = { >> [IIO_MOD_LIGHT_RED] = "red", >> [IIO_MOD_LIGHT_GREEN] = "green", >> [IIO_MOD_LIGHT_BLUE] = "blue", >> + [IIO_MOD_LIGHT_UVA] = "uva", >> + [IIO_MOD_LIGHT_UVB] = "uvb", >> + [IIO_MOD_LIGHT_UVC] = "uvc", >> [IIO_MOD_QUATERNION] = "quaternion", >> [IIO_MOD_TEMP_AMBIENT] = "ambient", >> [IIO_MOD_TEMP_OBJECT] = "object", >> @@ -156,6 +159,9 @@ static bool event_is_known(struct iio_event_data *event) >> case IIO_MOD_LIGHT_RED: >> case IIO_MOD_LIGHT_GREEN: >> case IIO_MOD_LIGHT_BLUE: >> + case IIO_MOD_LIGHT_UVA: >> + case IIO_MOD_LIGHT_UVB: >> + case IIO_MOD_LIGHT_UVC: >> case IIO_MOD_QUATERNION: >> case IIO_MOD_TEMP_AMBIENT: >> case IIO_MOD_TEMP_OBJECT: >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. 2015-06-02 19:36 ` Kevin Tsai @ 2015-06-02 22:16 ` Jonathan Cameron 2015-06-03 22:08 ` Kevin Tsai 0 siblings, 1 reply; 7+ messages in thread From: Jonathan Cameron @ 2015-06-02 22:16 UTC (permalink / raw) To: Kevin Tsai, 'Jonathan Cameron', 'Peter Meerwald' Cc: 'Hartmut Knaack', 'Lars-Peter Clausen', 'Irina Tirdea', 'Daniel Baluta', 'Srinivas Pandruvada', 'Reyad Attiyat', linux-iio On 2 June 2015 20:36:15 BST, Kevin Tsai <ktsai@capellamicro.com> wrote: > >UVA is the wavelength from 315nm to 400 nm (from Wikipedia). Should we >need >to define the min/max wavelength? Not for this case but we probably need a more generic way of defining wavelengths detected as many sensors aren't as conveniently defined. > >Can I use "mW/cm^2" as the unit of intensity? W/m^2 would at least be less random even if the other unit is more common in datasheets! > >Kevin > >-----Original Message----- >From: Jonathan Cameron [mailto:jic23@kernel.org] >Sent: Monday, June 01, 2015 3:40 AM >To: Peter Meerwald; Kevin Tsai >Cc: Hartmut Knaack; Lars-Peter Clausen; Irina Tirdea; Daniel Baluta; >Srinivas Pandruvada; Reyad Attiyat; linux-iio@vger.kernel.org >Subject: Re: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, >and >iio_mod_light_uvc. > >On 29/05/15 09:47, Peter Meerwald wrote: >> On Fri, 29 May 2015, Kevin Tsai wrote: >> >>> Add Ultraviolet(UV) support: >>> UVA: 315 ~ 400 nm >>> UVB: 280 ~ 315 nm >>> UVC: 100 ~ 280 nm >> >> for what sensor chip do you intend this addition? >> >> I'm working on support for the Si1132 which exposes an UV Index >> measure, see >> http://www.silabs.com/Support%20Documents/TechnicalDocs/Si1132.pdf >> >> I just want to bring it up so we can plan how to support UV... >We did (long long ago in a galaxy far away) discuss a more general way >of >representing light sensors of all types... > >The thought was to have additional infomask elements describing the >frequency range being detected. It's irritating complex in many cases, >but >some rough limits (like 3db points or similar) might be normally >fine... > >We could still keep the types as a generic indicator, but include more >specifics. > >E.g. > >in_intensity0_uva_raw >in_intensity0_uva_min_wavelength >in_intensity0_uva_max_wavelength >with units in m (just to stretch our units system ;) > >So what other light sensors do people have access to? >(I have x-ray ones :) though they are all analog. >With and without various scintilators to make it more complex. > >Jonathan >> >>> Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> >>> --- >>> drivers/iio/industrialio-core.c | 3 +++ >>> include/uapi/linux/iio/types.h | 3 +++ >>> tools/iio/iio_event_monitor.c | 6 ++++++ >>> 3 files changed, 12 insertions(+) >>> >>> diff --git a/drivers/iio/industrialio-core.c >>> b/drivers/iio/industrialio-core.c index 3524b0d..ecbdd1e 100644 >>> --- a/drivers/iio/industrialio-core.c >>> +++ b/drivers/iio/industrialio-core.c >>> @@ -89,6 +89,9 @@ static const char * const iio_modifier_names[] = { >>> [IIO_MOD_LIGHT_RED] = "red", >>> [IIO_MOD_LIGHT_GREEN] = "green", >>> [IIO_MOD_LIGHT_BLUE] = "blue", >>> + [IIO_MOD_LIGHT_UVA] = "uva", >>> + [IIO_MOD_LIGHT_UVB] = "uvb", >>> + [IIO_MOD_LIGHT_UVC] = "uvc", >>> [IIO_MOD_QUATERNION] = "quaternion", >>> [IIO_MOD_TEMP_AMBIENT] = "ambient", >>> [IIO_MOD_TEMP_OBJECT] = "object", >>> diff --git a/include/uapi/linux/iio/types.h >>> b/include/uapi/linux/iio/types.h index 2f8b117..5c99090 100644 >>> --- a/include/uapi/linux/iio/types.h >>> +++ b/include/uapi/linux/iio/types.h >>> @@ -72,6 +72,9 @@ enum iio_modifier { >>> IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, >>> IIO_MOD_I, >>> IIO_MOD_Q, >>> + IIO_MOD_LIGHT_UVA, >>> + IIO_MOD_LIGHT_UVB, >>> + IIO_MOD_LIGHT_UVC, >>> }; >>> >>> enum iio_event_type { >>> diff --git a/tools/iio/iio_event_monitor.c >>> b/tools/iio/iio_event_monitor.c index 427c271..46dd27f 100644 >>> --- a/tools/iio/iio_event_monitor.c >>> +++ b/tools/iio/iio_event_monitor.c >>> @@ -88,6 +88,9 @@ static const char * const iio_modifier_names[] = { >>> [IIO_MOD_LIGHT_RED] = "red", >>> [IIO_MOD_LIGHT_GREEN] = "green", >>> [IIO_MOD_LIGHT_BLUE] = "blue", >>> + [IIO_MOD_LIGHT_UVA] = "uva", >>> + [IIO_MOD_LIGHT_UVB] = "uvb", >>> + [IIO_MOD_LIGHT_UVC] = "uvc", >>> [IIO_MOD_QUATERNION] = "quaternion", >>> [IIO_MOD_TEMP_AMBIENT] = "ambient", >>> [IIO_MOD_TEMP_OBJECT] = "object", >>> @@ -156,6 +159,9 @@ static bool event_is_known(struct iio_event_data >*event) >>> case IIO_MOD_LIGHT_RED: >>> case IIO_MOD_LIGHT_GREEN: >>> case IIO_MOD_LIGHT_BLUE: >>> + case IIO_MOD_LIGHT_UVA: >>> + case IIO_MOD_LIGHT_UVB: >>> + case IIO_MOD_LIGHT_UVC: >>> case IIO_MOD_QUATERNION: >>> case IIO_MOD_TEMP_AMBIENT: >>> case IIO_MOD_TEMP_OBJECT: >>> >> -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. 2015-06-02 22:16 ` Jonathan Cameron @ 2015-06-03 22:08 ` Kevin Tsai 0 siblings, 0 replies; 7+ messages in thread From: Kevin Tsai @ 2015-06-03 22:08 UTC (permalink / raw) To: 'Jonathan Cameron', 'Jonathan Cameron', 'Peter Meerwald' Cc: 'Hartmut Knaack', 'Lars-Peter Clausen', 'Irina Tirdea', 'Daniel Baluta', 'Srinivas Pandruvada', 'Reyad Attiyat', linux-iio Hi Jonathan, The intensity of RGBC is already defined the unit as "uW/mm^2". Can I use the same unit for UV channels? For the wavelength, can I define the unit as "nm"? It's common unit for the wavelength. Otherwise, we need to write 0.00000085 to present 850nm. Please advise. Thanks. Kevin -----Original Message----- From: Jonathan Cameron [mailto:jic23@jic23.retrosnub.co.uk] Sent: Tuesday, June 02, 2015 3:16 PM To: Kevin Tsai; 'Jonathan Cameron'; 'Peter Meerwald' Cc: 'Hartmut Knaack'; 'Lars-Peter Clausen'; 'Irina Tirdea'; 'Daniel Baluta'; 'Srinivas Pandruvada'; 'Reyad Attiyat'; linux-iio@vger.kernel.org Subject: RE: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc. On 2 June 2015 20:36:15 BST, Kevin Tsai <ktsai@capellamicro.com> wrote: > >UVA is the wavelength from 315nm to 400 nm (from Wikipedia). Should we >need to define the min/max wavelength? Not for this case but we probably need a more generic way of defining wavelengths detected as many sensors aren't as conveniently defined. > >Can I use "mW/cm^2" as the unit of intensity? W/m^2 would at least be less random even if the other unit is more common in datasheets! > >Kevin > >-----Original Message----- >From: Jonathan Cameron [mailto:jic23@kernel.org] >Sent: Monday, June 01, 2015 3:40 AM >To: Peter Meerwald; Kevin Tsai >Cc: Hartmut Knaack; Lars-Peter Clausen; Irina Tirdea; Daniel Baluta; >Srinivas Pandruvada; Reyad Attiyat; linux-iio@vger.kernel.org >Subject: Re: [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, >and iio_mod_light_uvc. > >On 29/05/15 09:47, Peter Meerwald wrote: >> On Fri, 29 May 2015, Kevin Tsai wrote: >> >>> Add Ultraviolet(UV) support: >>> UVA: 315 ~ 400 nm >>> UVB: 280 ~ 315 nm >>> UVC: 100 ~ 280 nm >> >> for what sensor chip do you intend this addition? >> >> I'm working on support for the Si1132 which exposes an UV Index >> measure, see >> http://www.silabs.com/Support%20Documents/TechnicalDocs/Si1132.pdf >> >> I just want to bring it up so we can plan how to support UV... >We did (long long ago in a galaxy far away) discuss a more general way >of representing light sensors of all types... > >The thought was to have additional infomask elements describing the >frequency range being detected. It's irritating complex in many cases, >but some rough limits (like 3db points or similar) might be normally >fine... > >We could still keep the types as a generic indicator, but include more >specifics. > >E.g. > >in_intensity0_uva_raw >in_intensity0_uva_min_wavelength >in_intensity0_uva_max_wavelength >with units in m (just to stretch our units system ;) > >So what other light sensors do people have access to? >(I have x-ray ones :) though they are all analog. >With and without various scintilators to make it more complex. > >Jonathan >> >>> Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> >>> --- >>> drivers/iio/industrialio-core.c | 3 +++ >>> include/uapi/linux/iio/types.h | 3 +++ >>> tools/iio/iio_event_monitor.c | 6 ++++++ >>> 3 files changed, 12 insertions(+) >>> >>> diff --git a/drivers/iio/industrialio-core.c >>> b/drivers/iio/industrialio-core.c index 3524b0d..ecbdd1e 100644 >>> --- a/drivers/iio/industrialio-core.c >>> +++ b/drivers/iio/industrialio-core.c >>> @@ -89,6 +89,9 @@ static const char * const iio_modifier_names[] = { >>> [IIO_MOD_LIGHT_RED] = "red", >>> [IIO_MOD_LIGHT_GREEN] = "green", >>> [IIO_MOD_LIGHT_BLUE] = "blue", >>> + [IIO_MOD_LIGHT_UVA] = "uva", >>> + [IIO_MOD_LIGHT_UVB] = "uvb", >>> + [IIO_MOD_LIGHT_UVC] = "uvc", >>> [IIO_MOD_QUATERNION] = "quaternion", >>> [IIO_MOD_TEMP_AMBIENT] = "ambient", >>> [IIO_MOD_TEMP_OBJECT] = "object", >>> diff --git a/include/uapi/linux/iio/types.h >>> b/include/uapi/linux/iio/types.h index 2f8b117..5c99090 100644 >>> --- a/include/uapi/linux/iio/types.h >>> +++ b/include/uapi/linux/iio/types.h >>> @@ -72,6 +72,9 @@ enum iio_modifier { >>> IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, >>> IIO_MOD_I, >>> IIO_MOD_Q, >>> + IIO_MOD_LIGHT_UVA, >>> + IIO_MOD_LIGHT_UVB, >>> + IIO_MOD_LIGHT_UVC, >>> }; >>> >>> enum iio_event_type { >>> diff --git a/tools/iio/iio_event_monitor.c >>> b/tools/iio/iio_event_monitor.c index 427c271..46dd27f 100644 >>> --- a/tools/iio/iio_event_monitor.c >>> +++ b/tools/iio/iio_event_monitor.c >>> @@ -88,6 +88,9 @@ static const char * const iio_modifier_names[] = { >>> [IIO_MOD_LIGHT_RED] = "red", >>> [IIO_MOD_LIGHT_GREEN] = "green", >>> [IIO_MOD_LIGHT_BLUE] = "blue", >>> + [IIO_MOD_LIGHT_UVA] = "uva", >>> + [IIO_MOD_LIGHT_UVB] = "uvb", >>> + [IIO_MOD_LIGHT_UVC] = "uvc", >>> [IIO_MOD_QUATERNION] = "quaternion", >>> [IIO_MOD_TEMP_AMBIENT] = "ambient", >>> [IIO_MOD_TEMP_OBJECT] = "object", >>> @@ -156,6 +159,9 @@ static bool event_is_known(struct iio_event_data >*event) >>> case IIO_MOD_LIGHT_RED: >>> case IIO_MOD_LIGHT_GREEN: >>> case IIO_MOD_LIGHT_BLUE: >>> + case IIO_MOD_LIGHT_UVA: >>> + case IIO_MOD_LIGHT_UVB: >>> + case IIO_MOD_LIGHT_UVC: >>> case IIO_MOD_QUATERNION: >>> case IIO_MOD_TEMP_AMBIENT: >>> case IIO_MOD_TEMP_OBJECT: >>> >> -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-03 22:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-05-29 8:04 [PATCH 1/1] iio: Add iio_mod_light_uva, iio_mod_light_uvb, and iio_mod_light_uvc Kevin Tsai 2015-05-29 8:07 ` Lars-Peter Clausen 2015-05-29 8:47 ` Peter Meerwald 2015-06-01 10:39 ` Jonathan Cameron 2015-06-02 19:36 ` Kevin Tsai 2015-06-02 22:16 ` Jonathan Cameron 2015-06-03 22:08 ` Kevin Tsai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).