From nobody Tue Feb 10 04:23:47 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 5401135DCFE for ; Sun, 8 Feb 2026 15:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770563134; cv=none; b=aIjpv252TZ8Jbdxmt6FWbfejjLmJ3nKZ7g/lDuI/KHGzocrJGL6zx5R0CqSC3C4pUqnQ88BZDrwZLIxyAz09j1dTPYWiMiZ+8fL50Qc3KAPg3fy9s5kMM2rSaigld6ZKwbf8bd9374dP5vVNOKgj0LUdFX1KancF/8RhxlckyWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770563134; c=relaxed/simple; bh=9/7QTpM9w9CetgDRp3W/v439sqmC/gELVsuHbq2pmD8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZyE/holckd+nnVIrlCCXODz4AcTBZ7G2yKXPocz6ung5tzGpN/FvMN5d4oXt9eVLWXZhxGhik4VaDU364ccXPyJn5SPa1amOQRKJdpRPuV7slXNjdXbxFiN7oXvk40044IsCxq0enbwCD7COmDraEHy+uIhOpgodhvzGrrgaN0s= 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=Ch0kBBNH; arc=none smtp.client-ip=209.85.128.50 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="Ch0kBBNH" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4806f3fc50bso24826305e9.0 for ; Sun, 08 Feb 2026 07:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770563133; x=1771167933; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xbmaZh646ZKImMHo419Q/3GSUkucF5/edL1/4X8vppA=; b=Ch0kBBNH62QY6YYQ+nxagFaqOws5iBgV8VtSs7Yinh6wqmZPlGR/eZ5hTCGfhj8TWb K3VFuFKnMPs5vvKEkY3wvyavbJKR449xduffrSInJsPYdFqAXTynWY90yeofNDE7ELfc FGz6mCrfjf+GFSbLlgd/uoDPxEHvR/TnonqptpQDQKaoWBL4RC2dk7jbRNSNa8wjD5Hg HrMLNgcKnzXEHGyFbmvGuIAjGu7fPtJ/DKg2JuPb2cXpsTKUxLc7FiwE6MdMmA32AIyb e8Cby9oI2r8Mx+K2iD8AJuPoWmEaJ4ltpT48IBER5im/4R5HmMlxwfIyhADYtL4RW0eu IMFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770563133; x=1771167933; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xbmaZh646ZKImMHo419Q/3GSUkucF5/edL1/4X8vppA=; b=mYZ6uxn+g7EfMUWoQwXL+YwzUIhqFygPp4MliArS5p0aTYOKLCOnwypS2DVn5J6epx 8T/I8advURMsOeow2j7en4SfKncDISvP+HC8qw8eOaAqNiwzzDNQQ+RANKAVpWmWYUIN AdPhxdXrNVf2yOrmgX3WBVicRaLxGVuW/Puhxx0ja32I9azwumDZcZcEXNb9uqmVGsce Ydq/HjsdQ5blXvIfLTHt5En9W739Hr6ZTyl86XvHUQxW7xckrs2e1dZXK0t5j7uGgGuu R0g7i0oSVlAIhdX3+286yT1CkjBqijLAThcrhvWedFPySPN7nHJepYy5kRaDxGH2BcLv 8t4g== X-Forwarded-Encrypted: i=1; AJvYcCUV6b8f4WuvSfnJ1arrSuswSci+VFTcALep+6rezdcoO6iJ/o26olZhomLTMzabP1g2dOLZhDy2tPZsCyY=@vger.kernel.org X-Gm-Message-State: AOJu0YxJBpdtKkJ0Ce1Tf2N0dVa/I05/RCK5Vk1/ZgPAYoyhM0F4N4EV bZkWIh9vWIpPQbQmursc7OLyDdIA86BIV98vhi57ni8YtVGMblSTPY+f X-Gm-Gg: AZuq6aKVuvyLIwxEB/WWDynqvLdXMaBepo0SuMu4S3PuEszpqIU3o9KV+/e2loH/RM8 bWtuEzHFi8lETeR21UvAyWpXGQYXG88mc8bSHLvXE/RPW4vDjFJC9IGIxNLDlzWUAV2N6xQJPLU I7umy7Yf3jd8EGlvROhHgalRh767t+FVbwma1FtJdY4yMwS+C90c3kcM1NtBxLgy0owjiM8tIPA M29qJUHok/17pkF7P5ZvERGF/g9M2vQ6hxyWjHRRbnf6I50YoFWdZIc7ZNXbCGUJ2tKDVoxA2HB LqZuowBt35pGc2jBiMoB0+zmxRR9p+EuSeqRlEBNT89m4BS2plEfIEajkd9i0Fv9cTO+LBAHegE TwDTHbr22sOcFnpEHgLNf7UyFybPB5gAkN+/oLwEOUoMjUXYqIj5danisTslt4cA3gE3tx9eHYc FkUZqnQ/L7MArSTnJRsED8H9MlnH90k/Uj6fy5TBcHU4+O86cWJA== X-Received: by 2002:a05:600c:3553:b0:477:9976:9e1a with SMTP id 5b1f17b1804b1-483201dc5bamr123026275e9.6.1770563132478; Sun, 08 Feb 2026 07:05:32 -0800 (PST) Received: from DB-VM.1337.ma ([197.230.240.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483206cc7d3sm179326255e9.5.2026.02.08.07.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Feb 2026 07:05:32 -0800 (PST) From: Taha Ed-Dafili <0rayn.dev@gmail.com> To: jic23@kernel.org Cc: dlechner@baylibre.com, rdunlap@infradead.org, skhan@linuxfoundation.org, linux-kernel-mentees-archive@lists.linuxfoundation.org, nuno.sa@analog.com, andy@kernel.org, corbet@lwn.net, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Taha Ed-Dafili <0rayn.dev@gmail.com> Subject: [PATCH v3 2/4] iio: core: Add IIO_EV_INFO_SCALE to event info Date: Sun, 8 Feb 2026 10:05:03 -0500 Message-ID: <20260208150515.14798-3-0rayn.dev@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260208150515.14798-1-0rayn.dev@gmail.com> References: <20260208150515.14798-1-0rayn.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Implement support for IIO_EV_INFO_SCALE in the internal enum iio_event_info to allow proper ABI compliance. This allows drivers (like the ADXL345) to expose event scale attributes using the standard IIO ABI rather than manual device attributes. Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com> --- drivers/iio/industrialio-event.c | 1 + include/linux/iio/types.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-ev= ent.c index 06295cfc2da8..5096baf233f0 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c @@ -256,6 +256,7 @@ static const char * const iio_ev_info_text[] =3D { [IIO_EV_INFO_TAP2_MIN_DELAY] =3D "tap2_min_delay", [IIO_EV_INFO_RUNNING_PERIOD] =3D "runningperiod", [IIO_EV_INFO_RUNNING_COUNT] =3D "runningcount", + [IIO_EV_INFO_SCALE] =3D "scale", }; =20 static enum iio_event_direction iio_ev_attr_dir(struct iio_dev_attr *attr) diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 34eebad12d2c..4e3099defc1d 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h @@ -21,6 +21,7 @@ enum iio_event_info { IIO_EV_INFO_TAP2_MIN_DELAY, IIO_EV_INFO_RUNNING_PERIOD, IIO_EV_INFO_RUNNING_COUNT, + IIO_EV_INFO_SCALE, }; =20 #define IIO_VAL_INT 1 --=20 2.47.3