Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3256018rdh; Mon, 27 Nov 2023 09:35:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHj3kWMVFEZEDWzcFMS66zc+Uk23NiInwAShu959QAotBT06HGrmW0NalyRIZdlNiUMpOk+ X-Received: by 2002:a05:6a20:4419:b0:187:4ee0:e95e with SMTP id ce25-20020a056a20441900b001874ee0e95emr14545747pzb.52.1701106505235; Mon, 27 Nov 2023 09:35:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701106505; cv=none; d=google.com; s=arc-20160816; b=Uzpi4u/e8VxacY5UBHP9rl9501plIpxyYTvtX9QrNwMV5uWZbnOB1Y2X0izJ0OWC3y 50zPY8cRJcw6yNUtB4odPSMNwukivS8s1YSiFmzqc8fYZhXjWs2Mysu+Hb8g7a6pObfF zVvSY7puPf9S/Jnunx32wWp6UxerxLQFaNKxQSf7J3c5Lir5NVQPUKB/O+Mn5vof8A+9 UbqSgo4zNkvh1FwhrLaUkJH6Cpiim0nhwi7ahUFiuaSYrd9zw3f5WwbChG5VdZ+1ZBsC N1KVsqtcitDnkmHLLkZ7nw1HxvxroRhlQ12+iZOHSbCUAuR3zOdSHelaYsF9KTikzKXJ MyNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=PyJvKifjCksa9ZtBNafx8NGbx/DvHUPSdg3ul1e3Sf4=; fh=jcGSzGD5OROf8fZ/j4QKJ+wL1JghxO2NoWzmibggfGc=; b=i4sLoYbbfeJ7U9vsNsB1qsvE8C4XxmMwvGO4SJF8hT+D1yVOZ6gtDlTDhmqHC75aK/ IBtb346+Sju2mYNIro3MDErDqBXlFsMGm+61gQnVO7kdjGQe0BqeE/DKKCn/HQff4Kgq Q2Kut2V4ZYQIev4tVhgOZpWPqfx44X1Nu9woDBaXRg2tTpiAzWmKF1tYTomyhRR63hvm MWfatTCsYbmTexPvTrbY2dIGtE8gr6QVp8hPzWHBBX+ocpL8vnt2FdhGNT6dWuBSoPCI fkVqRZtIe7UU6Id/ct9rvIpwPrfhP9Arbw6QiOc2UgiL07Y/bxxP1snEWdGLTTF0JsTL 05tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=juvTSLRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id l19-20020a635b53000000b0058986c61bb6si9908546pgm.706.2023.11.27.09.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:35:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=juvTSLRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7DBDA807C5E4; Mon, 27 Nov 2023 09:35:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230404AbjK0Re2 (ORCPT + 99 others); Mon, 27 Nov 2023 12:34:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbjK0Re1 (ORCPT ); Mon, 27 Nov 2023 12:34:27 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91F9DBF; Mon, 27 Nov 2023 09:34:33 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40b2ad4953cso31187565e9.0; Mon, 27 Nov 2023 09:34:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701106472; x=1701711272; 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=PyJvKifjCksa9ZtBNafx8NGbx/DvHUPSdg3ul1e3Sf4=; b=juvTSLRlrh0oBcF6skbrzI0/xDhJe0tkyNGvf9L/a1psJQF9mwIj9tL1NcEiVv037A K69QfaB5EtNCEd0ykfdy3XX8QR4I6x6fhA1/MJQysXVUDp1BfIpKLMw+qtYEjSPGreXk kYnMFUiSFk0FMfJELPFGLWJeIntEW7kQ1OrzQsXXqKPZ24+vh3K7FpLUHP/1GLPTWfP8 0L0dI0QmZLRNy0ioi7OTqX32ZhnbHThv44G/QdPJZj9kTNw3DGUxhHyQ1Fbcgf4jib+7 Z/DdIxtPYA3ZgbrKeCdAh/jssaO4ma2EZ8VbTPGiGZ/rH1EQ5nUz1EBrOx6fbiJbciJY uIyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701106472; x=1701711272; 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=PyJvKifjCksa9ZtBNafx8NGbx/DvHUPSdg3ul1e3Sf4=; b=tIt+sJAcjzlEWSw50cEIiEdNXfRvVn7+EiiV21xEDjANv/aCHM+SoSrcUCmR4SrEtU 7lr/YWhS+B9Fd6mQtlOXN+sPXZ5vL1TPrhTtOzRPLa8bmxeZ6T+0gnCFPhAl6kPpvpH5 PZBqADPxPdK0JXZeq/77uZJASf3HH2V68GMzHIIt03V7eV6xwK9CjiUn60Ul188VAyOn 4hd1LDMzaalgAqFJ2NzxKA6z/35TXHcAzSjWBJ5foV4WWO0iCMP60RrD14gVlk6KU803 mJaedPU5fwg/C9UmULvGDO/37Bk/SVb9g+npZ0R6SoiXaLLOrBIj2+jqhqV4Codo4HlL KwLA== X-Gm-Message-State: AOJu0Yzg9EHajr+GG0AGxyYn2n612No49ij5b4fLknFUQtogvtg/Mvuw D3inuNkEgwTZ0TdweFiZJayVhPyJB7VW4Q== X-Received: by 2002:a05:600c:4311:b0:40b:3de0:8e1a with SMTP id p17-20020a05600c431100b0040b3de08e1amr8818528wme.8.1701106471769; Mon, 27 Nov 2023 09:34:31 -0800 (PST) Received: from [127.0.1.1] (2a02-8389-41cf-e200-aa01-5533-a7bc-788c.cable.dynamic.v6.surfer.at. [2a02:8389:41cf:e200:aa01:5533:a7bc:788c]) by smtp.gmail.com with ESMTPSA id je19-20020a05600c1f9300b004083729fc14sm15139626wmb.20.2023.11.27.09.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:34:31 -0800 (PST) From: Javier Carrasco Date: Mon, 27 Nov 2023 18:34:28 +0100 Subject: [PATCH v3 1/3] iio: add modifiers for A and B ultraviolet light MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231110-veml6075-v3-1-6ee46775b422@gmail.com> References: <20231110-veml6075-v3-0-6ee46775b422@gmail.com> In-Reply-To: <20231110-veml6075-v3-0-6ee46775b422@gmail.com> To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701106468; l=3539; i=javier.carrasco.cruz@gmail.com; s=20230509; h=from:subject:message-id; bh=nymkBqy1zy5W1DkFZRCIlPpGK++jMxfNLk6XrJLr6Js=; b=h12Af9aReHwXBlM3aaq1w/sc4T+TrrTLPXOY99BCW8d4DKjbk3MLJWF//2bDf4yli7nGrA1VB l6v3ww3QOqqBNb1IiOI3z9eWcz+AjkyR4kmRC/dFrSD/YKtkcoDaqvc X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 27 Nov 2023 09:35:02 -0800 (PST) Currently there are only two modifiers for ultraviolet light: a generic one for any ultraviolet light (IIO_MOD_LIGHT_UV) and one for deep ultraviolet (IIO_MOD_LIGHT_DUV), which is also referred as ultraviolet C (UV-C) band and covers short-wave ultraviolet. There are still no modifiers for the long-wave and medium-wave ultraviolet bands. These two bands are the main components used to obtain the UV index on the Earth's surface. Add modifiers for the ultraviolet A (UV-A) and ultraviolet B (UV-B) bands. Signed-off-by: Javier Carrasco --- Documentation/ABI/testing/sysfs-bus-iio | 7 +++++-- drivers/iio/industrialio-core.c | 2 ++ include/uapi/linux/iio/types.h | 2 ++ tools/iio/iio_event_monitor.c | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 19cde14f3869..e2a9937be99c 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1574,6 +1574,8 @@ What: /sys/.../iio:deviceX/in_intensityY_raw What: /sys/.../iio:deviceX/in_intensityY_ir_raw What: /sys/.../iio:deviceX/in_intensityY_both_raw What: /sys/.../iio:deviceX/in_intensityY_uv_raw +What: /sys/.../iio:deviceX/in_intensityY_uva_raw +What: /sys/.../iio:deviceX/in_intensityY_uvb_raw What: /sys/.../iio:deviceX/in_intensityY_duv_raw KernelVersion: 3.4 Contact: linux-iio@vger.kernel.org @@ -1582,8 +1584,9 @@ Description: that measurements contain visible and infrared light components or just infrared light, respectively. Modifier uv indicates that measurements contain ultraviolet light - components. Modifier duv indicates that measurements - contain deep ultraviolet light components. + components. Modifiers uva, uvb and duv indicate that + measurements contain A, B or deep (C) ultraviolet light + components respectively. What: /sys/.../iio:deviceX/in_uvindex_input KernelVersion: 4.6 diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index c77745b594bd..65f567e4ff2a 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -117,6 +117,8 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_BLUE] = "blue", [IIO_MOD_LIGHT_UV] = "uv", + [IIO_MOD_LIGHT_UVA] = "uva", + [IIO_MOD_LIGHT_UVB] = "uvb", [IIO_MOD_LIGHT_DUV] = "duv", [IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_TEMP_AMBIENT] = "ambient", diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index 9c2ffdcd6623..5060963707b1 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -91,6 +91,8 @@ enum iio_modifier { IIO_MOD_CO2, IIO_MOD_VOC, IIO_MOD_LIGHT_UV, + IIO_MOD_LIGHT_UVA, + IIO_MOD_LIGHT_UVB, IIO_MOD_LIGHT_DUV, IIO_MOD_PM1, IIO_MOD_PM2P5, diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index 2eaaa7123b04..8073c9e4fe46 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -105,6 +105,8 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_BLUE] = "blue", [IIO_MOD_LIGHT_UV] = "uv", + [IIO_MOD_LIGHT_UVA] = "uva", + [IIO_MOD_LIGHT_UVB] = "uvb", [IIO_MOD_LIGHT_DUV] = "duv", [IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_TEMP_AMBIENT] = "ambient", -- 2.39.2