From patchwork Thu Jul 19 20:26:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Maxime_Roussin-B=C3=A9langer?= X-Patchwork-Id: 10535287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7E1D5600D0 for ; Thu, 19 Jul 2018 20:26:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67E0829CB1 for ; Thu, 19 Jul 2018 20:26:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58B1F29CBA; Thu, 19 Jul 2018 20:26:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E788229CB1 for ; Thu, 19 Jul 2018 20:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727499AbeGSVL0 (ORCPT ); Thu, 19 Jul 2018 17:11:26 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:41859 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727492AbeGSVL0 (ORCPT ); Thu, 19 Jul 2018 17:11:26 -0400 Received: by mail-qk0-f195.google.com with SMTP id d22-v6so5040786qkc.8 for ; Thu, 19 Jul 2018 13:26:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V5KZZ3CvSNXmUvVjQC/CRghCZ85YaK7EH72JwUPfymw=; b=Dow//hVueBsMRUs+tjHnCbmDJd6+1ccx4LDOZncqHrAJkYdSrYXCjBQwhwPwdzxq2y DDLM0XVdrFzSFAoC7H9RXn4trxGU8w5NHU4sNPmJAcEKgu4eyZj6VpA3x+q/TknBsCIB a2rz4IwMGb2z4GGZPQ9zdN865l8jdiKkNFd/mf9KwNc1rtbQwd7dHn159BVejXq93ZF8 Nvt2J5/T2SEg0jr8VaFqiUwC9vmGWq/Eth9tvAWD3J5/lIEr5Plsn7SGHa4dI4kOghf8 0/Hux4oynSiUXAUCpw46lWN2OkjcUQ2Q4gh1e7n1UVIn/SiofpzX5mROoLk1X5Xv8wAZ mcww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V5KZZ3CvSNXmUvVjQC/CRghCZ85YaK7EH72JwUPfymw=; b=lhotKnqYAq3Wj7rZLTw8LCCrRbvb3ctVC9MVcf9/HsshuJGZO07ehCyuBQ6rQfmoH5 qcGYITKJ1Id4YORzLjVehPaGx1pxfvPHOFix7DV2olIm5DbiEoEB1ypCDAJF3lvY7v8t aYQzWTJG2yK5WdytivkhDE8Ai8rlwK1PUUCmcHbixXhIU/uH8wTZIGVxcRWcn/AwQDXn X4MPY9CeOpnKAlPiLkTxA/1wbCIJ8QoLvxz2Kje+VQVq12hfsDGu8N66qowPnKoq82AW Pbgk0CX7K4g1C5iYhZ3oxprnmoMSNwHB+tRdU+Rj7MNdpOYUnEodlm9VEj3s9y77iRch z1Kg== X-Gm-Message-State: AOUpUlHb8bJEkPbB3qobFywUisFj2CF1QawlOqf6UBFjrVYhYUmsAqSc 1jtCPzs3rV+64OVctM1I9bI= X-Google-Smtp-Source: AAOMgpeHek9/VPOcwvbnEj5UUzU/Wb/9POY0F1Mff7wZRLj8csjqVA5KMPhXz7Ap4gTLLz97agysgg== X-Received: by 2002:a37:5744:: with SMTP id l65-v6mr10565944qkb.216.1532032001017; Thu, 19 Jul 2018 13:26:41 -0700 (PDT) Received: from mbedesk.Sonatest.net (ipagstaticip-d73c7528-4de5-0861-800b-03d8b15e3869.sdsl.bell.ca. [174.94.156.236]) by smtp.gmail.com with ESMTPSA id g207-v6sm76748qke.41.2018.07.19.13.26.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 13:26:40 -0700 (PDT) From: =?UTF-8?q?Maxime=20Roussin-B=C3=A9langer?= To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Cc: linux-iio@vger.kernel.org, Jean-Francois Dagenais , =?UTF-8?q?Maxime=20Roussin-B=C3=A9langer?= Subject: [PATCH v3 1/2] iio: Add modifier for DUV light Date: Thu, 19 Jul 2018 16:26:24 -0400 Message-Id: <20180719202625.25060-1-maxime.roussinbelanger@gmail.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Maxime Roussin-BĂ©langer --- Documentation/ABI/testing/sysfs-bus-iio | 4 +++- drivers/iio/industrialio-core.c | 1 + include/uapi/linux/iio/types.h | 1 + tools/iio/iio_event_monitor.c | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index fee35c00cc4e..23b213f87cf5 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1263,13 +1263,15 @@ 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_duv_raw KernelVersion: 3.4 Contact: linux-iio@vger.kernel.org Description: Unit-less light intensity. Modifiers both and ir indicate that measurements contains visible and infrared light components or just infrared light, respectively. Modifier uv indicates - that measurements contain ultraviolet light components. + that measurements contain ultraviolet light components. Modifier duv + indicates that measurements contain deep ultraviolet light components. 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 fc340ed3dca1..66aba36d7fe1 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -104,6 +104,7 @@ 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_DUV] = "duv", [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 22e5e589a274..bf037a267c7d 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -80,6 +80,7 @@ enum iio_modifier { IIO_MOD_CO2, IIO_MOD_VOC, IIO_MOD_LIGHT_UV, + IIO_MOD_LIGHT_DUV, }; enum iio_event_type { diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index d9b7e0f306c6..328c66d8a892 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -95,6 +95,7 @@ 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_DUV] = "duv", [IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_TEMP_AMBIENT] = "ambient", [IIO_MOD_TEMP_OBJECT] = "object", @@ -176,6 +177,7 @@ static bool event_is_known(struct iio_event_data *event) case IIO_MOD_LIGHT_GREEN: case IIO_MOD_LIGHT_BLUE: case IIO_MOD_LIGHT_UV: + case IIO_MOD_LIGHT_DUV: case IIO_MOD_QUATERNION: case IIO_MOD_TEMP_AMBIENT: case IIO_MOD_TEMP_OBJECT: