From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dl1-f46.google.com (mail-dl1-f46.google.com [74.125.82.46]) (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 512131C3BFC for ; Sun, 18 Jan 2026 18:17:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760231; cv=none; b=sgZ8aTC1B25e2CyoZIOTTjWLRoUvZAZX2A+xTeatlnd4ZT6VmNN8KAGAsCfxGFpsFES1oQnHXORlQy0dZ+xGm69yy7hLHibF6u3NUg4b1owVk13jt64QdqwzO2lzGPhfvCBGCKFy2qAdt7qINsyzOEJwWpCmMBh9MbziSMxF9yo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760231; c=relaxed/simple; bh=bNqOsf+Er9T/BicBQu+jS+4NqWSZEqVuapxQWYxf19M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a2JNu5yF7MBpe9Nas1HiREqX0m3G/IqSlRo66P6w3T+UKBYUHq0Fe4nQhc+6FgHeM4KPVwT5XEyfkhCLSZHuNNO2eLBEjv+awjrfFsI5SNpOCQ23xgjRkZZbXNy9nKQckYVG4JWht8TxhMcvQr/RYVINg2YYcYndiBUUPoqt+EE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c8Ih6imD; arc=none smtp.client-ip=74.125.82.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c8Ih6imD" Received: by mail-dl1-f46.google.com with SMTP id a92af1059eb24-124566b6693so2931987c88.0 for ; Sun, 18 Jan 2026 10:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760229; x=1769365029; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Xq8sPvdkKDXB1kDhAQYhIQZLysAVgLtJrDRRp+zcM8k=; b=c8Ih6imDgKwmlhlPkNJM4GvBgp4b+CCTWnyw0bgC0/r7DfFvq4SI7Ek7o7pD3Le/Ra Vun0xuiJ52KJ2ULj89x1zzgHR8BbN1QCPS1Y0McFfspwLwc2uJo8O3JWlxOe37m3SdX/ ch/FdaFdOv24CpUr9wtmuD/hehyCdrLVxEZC99mzB4Lifs2D/c4KtiEYVQ5tFAr1+pkn 1SyFOP6qhxqlMU/zZ1z7VNnSPAlgbb6LqfyEq1CyJbc90Y4ODXYON7NeL3DeypYKZYAa 5XstVEld0S3xp0Jl3mpTAa7Wl5iUeAcbrKZ3dr5FFG5dOObkQroYFif/r4w8mfORSwPX 927g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760229; x=1769365029; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xq8sPvdkKDXB1kDhAQYhIQZLysAVgLtJrDRRp+zcM8k=; b=MqrfA4lhgx+i4IM3REymUWgQxbYZwPWNoWc3O3uXYpyjxoyrwKlLF6R+9DuX+qQRw+ s7MjS76hst2p1GDvNV/GYK8ixayoYdW2o7nfCXP3jZwg/aUwUIpsTZ5HCX3QwPnK3tsy 12qKOdxJYJp5sgt/LeHyla5VRW3Bq96MnmC07kbyrlIbCBe9vWK1xWzeSER7lSgt4hOR 8IIL98/bv6apygkEBPoOYewZ+q55SILBXpQwldi+fMvbhypEMPb3SFcqbNkNhmDNo8KT OlZjyJmOu2quI79yk8Txcp9KmO/NJdYAp5K4xIjlqtY1oBj/ThTxlvKcn0VxKM99RWfc uNGQ== X-Forwarded-Encrypted: i=1; AJvYcCXl75RE7gNdyGvWseM/dEKFvrT5iuabO8obFDykYR9Lz6e2NDrl38gg9yfPCXX0tX1YynXT6a7TLQ6lulM=@vger.kernel.org X-Gm-Message-State: AOJu0YwjdUPgqv+FfXZqXmJ0cqYmiC44VFsv9bjqCc2Kg81N4SuJrgnE 538hx0RA4kfrH+7IS3jmlHMEkpznnAMjI949Y34kr1PUCNZuqKup+Ebb X-Gm-Gg: AY/fxX4laETaRLOKvZbF7cW87//Kx2NVjy+AK1uUd7rHTKdneVrJ3Gf0qCQgS9xd2l2 dwjVjUG0tAokz9Sgys8zDe6R1BjxrjkpuHbAxwvuLJgnS+sq7RLX3c81BbFVzd9BR1vleYfCK8C G7Y0LAtrQONJkgJFkGJnh1kGdBKBzavIq3K4pYzs62OhOimcB5vS3Vx9YJB59ebOiFbtpkSYgM2 uN092JuwSo7j39YEa7zWgVb44gNGj38JXP7SSvQqQ7EkGXSAgdZ3SBk61gH2ZWzGlHHPAhTQFoT mAZqghVb0OVBOIlZp+lJ/NgvVyVemWMa9t4xSLlWGL9CRLYJoRc1BFnfVrs6Mz1q8P+GCpXqacL OUBf/KUiHyc+YbPd98392vl7hiCV23efKtNkh3Lw9K8fX6wtmCW8tu5K7N0fkKC+WbKsPWIniCh 8kK/Zz6KY+n1m543uy6vogjATOEAp1YQ== X-Received: by 2002:a05:7300:23c7:b0:2ae:56dc:eb18 with SMTP id 5a478bee46e88-2b6b5002350mr7923289eec.21.1768760227678; Sun, 18 Jan 2026 10:17:07 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b34c11c4sm9958088eec.1.2026.01.18.10.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:17:07 -0800 (PST) Date: Sun, 18 Jan 2026 15:18:57 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 1/9] iio: ABI: Drop unused in_energy_input Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" No IIO driver declares a channel of type IIO_ENERGY with info_mask containing IIO_CHAN_INFO_PROCESSED. Thus, in_energy_input has never been seen in user space. Fixes: 72c66644673a ("iio: core: Introduce ENERGY channel type") Signed-off-by: Marcelo Schmitt --- Added a fix tag though not sure it's needed/desired since it might not be w= orth to backport documentation? Documentation/ABI/testing/sysfs-bus-iio | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/te= sting/sysfs-bus-iio index 5f87dcee78f7..aec39b8e3345 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1601,7 +1601,6 @@ Description: For a list of available output power modes read in_accel_power_mode_available. =20 -What: /sys/.../iio:deviceX/in_energy_input What: /sys/.../iio:deviceX/in_energy_raw What: /sys/.../iio:deviceX/in_energyY_active_raw What: /sys/.../iio:deviceX/in_energyY_reactive_raw --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dl1-f42.google.com (mail-dl1-f42.google.com [74.125.82.42]) (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 14CE5500962 for ; Sun, 18 Jan 2026 18:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760295; cv=none; b=nsJ4nomVD33NNSEwx3+aRcpZo/L3XQXbDPbdG/cYSCGc+XoJNcBzrGpVlkCRlEtBYZawjKz/S7pjYWMeE/WLgBSMhgpUMBBL1CGThq4oucGkRmHatAMvSbejPNfPF2kcV0f6dzMuuojpHoP52v0UplqFck8WSs5H+E6RQ52WY2s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760295; c=relaxed/simple; bh=iyexZ1uaucSt1ZtG4+j8aM5C10e50O+oa0HN12eFl4E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=azI0SfWQOESX65yvTvmekyq/lb5IJVzpGh5CmeIj2jLobRtY8HcZjsxMIg0Jlwck5AeCSjevm+YuNfnFwaFPp+5W10M1fvmoe1SAKj6MszWLSU2Monekqa8DmGVwciRrs8wrNwMNi8w25UPUdvfqf6fnl79nKEK/S1tUKNIKamU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SW58QOHT; arc=none smtp.client-ip=74.125.82.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SW58QOHT" Received: by mail-dl1-f42.google.com with SMTP id a92af1059eb24-1233b953bebso2071432c88.1 for ; Sun, 18 Jan 2026 10:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760293; x=1769365093; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=61kCkgh29ac2ojrati3gqed3KfIfkHkJTk1NnGw8x7w=; b=SW58QOHTjo+lfSi4QdWo0qa+d40Kb5L9dO+chg0lTjBFOPuZGqbBBIt1u1PaNwaLs3 vuiJAiKjrL1W1XKtKpR7uH6T9rIP2WwBCZJ/z1wzwjk/rXoYAe1n0VFEcYXadtLeqqXI cyqifk/vXlt8UdirPJM5KuvhmoHrlat6IZM/fkuVfeeLpJKjn4+WKibvLkaj3Ue8DQne 8dLIEVf1IndAdDLRT/z45NFYaWGrlmjuy7H74qWgyZJ2uT9k7CLe7yXcZajyjfME2xAE aGZkdUdBatfMLpTIwVrn8EsTNN+My0HZJt3Ocu0m/MRzFykf2EIwIoFOylBpOCfCM467 X39Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760293; x=1769365093; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=61kCkgh29ac2ojrati3gqed3KfIfkHkJTk1NnGw8x7w=; b=nEnfNKYsMwrUpG3SEdpItfOToTznTtY5Xl6iHMQ4TjFzw09w5Nc1hZH7W6mo+uo5nl 4dwsnmFzFck/4eizxcm9iokwrHxa8NesY8jjQ7nI4ttSE9ll1/9ONcaco64yO+5dPUPp sn/8EGV8+rLp6p66s6daamsw/hy/orxSGGZVXlc7leJVId2aaKE7aRvpMO7qPuPZFyAg xK55oLadg/kYJHXN+Xnt7uvjl2ZqW5y/WEl9YoCAABW6ymDni4tv6YYfca8LkEnuy3En 9TQ9/K6TSCjc6AOlH1OSfPpOf95oNlzRASdfkkul10tId3HA4Ln/FqPCo00RevcShKoF n90Q== X-Forwarded-Encrypted: i=1; AJvYcCVH4g4j/GRRq7fvd/T7I+Jl/BzdKqPPr2hgRX6us38CdDgezFAOCSTcX/7nPGKKmMN3HQjuAyomqwUHWjk=@vger.kernel.org X-Gm-Message-State: AOJu0YzrcA/ajGaAYhy9kqyM3wE3hQUkhGUkGRZIuK9aUXd1pnveeYUM Gm1ftcjmYHJWjvH0d3XNcmYhX6ScTrXfHvfMvVDKH5OTIedTxjQQfYl9 X-Gm-Gg: AY/fxX47rUXNg30b2rs8WnP3+d8XB6DbnvVIo5/OW/ZS4CNc/N+QhF1L4MQzg4Aap9R IziFH/DDymmNsjQRRyivuY6Uqa1tNkZRjRnouxme8efFKzTJhcshc+dVzGvcZJ05QomhXrAOz4B DvQNk850fbSKTv/fB3f2HQwYtAW1y8EDii3v2SwYdf53mJFuQa0r8lM367kCQTg2PxROrpnn9Ac 1y4qgzA/B8MJwqTVxJj79bcUt+Uq2LZw01OKQCRIlKbP5M6nlDBw0kaYaZ0G2W+c9ItcHGmP/wy nUwb4F5AeDXtWMIpW57nabcc5zSNYxqgz92KlDoavK+n1VeEyOTx2xgGmL8iX0lnU/Inhmyfaxb 3/90Fl4WZUYFc7VGisx+yP8x7o50nUAc00AIcGM1qaHLwvkbum5UnOFpN4Bw+OnvUuweBRDr+Ms Pm7V4OozwV290b7eVpCbApmIm7bttdfQ== X-Received: by 2002:a05:7300:fd18:b0:2b0:542a:227d with SMTP id 5a478bee46e88-2b6b3f21d9cmr9357578eec.2.1768760292896; Sun, 18 Jan 2026 10:18:12 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b3651f39sm10000367eec.24.2026.01.18.10.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:18:12 -0800 (PST) Date: Sun, 18 Jan 2026 15:20:03 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 2/9] iio: ABI: Accurately describe in_distance_input Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is only one driver (drivers/iio/accel/mma9553.c) that declares a channel of type IIO_DISTANCE with an info_mask containing IIO_CHAN_INFO_PROCESSED. Though, mma9553.c provides distance in meters (as would be expected for the _input interface). Split in_distance_raw and in_distance_input ABI documentation to provide accurate description for the in_distance_input interface. Fixes: 7cf78db585b1 ("iio: Add ABI documentation for illuminance raw and sc= ale values in light") Signed-off-by: Marcelo Schmitt --- Added a fix tag though not sure it's needed/desired since it might not be w= orth to backport documentation? Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/te= sting/sysfs-bus-iio index aec39b8e3345..27251b65ea0e 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1613,6 +1613,13 @@ Description: user). Units after application of scale are Joules. =20 What: /sys/.../iio:deviceX/in_distance_input +KernelVersion: 4.0 +Contact: linux-iio@vger.kernel.org +Description: + This attribute is used to read the measured distance (in meters) + to an object or the distance covered by the user since the last + reboot while activated. + What: /sys/.../iio:deviceX/in_distance_raw KernelVersion: 4.0 Contact: linux-iio@vger.kernel.org --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dy1-f180.google.com (mail-dy1-f180.google.com [74.125.82.180]) (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 B2C6D1AF0AF for ; Sun, 18 Jan 2026 18:18:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760320; cv=none; b=WBB0wVbEjkq2v98adQCncfeolfY8aAoPUm1KtVsjAiHfQ317z69qMd7efy3XNS9IdlniaHjBbRdON+SXcFxr4AxHUSdt3R4FX0PZXCXLkpIDYxACFAHZv73dDfaYSK6kw1pACfcYUBLIihiXs/f1peqU9ULssQAEPPkO456LKTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760320; c=relaxed/simple; bh=CtmK6HGYEFLvkcfwWCpQjqpg2mFess9ardwFFVxb/Qw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X4cidXfaBZVgAVCpJgocljGZ2Ip4idDq17QL69raSOivgnyIguQoJuGmMUGA+iyNa2QTDy9JLOxRHYDNn7PKo3BIir3NUGlIMeUgMAp6upvc8Infcu0vIcv3A2rfSM7vYKEiSs7/DMMQI9ZEbq7qkYUDX9pW7wmdz2LHVy9TrIQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Y4dRGEze; arc=none smtp.client-ip=74.125.82.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y4dRGEze" Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-2b0ea1edf11so5729597eec.0 for ; Sun, 18 Jan 2026 10:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760319; x=1769365119; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fl7/Hk9e6cLXdvdH4SmgfnpJr7alHem/msvDuO1vXno=; b=Y4dRGEze+gLQhUD4Ip/F/gMdcxROj/I16s+AgBVI7/i8XbvO6r41S0pCW/m8IJOE+V 6i+KPiAW1w2e5Ohhi4a+CpsXKr3rO0UaEkDauiJZrK3rhoOiV+tYisjYdrfc3RFxJqfL 0zkpAsWX4YXvbU2KXKFpETB0fXx2qFSnMwD/cfU1fXJplxaATSZoVTdys+zkK2Kq0U9Q mviz7hWSmpBZ41BB6Cr/JEz5Z8i9YFVisRpK/H6Zrl6cSti3HCzR3HV09R7ogBb3w32S ZDOVbaGQuVpu6j+s+k9o5fQTYBcTmBDMa1B0l33DYL+iwXUzfMIJ0p3hp3LKS0Utt+uk 0joQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760319; x=1769365119; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fl7/Hk9e6cLXdvdH4SmgfnpJr7alHem/msvDuO1vXno=; b=n1uUogh1MH/Hk+y3Rno3HvhHaZYFPE0CjGNahbUuIeVohpqY2g+oBGJBqHaxGBp98l ajEv0J/kUXTq1LZe1+/rFMS4Z5HLIQ0A3KntqkA7kLqLT7vHoeqqjTYHVtOz9HtQTmWK 1Z9HPosjiiKL2OaeTfcAB2c/NTl+eKebOmCmahWJJMREk/KIux+1sSVg312lZIXsCWWU yc92sM1KKWinHwsu4cpaugfpnkl6lYBIt2HWHi/ouv4aRomFRwMQshrZyHcNKrWmjdoB VVrHe1zFcI31JoMAW5rvCzXDgoBTGH6CuwBF0vqSICu2C3Y9gCp/GkrLo2kcJw802m+D 2FqQ== X-Forwarded-Encrypted: i=1; AJvYcCXx3JhoEyp/ehPHTlw4/4ppu2y9M66dskfQeURm2VgeLOajHB3src5U4/jpBjVPeP7h9SrQlbLQ5w/doug=@vger.kernel.org X-Gm-Message-State: AOJu0YxNvwNQ51WMLqaVcvM3aaCrwfnPnHBrQgcbbh0u05R9mkcgwvr8 /XQLcjVJEfxoPDpSAtkWBb0c7tkjfYqg8z/CuOFX2hsVY4T0Y5KX6uAwJ9OX9B7B X-Gm-Gg: AY/fxX6ITSLiTno2NRP5Mos03OX4F43ILU8o2b3XKHrl0KvFfTlpFKjHqwRHuMv8DY1 mus/RwRy7TFSay5M4hhPaIGgNemZvlOX4qa4Ie1ssxIn9Rahmfc1TMcWtELVnHxvrDfic3tfv/q 3aw/4AVaAQPHuKdMv+OfXVdKmT3rkuQtuQnLBZuNdXPKoRZIpXZUie4Avz8wcdqbMpVB9Kk6PZC nBRbZK7+B0IdPygiNV9TmoAq/gYYbRreWqtre2foqrimt50qs+TR3rlYeogW/fFBhgVdJ0eKTlX zQtQcUgz9dV6Ej3afBDcn6wPPxl65Omoil2Y1CuJz5MeCeLoQm7aKP12eDVGooWmVfVi1WCzFg2 Ar8hIaryySbopUgL2YZzxFImr+4xrMbmUaVGSvnF6PjPszGHk7N95k5QUyTV/FU96oNidVIbFKO ap2YFXCc7XBm+3wPimmp4= X-Received: by 2002:a05:7300:c86:b0:2ae:5275:6901 with SMTP id 5a478bee46e88-2b6b503d29emr7165886eec.34.1768760318788; Sun, 18 Jan 2026 10:18:38 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b36564ffsm10024081eec.28.2026.01.18.10.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:18:38 -0800 (PST) Date: Sun, 18 Jan 2026 15:20:28 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 3/9] iio: ABI: Accurately describe in_illuminance[Y]_input Message-ID: <806ebcb6b4c9b2412fea92118b0d15678729a6da.1768759292.git.marcelo.schmitt1@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The drivers that provide channels of type IIO_LIGHT with info masks containing IIO_CHAN_INFO_PROCESSED provide values in lux through their in_illuminance[Y]_input attribute. A few drivers provide both in_illuminance[Y]_raw and in_illuminance[Y]_input and those also provide values in lux through in_illuminance[Y]_input (as one would expect from _input interfaces). The documentation, though, was previously describing in_illuminance[Y]_input attributes as if they would only provide values in lux after the application of offset and scale. Adjust the docs to provide accurate description for IIO channel in_illuminance[Y]_input interface. Signed-off-by: Marcelo Schmitt --- Documentation/ABI/testing/sysfs-bus-iio | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/te= sting/sysfs-bus-iio index 27251b65ea0e..9fb12f7a639d 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1652,8 +1652,13 @@ Description: application of scale and offset are meters. =20 What: /sys/.../iio:deviceX/in_illuminance_input -What: /sys/.../iio:deviceX/in_illuminance_raw What: /sys/.../iio:deviceX/in_illuminanceY_input +KernelVersion: 3.4 +Contact: linux-iio@vger.kernel.org +Description: + Illuminance measurement in lux. + +What: /sys/.../iio:deviceX/in_illuminance_raw What: /sys/.../iio:deviceX/in_illuminanceY_raw What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw What: /sys/.../iio:deviceX/in_illuminance_ir_raw --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dy1-f181.google.com (mail-dy1-f181.google.com [74.125.82.181]) (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 1410D1C3BFC for ; Sun, 18 Jan 2026 18:18:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760340; cv=none; b=dbe885XbmqYt3MGoG+h1UqChhucYJZhtW+iqET0UkTDJqNxwR511XsUtnj+VHWeJYlB2NvOojCoWZUywcYrTQ0RqIg3/xcNlHIoDQrEkq5BcNFj7OxOOgI6bHhfDkAckwugcLdNNzx7mBSyipgOuu45YmB0rAeu3CCeYE0NXPdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760340; c=relaxed/simple; bh=Z49hHTHLE6BlGQsXIHHxyZuEZ0nDhdH1xLK4wdZMR4k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bzhW7o1xbj+5kJtDE9P7Qj+C29HCjfzcNS4u6Dgx0vbLOVSAEjkMApFouWuApp5NPcRXqEqtfMli8mVEXplUHLrCmtj2unLZC38Vxem4+CIXLwREdXdcAn5dolqZb2SAtSd9weC7tRBm9aPBb4LYmRuSIulE5DxcMxYUqk9EABk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jgeYweSZ; arc=none smtp.client-ip=74.125.82.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jgeYweSZ" Received: by mail-dy1-f181.google.com with SMTP id 5a478bee46e88-2b6bf6adc65so2887210eec.0 for ; Sun, 18 Jan 2026 10:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760338; x=1769365138; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HvLt5Jh4eGSGuUvZS112YWi2lb/1oXjHpA46lXaxmkY=; b=jgeYweSZ3LtprPedq26S8FHF9UETB4uxkHjFyO8gM2aGf3UIm1ZpyN48ThKohMGlRU rKCDytUJcq4kWCrOFumZ8pK//oKfzc5oE52aPUcMOLX8z0QC/o+DR7XuVBfxzwjbpYe5 ULddmRgJNWt3UOKCiGSLlCb7LKB2EqIAiMtsJMnQDPSOS9UrFvppSQDBLXR4zwY1cfzk c6MZ70BFEY0mlYoJUk6yyK66L5NqN8cK1NT4K/8SelBXl/iAUf6za8g96bamXEyEpln6 8OTptgekgxRWS36Ucof9OpuAE9nApZ/Af3yG2P4hjFUngCRfoSlpqMihAHCHNjITO1YZ 0EHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760338; x=1769365138; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HvLt5Jh4eGSGuUvZS112YWi2lb/1oXjHpA46lXaxmkY=; b=beoGne1Qi81HWBRjkfEDk2q/kasfgjk0WiUJXvu1M/syB+NNF5XxPCz3zr3RAUm4as t0NT9iSeqUT+P0lU9lzItSqA2R4cFm0tIV8xwH2dUPV80Kpigvab0kUdHVlkYgHpVn/P +CPcILVsiMQC6in4iTxadvJ9tYnkR/3q18bLKPKBWbuzy2OlybeVExW/jU6/NIXgOJkZ DBRayxwjgIoLhjISndml9EMXH3i4SdZkJ1q22mdF4WL/NTOnpqytQ7WSS53YKgUwePQe b6MqOquks5gu1UNXbpfIH/lVkvOLlO8LWEsIw87L0GixxyCqZTy6N16d+WeWZI1qpf8C W/YQ== X-Forwarded-Encrypted: i=1; AJvYcCVYjHttABM+Cn3mgMQniTH51I92/lzGFAl23uUK7VBrTJwREuQPJGKo/0E3ddY8oe2y5AZYaKtPBGPwS7M=@vger.kernel.org X-Gm-Message-State: AOJu0YwxRRsdP3y3+XlJFtHJtMpOnadvP3Hjn1ka+9ySlclV+bY53sMs V+Wn5zfFFV51KMH9RDYxmxf81Tp6QAfLC6e701vbEUU+wdcSDSwIOoF1 X-Gm-Gg: AY/fxX4BcZJuG3Ca/ICktQjpWAhO6mLqjPoCqkyAqaT0QD11oHL9wnY36tTpLGVIbSt kl7aLKLHKMWSrwKkSstbsyoOfT4XW0SIM2tyBnywkbiJL12c4H6dV8pMgvHChfIxNO/ZXwmPcRk YAjthhn81LuJQ48Bpl3jwRBvhoCUbqfDL4LI4EtgQM+dHyWI/McMN0ldT4IYsF9m/VxDJpcTtzL PgXASqZyPuxjN/CXnr2+Pdu/+F3WprXwnBNjq9Pn7o9pm9beNzUC4xpq5R9UXguAhoJX+FXxu04 +aHmfQXFipXu9wd5cTDQF2yVnAOSLC0u9ddF2P0a4b2KOtwXgL022QhcHevnDBxnJ+yHzRZIJc/ 9onlVF96zJpftow3Y+Bo1hoM4k07adtYusZI22eV/MaJTiVW4b493LJlraRJzBp+Ee9tfQNvm+R RW1dUvv9XLRuG4xrmjLZ8= X-Received: by 2002:a05:7301:1687:b0:2a7:83e:7b17 with SMTP id 5a478bee46e88-2b6b46e6ddfmr6847473eec.12.1768760338162; Sun, 18 Jan 2026 10:18:58 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b36550dfsm10022555eec.25.2026.01.18.10.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:18:57 -0800 (PST) Date: Sun, 18 Jan 2026 15:20:47 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 4/9] iio: ABI: Slight readability improve for event threshold value doc Message-ID: <46916236ba3881ed0e16ddb4a5ca16f8afa1b47d.1768759292.git.marcelo.schmitt1@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add missing '_' to the attribute name pattern. While at it, add a word to clarify the relation with the configuration enable attribute on specific scenarios. Signed-off-by: Marcelo Schmitt --- Documentation/ABI/testing/sysfs-bus-iio | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/te= sting/sysfs-bus-iio index 9fb12f7a639d..20e93000a93e 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1054,9 +1054,9 @@ Contact: linux-iio@vger.kernel.org Description: Specifies the value of threshold that the device is comparing against for the events enabled by - Y[_name]_thresh[_rising|falling]_en. + Y[_name]_thresh[_rising|_falling]_en. =20 - If separate attributes exist for the two directions, but + If separate enable attributes exist for the two directions, but direction is not specified for this attribute, then a single threshold value applies to both directions. =20 --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dy1-f193.google.com (mail-dy1-f193.google.com [74.125.82.193]) (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 DF4C1157487 for ; Sun, 18 Jan 2026 18:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760358; cv=none; b=GJS1eoJkr9l78T+Kvv7J3AHfJBjrNAFjPaevyLcvPmBzG2247IZHzk6DhAtlNDPHSAOQwkrFR8d83hx0lLNwumQrvT13nIVZFhwPxUl3lKqB6sfAnkfr/aWVCQgT3N26jhrRk/y4Upt6/l/Q2ggpbFYIPEokS1u6t0kdl4Nh1nE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760358; c=relaxed/simple; bh=uSGCtMuNPYd/zoCaKajgdtdkJjVfLSCQ5clL9IQP8Vo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B74Knu69jrraq7Br7vxUUswhLfWYhXR22hqtYkYLh8LzaAy5t2gLaH4/eZRc187PvTNfZnNOZ3jdkWnFOR46ybtAN8WaBx1tP86vn8mnuS3CcCN13cP33WvQFOHQpj54LtRXRDbFNKEsra2AZYsw63xq+chNzV9qyx6Rsl9FHBw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FzuGYvkm; arc=none smtp.client-ip=74.125.82.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FzuGYvkm" Received: by mail-dy1-f193.google.com with SMTP id 5a478bee46e88-2b0ea1edf11so5730740eec.0 for ; Sun, 18 Jan 2026 10:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760356; x=1769365156; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=v5l33lEuRmpkTuX5JOMIIbTz9IQnLRsWv0j331lKa2A=; b=FzuGYvkmsx8t62BrCrDKiw/IlHW8N0WlWL14cIhUgcdLa75aK0Ekk/R1gVaVJX0LL0 wRupgtJK0AEGdBAxZxVOk48w4lTE/w30sGJT4sYunpXZPpkVEdLjV+HYTirK434evm+H TjEMYQgIFVRDoNjcJAIeThxESXjv3h9uCblOuEQnXBnSOFsp7wAcI0/EXFumI14mHSt/ fsMZC6mieHCtt+sccr4w+LPcPMQccjf3YZvlYPeFl4NMAlLrN9Au0b9dQgxYNIX5uIlY wlbEz/n4a80VK7p/I0EEtIpYBbvKFVGaLIsbTi3lm9H2qGEw2Ttiec5IbrlJHExTqSQ7 2I4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760356; x=1769365156; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v5l33lEuRmpkTuX5JOMIIbTz9IQnLRsWv0j331lKa2A=; b=f791hUaYExXIG+MxG5x/9XrsNvamVvL5ogy7CKmwKWHSOvgsefs+5wYCq2seQRgTWg skRgd7qAvTlaYmu366WRIygrHILkqg6wG9MQmLQaanhpBxbl7JbZQDsKUMRTnFBgs3cw lFARYSvuXYiRf9zQOu5cMCDCp40XvrAQSuKwcBm1wTfxSnkQqwLG74O/ORncnAaGptLm Q03z3IzV1HqUlXa8b8XFgI/ELIBQUNwqtPDtUxU7K+11W+CS3NKL9edOFGs8t4qw4Vxo wBbH3L/LYfdDItI95gliIO2xNlg3JeYvWzI7p0hKofQizZnUAlUg7/OAPWtO7bQXDggI NHWg== X-Forwarded-Encrypted: i=1; AJvYcCW+D5lxJF/xYrEDaL/E50NEjkV3k91P2ogKIV5zUsu1U9sCvspI+0XzMqVrXWzCnWy1v0olA1paMfA3Wmk=@vger.kernel.org X-Gm-Message-State: AOJu0YzpdYWjqqRDrSF/bkslNw8oK7z6/lv57/8fM3kHR0XnwlSGmV/6 JcHzD2sm5moSQNVkJI7V5WdXx6j+IcldqXFto8mS5D8GQVa8+GBq/Lyb X-Gm-Gg: AY/fxX4b11i1tMj0b9mg3eG8OhTRf8WZGdnlFSrig2P/R+t/dlP2b9Z1wUzJiRVWhG5 v9TTEjQISYjN0p31aD1KdwE+RaasdWcz9mjlzM9tBWhFqB9y5ibpDgmTfT9CmKfCd9QHDZEc8eO Y04UAVpbgDUBQEcfHCc7uuro7hydPs4CDGm3DIZ8pGkoEXojIFN6WGl+R20bf43SklSa0cwpMvj U3J/Y9enRi9G6nqQpMWdj042HI0WskUxfDrRXFNHVMg+Fgb780387sDj7D0cyPha4Y3vdJtIFQ0 GksqpA3jcNgEtWvA9BPFxWTOKoYqnrSy1DNGAdp1grXVzDm+aBwE9obIegmgJP3TaAgqtsI5XDv mS/KdAqtjHZfwVDoZReAzmt7gUCaMbGZ+gR6j2dYrTamIHuG1LR81jnU3nhRdeS2Xs98ZOKf8IG xlrDNh+eZqVtUQGbIB5X0= X-Received: by 2002:a05:7300:748a:b0:2ae:53da:9787 with SMTP id 5a478bee46e88-2b6b505d0damr6383743eec.40.1768760356057; Sun, 18 Jan 2026 10:19:16 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b367cbd4sm10066912eec.33.2026.01.18.10.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:19:15 -0800 (PST) Date: Sun, 18 Jan 2026 15:21:06 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 5/9] iio: ABI: Update event threshold value documentation Message-ID: <2aadf1fc04e5d091bfd600d1234b94de7c22f233.1768759292.git.marcelo.schmitt1@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Complement the IIO event threshold value ABI description clarifying that raw device units are assumed when the attribute has no _raw/_input element in it's name. Signed-off-by: Marcelo Schmitt --- Documentation/ABI/testing/sysfs-bus-iio | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/te= sting/sysfs-bus-iio index 20e93000a93e..d746a5e09225 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1062,7 +1062,9 @@ Description: =20 The raw or input element of the name indicates whether the value is in raw device units or in processed units (as _raw - and _input do on sysfs direct channel read attributes). + and _input do on sysfs direct channel read attributes). If the + raw/input element of the name is absent, values are in raw + device units. =20 What: /sys/.../events/in_accel_scale What: /sys/.../events/in_accel_peak_scale --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170]) (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 F14151AF0AF for ; Sun, 18 Jan 2026 18:19:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760377; cv=none; b=K2h+R/2ZOUbwj6TE7Nr5+awN+9Jdw5HTQvMqRoS75tEFPm4uQRhNcfePY9PoSbh4nBh48VbOysKFrR/stTIKUNRA3HDE9sfQsy+DdlzAIwxd/ziUCQND0X66rTy4ItRt9e0ixFjgJ41cZRIeSXfDk9R4GVUhC0+TY1w7QCBvEU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760377; c=relaxed/simple; bh=tGqs5+XIflRlLG29SU6zPmmvzH85uKAMg4yJuip+x0w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pl63V24Msz4nLSJslDNNxofBhC3dH4Du9L7ZyYyqc/i74YrihG1P+sqeYAgSaoaXHQjCn0t06yH4NFChn5SLQsJCXYcPeGG1ta6qg0TIPwDt3I0oAZemM0C/ojaBItYd+MNTjyKXdQm+Q9zE/u0PUQk4aPippxQdyKHNbVbgI/s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FP3pAtjO; arc=none smtp.client-ip=74.125.82.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FP3pAtjO" Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-2b0ea1edf11so5731138eec.0 for ; Sun, 18 Jan 2026 10:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760375; x=1769365175; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/mzGwh8Z+WSBfKHaEf8o48SzZ9hf9kEvpdxYs2XySa4=; b=FP3pAtjOUnz//dd1JMonnZV7wtEEQ77DWiE1d8T8SmYZJWX98go4vFhvHXqtgQq4WM lFEG8YbAWzrMRcd16vxHjErDHLWainb+Z0SgozzIF9BSSpPHrO6GSLdPvkWygYetlwCp cVq2jZAmGnbv7E5QYWUvY8p1DItkVH5h6cEMYNCfw8sbbadhnwQQAbnBoW7AsJ1EczBi DUpk6ua43l9mPx/ihpiYG/MdeGxXP2nvvemxlLkB40DmQNSr4TBSxEp7356lb6XAAfLw CFwxEtfBT7AlWrtVTzHf8A93XA2d0/wxTihAEFT6b3NPZWYQ//O44Nc5zgphduxQzR+o Xslw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760375; x=1769365175; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/mzGwh8Z+WSBfKHaEf8o48SzZ9hf9kEvpdxYs2XySa4=; b=PP4PhbfjSFXx1X7yosfR7MpRjH0Sgpn3wB9rz4SbtePEqumd0ZOl6JpK6T5m1QKsTa ukD53iZGvOODTGk+ri8XY4tutYMB7VF5B2AUVx03mgO1VmpLMw8OaXpTSefjcfdlPoOg Wj8pKhwB6FsZM3uCJWPkE5NAzDH7ibgelzFtEQKNFOgjw95Hu3T0GvVp3muZ+tfcP5Mz DaxGkTd7vpQEPkyAFYYMSOewvbaW8bJZhp9jkGlXTBikyrwV9b4+1X8mIpOOuGGHW01p JcRpxENl4+weIP/eQlC3J8kpxIHvJNJGZIjeci+Xl+mO4h39OItvTGn1MNcMldlLi/mU Dxxw== X-Forwarded-Encrypted: i=1; AJvYcCUZowRnY80JNoLsfRh9roCQGh9oSXHoLo8m2Jio7mslRxxZlinOBVsYn6s6q9pimp9AMtHJRu4oXslbBIw=@vger.kernel.org X-Gm-Message-State: AOJu0YwxojKJACQJtI19gvLDIzu4WqmB4IudaEFVdo4PMOg9japOiaC2 RwqqDA0xv+ER2kdLpP3daf3oHpImZoINUKIiXgZIX4L/MfiT/lUqxpAM X-Gm-Gg: AY/fxX49fNzCUQVOghe6dk7c/WdpbQfK9z6GAvwJyfYRCal/UcXNDwwj/VK8N/h39IY LGGSGi/vgxRm5DScHdq3iuAaT690lNX+YicDZ8OC8hZmy2L8YLRiK4xOKsuim2EVu2DB4IvB2MW Hjo7TMGIX7nGwQNjmlgT+yeHHi46+0rTmFmK9NUNhVQsxg718/y3DjmOdA7SZgP80544Tg9imic 2JmcoOBTjB6/ktcqtNKWFhMz/2mpS/PpSOqRppX2Kyv6oqFUFvobSnMfus8hmcB8jVBZ/uxrhdM ozxO6gvLw+V+vGOQOmCpmY7GEKBe1q2TcHswjr0PEt/drlKjhuJzGuMid8C2XTZpQIHeUVvzU09 Zj3OjmptVEq6p17/5w5HbuFHiUb0xekj46FCNKo431LvI8gTLPtY9Z8gccKi+Nk8h3yhMv/P3e1 rf4rrJ8/dopF8YIr7WM2URj1UYZ7tQAw== X-Received: by 2002:a05:7300:3254:b0:2a4:765b:b4bd with SMTP id 5a478bee46e88-2b6b5045f4dmr6708193eec.37.1768760374982; Sun, 18 Jan 2026 10:19:34 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b34c0f7fsm10084545eec.3.2026.01.18.10.19.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:19:34 -0800 (PST) Date: Sun, 18 Jan 2026 15:21:24 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 6/9] iio: ABI: Adjust event threshold enable desc to unitless thresh values Message-ID: <7443971849518122bafd00a290e9b7a5448c5a50.1768759292.git.marcelo.schmitt1@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Adjust the event threshold enable attribute description to cover the cases where threshold value attributes don't contain a _raw/_input element in their names. Signed-off-by: Marcelo Schmitt --- Documentation/ABI/testing/sysfs-bus-iio | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/te= sting/sysfs-bus-iio index d746a5e09225..fd296d8cf51a 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -906,9 +906,9 @@ Description: (_rising|_falling) direction. If the direction is not specified, then either the device will report an event which ever direction a single threshold value is passed in (e.g. - [Y][_name]__thresh_value) or - [Y][_name]__thresh_rising_value and - [Y][_name]__thresh_falling_value may take + [Y][_name][_raw|_input]_thresh_value) or + [Y][_name][_raw|_input]_thresh_rising_value and + [Y][_name][_raw|_input]_thresh_falling_value may take different values, but the device can only enable both thresholds or neither. =20 --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.169]) (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 D09461D5CC6 for ; Sun, 18 Jan 2026 18:19:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760399; cv=none; b=OOajSj0Xb5IvvNduTld1txU1rd/q83OrdJJGWbSIwIycH1XlWsfHj6u/KfUn8/WkcJWuZerMtuH6NAX80CBBQdKQoXxNEdotip1HAN2RSifw4APevHgTrSYNUfbpgdQ5PIhtmf8bX3gjp6UWOIGhp2Hr0YiKxnFwSdIb4xAiHFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760399; c=relaxed/simple; bh=T6a8BQUbWqU9GMRGIo9BhMSECj/L+r2E/Y035vRhNEk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YuWCiiLg3S66P+Ot2ofxhAI1Jv4sRmF5vjKMPjTguzU74Kdsta6c9mvjyK0//eYnMnUbGGCEc1q//0/LGWGd5+VHf7w6/2zKqdM5KqgNv6ZNI3fLHYXLbo1k4RK165KSTe1HjUkvOCZAQiD77b5fQ7fqWaexQIDsPA0D3dq8P+0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KPzfDQPc; arc=none smtp.client-ip=74.125.82.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KPzfDQPc" Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-2b1981ca515so3900071eec.1 for ; Sun, 18 Jan 2026 10:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760397; x=1769365197; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=m15yqdQHaxmYRVMpA6zrhF4sJGCIUQR0mh1h/cFJQfg=; b=KPzfDQPcXRDQ/fLVz/2GspHj5MVH8PoVoRRWj5ND/GdaU7K/jcLq9Wzf4WakHFizbg zB+nxvf91QKXirn5F9u6li1h6sLPoxUp4SVdCRcA6bPuhKXfkZL7vFMZb6jY7kYkRcYz mAZdZEMVciS22lcCchr0WgVFaVU1XDOoSRuLwjuQfM+AqQ5wlIub13e+0UkpBUUX9N/V 02UmkbfmVhW+EWz8FMn12IWWZvo6jG2b0thpUchkE7myzPQ2Iu3f2XluTdVipek6X6ai APu+L+nYqQwoQ8M+mm1NVL6m69dhtMsGXYXIUy031llFIY8A7c3l56c6V4atDd+U8qfj c4Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760397; x=1769365197; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m15yqdQHaxmYRVMpA6zrhF4sJGCIUQR0mh1h/cFJQfg=; b=d8kW96+jxTV5XnTujC7p8HEMDSg9VwFpuQ04EfBNdqXHLob68ESzTxJaaVjSh0O56f /CvpBLjH5hm7ZDKD/IP0Q4FG6mRTlZS0UVjmRq6Xt9WnxTbvS2PSsetPjKOTd3WTV/RQ Ic4EKVYlbKCzGbnYGpBvqwgHVNmCtAXhdd1KTU2zPgN40aClvLRPFk3N420K91bL9C2U IifQ1zkndiBCDfofjGhyA01pgjNVktUk3ZKVB1Aq6c2jLuj/OVCFWyFCfD7h2KRkb5vx y8YwB5jLG4MyliT4WNrn9ObHNR7AMBpH7egBQLXwm9lP7ZUavO3lVP9Llp50mn1cZEyF DODA== X-Forwarded-Encrypted: i=1; AJvYcCXlebrt0zhLwxt312dJtSu5C/tHCi/Q+muoiDr4lBVCkI7p7FHERVXRZxiCw+MLN0ExBNOs3UKt7SIWpbk=@vger.kernel.org X-Gm-Message-State: AOJu0YyVbZALcO407+3uXamXFvxw+Dug1NmbMXTWM1uu2fb4JM+Ab1x4 lZ8JNlBNV5Omw9EEFD1dmF+8iSJyyasi9FDMqm9/AuB9eOVUX/UG6FQg X-Gm-Gg: AY/fxX7HmASAamFuV+sl654tzhZcVl7u2EZvrtD40P8nrtb0xPZz4nney0VCSCmTZq5 Z47OTkLwafKVpTOWwcJXG0+k2bFKP42xp/uILTY59ZnbLbGDEo49mvh1gIUk1ELpqUqzLN43X1F lY1lvgVQ6AeeHOjVVI+ssrNmoLTEU32h+vEhB6+9VKuTT/ZaMte2KZEdjPOQV9gJIC0NBQt9t+Y ec+IDc+KGIs2mnQ5XYieuhPf312tWYA3UqpRwKHohxZ5dICiDVwjbVG8Mih+Mv6xGmIXhFARolA hUFItksLQEEC6iil63aP98gTsfPLXCD2iQ6EzFmQFNhN2fqk0szVNoE7O+0xMs8Gvdjrpiy0v1W YS9m1PStEDu+Xv0cI0Q3EAoEEekRCz77Bu6EjenGV2jAzMWqSvOUq3wrSthyNFrkaU/zEH3buc9 oNdHPiK14zIisdqhmGkcw= X-Received: by 2002:a05:7301:4104:b0:2b0:59da:f799 with SMTP id 5a478bee46e88-2b6b3ed9f07mr5997350eec.5.1768760396742; Sun, 18 Jan 2026 10:19:56 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b34c122bsm9907807eec.5.2026.01.18.10.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:19:56 -0800 (PST) Date: Sun, 18 Jan 2026 15:21:46 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 7/9] iio: Expand IIO event interface for real-world unit handling Message-ID: <6d9baa8d553d03a41fbd97bca0377a7a4779a93e.1768759292.git.marcelo.schmitt1@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IIO event ABI documentation distinguishes between interfaces that handle values in device-specific units (_raw) and event interfaces that handle values in real-world units (e.g. meters, Joules, lux, etc). However, the IIO event code infrastructure had never really implemented the bits to distinguish between those two types of interfaces and had always presumed events to handle raw device values. For most current use cases, assuming events to handle values in device raw units is reasonable because it often matches the type of the associated IIO channel. There are a few cases where drivers provide events along side channels with both _raw and _input interfaces, though. Also, when real-world values can be mapped back to device configurations, it enables drivers to provide event interfaces that are arguably easier to use. Expand the IIO events support, enabling IIO drivers to provide event interfaces that handle values in real-world units. Signed-off-by: Marcelo Schmitt --- drivers/iio/industrialio-event.c | 47 +++++++++++++++++++++++--------- include/linux/iio/iio.h | 8 ++++-- include/uapi/linux/iio/types.h | 5 ++++ 3 files changed, 45 insertions(+), 15 deletions(-) diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-ev= ent.c index 06295cfc2da8..68bba21cae14 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c @@ -258,6 +258,11 @@ static const char * const iio_ev_info_text[] =3D { [IIO_EV_INFO_RUNNING_COUNT] =3D "runningcount", }; =20 +static const char * const iio_ev_unit_text[] =3D { + [IIO_EV_UNIT_RAW] =3D "raw", + [IIO_EV_UNIT_PROCESSED] =3D "input", +}; + static enum iio_event_direction iio_ev_attr_dir(struct iio_dev_attr *attr) { return attr->c->event_spec[attr->address & 0xffff].dir; @@ -273,6 +278,11 @@ static enum iio_event_info iio_ev_attr_info(struct iio= _dev_attr *attr) return (attr->address >> 16) & 0xffff; } =20 +static enum iio_event_unit iio_ev_attr_unit(struct iio_dev_attr *attr) +{ + return attr->c->event_spec[attr->address & 0xffff].unit; +} + static ssize_t iio_ev_state_store(struct device *dev, struct device_attribute *attr, const char *buf, @@ -332,7 +342,7 @@ static ssize_t iio_ev_value_show(struct device *dev, ret =3D indio_dev->info->read_event_value(indio_dev, this_attr->c, iio_ev_attr_type(this_attr), iio_ev_attr_dir(this_attr), iio_ev_attr_info(this_attr), - &val, &val2); + iio_ev_attr_unit(this_attr), &val, &val2); if (ret < 0) return ret; val_arr[0] =3D val; @@ -359,7 +369,7 @@ static ssize_t iio_ev_value_store(struct device *dev, ret =3D indio_dev->info->write_event_value(indio_dev, this_attr->c, iio_ev_attr_type(this_attr), iio_ev_attr_dir(this_attr), iio_ev_attr_info(this_attr), - val, val2); + iio_ev_attr_unit(this_attr), val, val2); if (ret < 0) return ret; =20 @@ -384,7 +394,8 @@ static ssize_t iio_ev_label_show(struct device *dev, static int iio_device_add_event(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, unsigned int spec_index, enum iio_event_type type, enum iio_event_direction dir, - enum iio_shared_by shared_by, const unsigned long *mask) + enum iio_event_unit unit, enum iio_shared_by shared_by, + const unsigned long *mask) { struct iio_dev_opaque *iio_dev_opaque =3D to_iio_dev_opaque(indio_dev); ssize_t (*show)(struct device *dev, struct device_attribute *attr, @@ -399,15 +410,23 @@ static int iio_device_add_event(struct iio_dev *indio= _dev, for_each_set_bit(i, mask, sizeof(*mask)*8) { if (i >=3D ARRAY_SIZE(iio_ev_info_text)) return -EINVAL; - if (dir !=3D IIO_EV_DIR_NONE) - postfix =3D kasprintf(GFP_KERNEL, "%s_%s_%s", - iio_ev_type_text[type], - iio_ev_dir_text[dir], - iio_ev_info_text[i]); - else + if (dir !=3D IIO_EV_DIR_NONE) { + if (i =3D=3D IIO_EV_INFO_ENABLE) + postfix =3D kasprintf(GFP_KERNEL, "%s_%s_%s", + iio_ev_type_text[type], + iio_ev_dir_text[dir], + iio_ev_info_text[i]); + else + postfix =3D kasprintf(GFP_KERNEL, "%s_%s_%s_%s", + iio_ev_unit_text[unit], + iio_ev_type_text[type], + iio_ev_dir_text[dir], + iio_ev_info_text[i]); + } else { postfix =3D kasprintf(GFP_KERNEL, "%s_%s", iio_ev_type_text[type], iio_ev_info_text[i]); + } if (postfix =3D=3D NULL) return -ENOMEM; =20 @@ -478,32 +497,34 @@ static int iio_device_add_event_sysfs(struct iio_dev = *indio_dev, int ret =3D 0, i, attrcount =3D 0; enum iio_event_direction dir; enum iio_event_type type; + enum iio_event_unit unit; =20 for (i =3D 0; i < chan->num_event_specs; i++) { type =3D chan->event_spec[i].type; dir =3D chan->event_spec[i].dir; + unit =3D chan->event_spec[i].unit; =20 - ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, + ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, unit, IIO_SEPARATE, &chan->event_spec[i].mask_separate); if (ret < 0) return ret; attrcount +=3D ret; =20 - ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, + ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, unit, IIO_SHARED_BY_TYPE, &chan->event_spec[i].mask_shared_by_type); if (ret < 0) return ret; attrcount +=3D ret; =20 - ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, + ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, unit, IIO_SHARED_BY_DIR, &chan->event_spec[i].mask_shared_by_dir); if (ret < 0) return ret; attrcount +=3D ret; =20 - ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, + ret =3D iio_device_add_event(indio_dev, chan, i, type, dir, unit, IIO_SHARED_BY_ALL, &chan->event_spec[i].mask_shared_by_all); if (ret < 0) diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 872ebdf0dd77..82d0a30e443f 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -156,6 +156,7 @@ typedef const struct iio_mount_matrix * * struct iio_event_spec - specification for a channel event * @type: Type of the event * @dir: Direction of the event + * @unit: Unit of the data to be handled (raw or processed). * @mask_separate: Bit mask of enum iio_event_info values. Attributes * set in this mask will be registered per channel. * @mask_shared_by_type: Bit mask of enum iio_event_info values. Attrib= utes @@ -169,6 +170,7 @@ typedef const struct iio_mount_matrix * struct iio_event_spec { enum iio_event_type type; enum iio_event_direction dir; + enum iio_event_unit unit; unsigned long mask_separate; unsigned long mask_shared_by_type; unsigned long mask_shared_by_dir; @@ -522,13 +524,15 @@ struct iio_info { const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - enum iio_event_info info, int *val, int *val2); + enum iio_event_info info, + enum iio_event_unit unit, int *val, int *val2); =20 int (*write_event_value)(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - enum iio_event_info info, int val, int val2); + enum iio_event_info info, + enum iio_event_unit unit, int val, int val2); =20 int (*read_event_label)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index 6d269b844271..4898444deb9e 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -137,4 +137,9 @@ enum iio_event_direction { IIO_EV_DIR_FAULT_OPENWIRE, }; =20 +enum iio_event_unit { + IIO_EV_UNIT_RAW, + IIO_EV_UNIT_PROCESSED, +}; + #endif /* _UAPI_IIO_TYPES_H_ */ --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dl1-f49.google.com (mail-dl1-f49.google.com [74.125.82.49]) (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 BC436500962 for ; Sun, 18 Jan 2026 18:20:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760425; cv=none; b=hBSx5wlks7F/zvH8LalkITo52PvjQj2fqMw+y9GkdfsztQ3X+y/Qc7btA4y85ZIP4F7U94DbC5yXVlfVLCu6FIdMrY4aDJ75Ihh3wLRW+zKVrZzr8oYhlL2b9OIA5OIIZrGTbrWJ2QMR0BpwKe8+o1VQ7P1aKSuq/WJHez7ZkMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760425; c=relaxed/simple; bh=Nx2BxfukcgbNMTsAdjO0ux+H8cRidzYXyK9d4V1n0mU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nfrbyiGi8QaZonkPcfhxZT/u8ctvUOabK4WzQxthd3Mw/6feyLloOLEh3Pw+cUUjxG1OxR4DJLMQ51wuDs7GbrIA/Gqoz8dCGjNsRvUyV93BQhyQYex+E5+hoCCJsCPPnXH2h1Bc1Cl8GR2rNXORT0gxCnq4qyTxi80Ubkr7gcM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mg75V1Nx; arc=none smtp.client-ip=74.125.82.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mg75V1Nx" Received: by mail-dl1-f49.google.com with SMTP id a92af1059eb24-1233bc1117fso2312245c88.0 for ; Sun, 18 Jan 2026 10:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760423; x=1769365223; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=g8oTH4L6k5lmuFdK6+K3XHyFIuZENoBfyf7y0hnUZr4=; b=mg75V1NxXDlUuWprphBTeBFuDW2bFyxMZ7fAS2n59oxEXCtaOQ2SuYbYryua60tUA4 dPAY68iwfVllwItlhe3yNyDRxU4udTT1Kq07rHRn3IRE1+YX6desNQfvrNuM8e4yd0IC jidsbbWpnFIGUyIIfX8PwcHES40hMCtTDtTwEY+Va7ubI7JKggsIgvfovWmMtwzo676b TnC5Gq7m5vOuGt65X4FbLd5LxylHal+j6t0Uo03Xs1ctTPwHp/sHjgoPQ1yJOO4I0Qbh vZie1KIflfPxsDc9sdb3PM6CdFi46rqKkSGG8hgMkQIK5uhmd8/TGPZdaHtsBULPPD93 rVMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760423; x=1769365223; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g8oTH4L6k5lmuFdK6+K3XHyFIuZENoBfyf7y0hnUZr4=; b=QKKdOxrpCNSZ++eE9dod0KJYlLXGnRQ8HgVwWY0Bd4pOKVsodpbh4IPClezBV+DiNu ijhp1eShJYmcoQR4C6SVyR1uX91uynJJNHuMKDVfjD0sDnPdKHnWass0gAzyLtD1Vyt5 VJMQ0Co3dTtNKJ6Ou8eyEsPHAMonHJZM+fV09SvkU7acb5DTDAkD7qS9xBQPTsHisRW7 TxZr02hXS0iSzJJ/ioSApJ/KmAH0zka2nwVfP/jXGZRwCAOFi/EBysUG8Az9VRTgSUg6 WOaLt6o1LA5JzBL8p2q2si6okUp5G/C/JX8n9swUKUCmB/9/R+2wN5TDH2hkQERYIACK xXyQ== X-Forwarded-Encrypted: i=1; AJvYcCUEM98qMp+SVccIK7YW9h9XydtluV0zm0etrzU2CO42cFxHQmRVbzlmxIPpieoRywh5gRS10YOG238sa3E=@vger.kernel.org X-Gm-Message-State: AOJu0YyjU03PQHz0ux7XBI892FGgR6G++pvrVLBi96UdAHBgaW5XqGNa JxUfYADCnzcrbfnehjrXZx+60WRhOQSwKaMkQShjzdDlJ1I2q3X+4egi X-Gm-Gg: AY/fxX67qfD80gfbkAITaEct/uIr7f6P2k4BTAnmo/fh5DJdyEUOoNXZvM6kVxeWgrW cDQtXWjrJvAQsYBMWhYKtrMs74G8tLGExLdGUmK6GGjf2DAMsicBtg/OmuVNkjVWELgGruC+wxF W70JW5Bzw7jUYMFwAvV3fvveWqGXI/CMiwpXknDK5JG5Uqf5UxDO5nZZP01KXEmxKHhV3zi/Lyg a9xsIG0UjqQNj8IjxcAnRpzIQJEcXlYRQO3SpdAeDlbOHRtY47cAL0NOJ8mFPPx997ekXISMBXu EZASnqOnqfkwCXed8+JEdzzPj4m9AEZjS3LyQktoYXK03LgB/ngcAcCONGk6+Rg8S0mOKToanOh KvtjpI6EN9UjGbVSsdfF0r4C0N/+9W0FXZcVtOv9nOKfs7g6vxPezFp1O7zvscoR/OwD735+yUu M2Rn22Hf6ajip6jdiPXlo= X-Received: by 2002:a05:7022:e98d:b0:11b:3eb7:f9d7 with SMTP id a92af1059eb24-1233d0adc11mr10868872c88.14.1768760422721; Sun, 18 Jan 2026 10:20:22 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1244ac6c2besm12775573c88.5.2026.01.18.10.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:20:19 -0800 (PST) Date: Sun, 18 Jan 2026 15:22:07 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 8/9] iio: dummy: iio_simple_dummy: Update to event unit expanded interface Message-ID: <40da257176192dce3b271c45b6ce7dcaa15b06af.1768759292.git.marcelo.schmitt1@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IIO events interface has been expanded with an additional parameter, enabling drivers to handle values in real-world units for IIO event configuration. Update to the expanded IIO event interface. Signed-off-by: Marcelo Schmitt --- drivers/iio/dummy/iio_simple_dummy.h | 6 ++++-- drivers/iio/dummy/iio_simple_dummy_events.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dummy/iio_simple_dummy.h b/drivers/iio/dummy/iio_s= imple_dummy.h index 8246f25dbad0..a1132781c0bc 100644 --- a/drivers/iio/dummy/iio_simple_dummy.h +++ b/drivers/iio/dummy/iio_simple_dummy.h @@ -66,14 +66,16 @@ int iio_simple_dummy_read_event_value(struct iio_dev *i= ndio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - enum iio_event_info info, int *val, + enum iio_event_info info, + enum iio_event_unit unit, int *val, int *val2); =20 int iio_simple_dummy_write_event_value(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - enum iio_event_info info, int val, + enum iio_event_info info, + enum iio_event_unit unit, int val, int val2); =20 int iio_simple_dummy_events_register(struct iio_dev *indio_dev); diff --git a/drivers/iio/dummy/iio_simple_dummy_events.c b/drivers/iio/dumm= y/iio_simple_dummy_events.c index b51ec21b6309..9dfccc6439d4 100644 --- a/drivers/iio/dummy/iio_simple_dummy_events.c +++ b/drivers/iio/dummy/iio_simple_dummy_events.c @@ -120,6 +120,7 @@ int iio_simple_dummy_read_event_value(struct iio_dev *i= ndio_dev, enum iio_event_type type, enum iio_event_direction dir, enum iio_event_info info, + enum iio_event_unit unit, int *val, int *val2) { struct iio_dummy_state *st =3D iio_priv(indio_dev); @@ -144,6 +145,7 @@ int iio_simple_dummy_write_event_value(struct iio_dev *= indio_dev, enum iio_event_type type, enum iio_event_direction dir, enum iio_event_info info, + enum iio_event_unit unit, int val, int val2) { struct iio_dummy_state *st =3D iio_priv(indio_dev); --=20 2.51.0 From nobody Sat Feb 7 21:14:55 2026 Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170]) (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 AA8EF243951 for ; Sun, 18 Jan 2026 18:20:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760451; cv=none; b=DFPy0lIdDsipP/9kW3Ia5iFh7zXWFxlun3/8MdpkKB5PG/NqorktJY06vGg/0NXg3Dmxxdml7zf+ybUyrlfwhyjzGgIa6ZFfc/5ifd2yKZzynDuuO/GhddghPi4qpyD63z74r718s2OGhReglgN5Qrv4bo+i3R17hqR5xfEfDYA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768760451; c=relaxed/simple; bh=JccskNRXh7B1nG6UWZdVIZGFB09h04n6evXkEmKHlHo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JyJI5TKCXWGxCVGxikogCeVSQnD9HiVXGDe4iC2KL/z/bxNepiPLHqOyVlmnIaFpaqQa90A+Tux6OyvwbkB7JCrm5EiWcSKjNkmgH2Fz1OxtZT1XzWKHlY03KSyfChy2qToEUhk6Ls/4qKjL97HK0krQ5E8tyM/QLVtQpSpSkLg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iOiWEStD; arc=none smtp.client-ip=74.125.82.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iOiWEStD" Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-2ae29ddaed9so2236997eec.0 for ; Sun, 18 Jan 2026 10:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768760450; x=1769365250; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9/ENJ7X6jznAaB9H64Rnz4gLknSm6IAjIuLCrh0TyIk=; b=iOiWEStDFxipHNNnZRlkjUhGSQ1oxpTuaz+bzFe09o9wFV+6GKHgoNDUx1xH/PFnlE Y5smZJgXC+T+HLlyguEFhPhs60eRakejkTZQAl3mNBCjzSqW7lgV2/rD2iX5yooyaByP EouCQXKniuDAZSzmFY/eC17yiZv+MKmDrGLSINhkQ0Yf/FjE/k6c23L9UvU4Pc+rwKDI bP5fPwAWcwO5y7lIHVqRVZqJghlgbCigwI45wpCgQhwaSwFqPbomIYHOqQ2jf+/N7Z4W eaRDN+nlAeUodwPYVccm7p8m8MXbJk5Fc25pfed9npUh8xpePIQXRJKx4p8HQwBVgEwI LDIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768760450; x=1769365250; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9/ENJ7X6jznAaB9H64Rnz4gLknSm6IAjIuLCrh0TyIk=; b=sELDI815pD45ifbkZgeKo0j2SuLFZA2XmPnhnCF3J5bLQLQQb2wxuZDjXqCTEfE7vV ZvPt2BfYFCvZmPeeEfyS7NPvmgZY4YvTuKJxGBKNeHslXDYLqvE1+yu7mwLMXNJEyxVh CvN0XJmEOXuRXeJMHIu+232bp5BHm/sZFzQulxijR3ohdON6R4xbeZVEYeG8k5Qmn97Y HQzyxHxJufCYhKDgYPrIjLfCctldVzciLjtPDbRUrs4MSzhKQdv47QfZdWq/Qxv2IR7u CGHi8ONb65Z4Cxhpf4OMJ07NJ3szLOoZyCq190tVeKVmMW3EnM9zah0m2JzJpFVO9CH+ Ecmg== X-Forwarded-Encrypted: i=1; AJvYcCW+ak18ps4Q2VbORpX6jTGZNSml9XqA68b3imiJZHus0gfeQtvKhxvz0U2l31lcRTu+NtBP+W1usag/oZI=@vger.kernel.org X-Gm-Message-State: AOJu0Yxvf/59RNkH5G0QXJXrlzpR/h04+XgbUrJPQ9Cwsy8VEKDDUTFi Xm3/6BpANousHXZl7uWJY0sFL0f3LGVk9Xw40yBHePIfttGMqXKwWStceBcsYWFO X-Gm-Gg: AY/fxX4ujqh3vVzj4Is5kiUPmqaNQj78uAU3THE1QYcgOVxd+RGYZOrzhDFx587AUrM 2x2ZQZuTF0Zkp4mPgsy1q0+L7kb8V+U5lBWoFJFnLbRIdH4uQFq2oTnBVlyMS3x7efpCqHL6E9q f00MQ2S1h+jTSrZlTUIhV5pQpo4eka9QXya9R0konB62ZWRR+AXjVuDfkQ87BfyVoB6EyVaantX 9KNyikUVHwddAek7fB01UFC0vPRud/DSSGJPzrk24ywCGEOjY0Bp2rQKMLLwSE8Ii9f0HH7VHJx 6w1uXibcqwVqAhu5s8Enzg1vea5Ld+7kS0/YDqBnbd62IlJSLySXdovxWD6fR3C9LURdMAQEH2L CB6p8IgwOx5TTDiCcrKJ+qmWTGeqLhl89Ibc+W9NUJY/FO0AshReniwkF97NC5/mGkfDddKJUlu lMNsg2COYWw09gS4SZwE4= X-Received: by 2002:a05:693c:40c4:b0:2b6:bd8c:48f4 with SMTP id 5a478bee46e88-2b6bd8c4caamr4621397eec.10.1768760449651; Sun, 18 Jan 2026 10:20:49 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b333ccc5sm11088649eec.0.2026.01.18.10.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 10:20:48 -0800 (PST) Date: Sun, 18 Jan 2026 15:22:39 -0300 From: Marcelo Schmitt To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com, marcelo.schmitt1@gmail.com Subject: [RFC PATCH v1 9/9] iio: adc: ad7091r-base: Update to event unit expanded interface Message-ID: <9c69a99f02428b6a3ff15adb1613c0da9d377691.1768759292.git.marcelo.schmitt1@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IIO events interface has been expanded with an additional parameter, enabling drivers to handle values in real-world units for IIO event configuration. Update to the expanded IIO event interface. Signed-off-by: Marcelo Schmitt --- drivers/iio/adc/ad7091r-base.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c index 647a7852dd8d..b3c6f6e5053d 100644 --- a/drivers/iio/adc/ad7091r-base.c +++ b/drivers/iio/adc/ad7091r-base.c @@ -27,6 +27,7 @@ const struct iio_event_spec ad7091r_events[] =3D { { .type =3D IIO_EV_TYPE_THRESH, .dir =3D IIO_EV_DIR_FALLING, + .unit =3D IIO_EV_UNIT_RAW, .mask_separate =3D BIT(IIO_EV_INFO_VALUE) | BIT(IIO_EV_INFO_ENABLE), }, @@ -183,7 +184,8 @@ static int ad7091r_read_event_value(struct iio_dev *ind= io_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - enum iio_event_info info, int *val, int *val2) + enum iio_event_info info, + enum iio_event_unit unit, int *val, int *val2) { struct ad7091r_state *st =3D iio_priv(indio_dev); int ret; @@ -224,7 +226,8 @@ static int ad7091r_write_event_value(struct iio_dev *in= dio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - enum iio_event_info info, int val, int val2) + enum iio_event_info info, + enum iio_event_unit unit, int val, int val2) { struct ad7091r_state *st =3D iio_priv(indio_dev); =20 --=20 2.51.0