From patchwork Tue Jan 23 10:43:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 190840 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp245503dyi; Tue, 23 Jan 2024 02:43:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLMpMb2WwWqTOSKCCOrc3UbcjMG4UIRnyvkOr0MKjHK6dMWKy6HpYraksPPTZ8ofGjb9Dk X-Received: by 2002:a05:6214:20e3:b0:681:78e0:505e with SMTP id 3-20020a05621420e300b0068178e0505emr926134qvk.41.1706006611484; Tue, 23 Jan 2024 02:43:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706006611; cv=pass; d=google.com; s=arc-20160816; b=SZrsEP5FIwM8bdYS2g6wjRGTWi1IEXeo3a2OENRdlPtNZM0FWIJEX5uMeSa7UexHhS MzGeOGqaLR3U4GRdDK4TPtZCWI8pArdMXRPPRvZoN6YGWXT7RcdMj9IRC7n9x6hS16+s 8GNBu+Dn50Dk0ivSxwx2sDfMjSAI3VO8TPnKkzJTnC/l7VAmZEwHWEYGs5+4k1oAM0GM fYmORUxg2LKdDxH4MvMi832MgI1lBYehLHn4F2B9obUQzgL3yvGab/mpZs0ZejweNfiy 6K/LjgsJMur3Hi7HengIqR010/mLgm4DC1J8i3ByFzKWp0Ytr6OH9ADUGyrzo2RdjuNO PM4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=q53mcc9cShf3bZyxlCnOlEd1xHk0CToCbzGmhqgBkTs=; fh=j78Hl0hHwVx6t7voJEWajCO3HNlUP+t+7a0b5jBHSJA=; b=CQQd6mDg7o2MNvE8UACyGuy5yMYCI4JHAT1CJG7Ez/bUZuXi+eLI6mZoeizJe5m+Is 0YIsgs8xtByzEyBMyDU7Lj2nJYbAL9Ex0R+K3LfrZqDhRzd9kQurU21mZ29mU/4vG+IV aG8cVANtSmvXjkRM+np1IH93dyOxmH0T1ONGXPzFp6i/01qHbRj5VWotNMiEGjwe8X3c U1qWBPxIHM9wnyo6NXghr9yrcewkfj0zj/YqaHlffU0kalzP8nha7XVvv7jNJpL1mYnA OL5uZ63yaM75BwFVYcBjziOe2YKnNTLHQCOVI9NvrjTuDZG4hY5ctT3t2pFkeqCcQM2k JZlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=k+Dhaxbr; arc=pass (i=1 spf=pass spfdomain=crapouillou.net dkim=pass dkdomain=crapouillou.net dmarc=pass fromdomain=crapouillou.net); spf=pass (google.com: domain of linux-kernel+bounces-35111-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35111-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j8-20020a0cf508000000b0068526c545b3si7755310qvm.118.2024.01.23.02.43.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:43:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35111-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=k+Dhaxbr; arc=pass (i=1 spf=pass spfdomain=crapouillou.net dkim=pass dkdomain=crapouillou.net dmarc=pass fromdomain=crapouillou.net); spf=pass (google.com: domain of linux-kernel+bounces-35111-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35111-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2D9E51C22EF9 for ; Tue, 23 Jan 2024 10:43:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54DFB5C8FD; Tue, 23 Jan 2024 10:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="k+Dhaxbr" Received: from aposti.net (aposti.net [89.234.176.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C29459B64; Tue, 23 Jan 2024 10:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.234.176.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706006595; cv=none; b=CaK3Y9lseJfDWVNjO/wIzlfBHowPy8L+ihH1oeWrCQc+rI7gYjecQMb9sn5dMMUBUx6AE8AkNzheI+lwdsSltMw+0E091cQBs+GKUC6FMjtjWys3s5S34XvjBSygvQOJ92YZC1hy2I3ZwFFx84rbWNiPH2Uq1yRNMsDtciaNxjs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706006595; c=relaxed/simple; bh=jYQ6Xv2AW3WuEU9RW+PvztluEcow2glWwD06WlcJ0aU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EDnzSG6k4TfkGOKKerrTBEM3v8fYaoUzMkk4rv8Wt1GLYy0yH+qwUkt4YNtnZ+rl2qKLKSgOEtrl7noRiYXFT4ubCClA/F1A+FImRPECE5x1w0Rq+4ji5N+8u97kwmBzWpGNSxrNC74nJF9V0VA4EUPV7LZymlBfWXxLk4LavZg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=crapouillou.net; spf=pass smtp.mailfrom=crapouillou.net; dkim=pass (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b=k+Dhaxbr; arc=none smtp.client-ip=89.234.176.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=crapouillou.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crapouillou.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1706006591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=q53mcc9cShf3bZyxlCnOlEd1xHk0CToCbzGmhqgBkTs=; b=k+Dhaxbrow+HPm91RqOGceg7kIrlMFfxc5gyN247fQ4SSo2bZ3HdW13bxv1DqAXWXOF6pu AJxODZpFDOnIVA6dG8WsztojPxfIXqb8UZLnoUTvEVEwRwNOOI+o7P7VMyybAm/ce3l3OI 25VAHK7iXB6gK80K721a5ZNAEmPges0= From: Paul Cercueil To: Jonathan Cameron , Javier Carrasco , Lars-Peter Clausen Cc: Nuno Sa , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH] Revert "iio: add modifiers for A and B ultraviolet light" Date: Tue, 23 Jan 2024 11:43:05 +0100 Message-ID: <20240123104305.10881-1-paul@crapouillou.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam: Yes X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788877588893425312 X-GMAIL-MSGID: 1788877588893425312 This reverts b89710bd215e ("iio: add modifiers for A and B ultraviolet light") Enum iio_modifer is *ABI*, you can't just decide to change all the values from one version to another, otherwise you break userspace. The new entries should have been added to the end of the enum. Signed-off-by: Paul Cercueil --- 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, 2 insertions(+), 11 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 2e6d5ebfd3c7..7937bb4a4a68 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1587,8 +1587,6 @@ 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 @@ -1597,9 +1595,8 @@ Description: that measurements contain visible and infrared light components or just infrared light, respectively. Modifier uv indicates that measurements contain ultraviolet light - components. Modifiers uva, uvb and duv indicate that - measurements contain A, B or deep (C) ultraviolet light - components respectively. + 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 9a85752124dd..bce09d325142 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -117,8 +117,6 @@ 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 5060963707b1..9c2ffdcd6623 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -91,8 +91,6 @@ 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 8073c9e4fe46..2eaaa7123b04 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -105,8 +105,6 @@ 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",