From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.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 777EB284B4F for ; Sat, 14 Feb 2026 17:11:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771089106; cv=none; b=CDYHnFC2+LiLgCtpwHZ5C0I/hBMMhwMym0FDqc7UIlWAfO2ev4D8v3w9pfFnJ6m+rZ2S+NMjQfFoyfh2Dxerwo6Ong6Ovr46l5CFiLqBcTqvjE4Foo50biBJ0NB4r20J5doszsC4VkgKnXpQ7iobhklfIvRCNX6NjVW4c8xXW6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771089106; c=relaxed/simple; bh=shFR3Mhq3NXkwORzGCftZUUFZdufqUdbJyYnw7FrVyE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DvqGQLDRd0lpeezDuKJjx2xTCP6pGkJ5w/D6yYnTR73SfQuH9mvZbwEaKEMIPOo7FtUSNuFSNZBZH3/9NvawiJ+8ITGrczprkhkuDoYyYx90DQqDUhyE9u7ChOwppY8nyJ7BV1IMPZnoUuhAZCwRalsgsgNss+/mMrEjiy9h/UQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=ES85KRny; arc=none smtp.client-ip=209.85.210.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="ES85KRny" Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-7d4c1d2123dso1812809a34.2 for ; Sat, 14 Feb 2026 09:11:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1771089102; x=1771693902; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=FNAkJ9+Xkxzx6OmOeEwUxFuTSF9UF4m4udIYFnx2DOo=; b=ES85KRny9reUJVX6ajwH8QxT06Yixi9Nh5/AUr68siaD1hDTBJuFVznE+Lvjb7bHe1 jXGL+aHn1ZxImuAkWI4riM8ueOzHSLAXQHpI38k44qldytxYfCsSflFnL/ebbuiZ63rm KscFJfqsZWP+bwgqxXcNip3mKc+jL80sMM5zy8mM3O0S0xXC0N5rae0iikGNWq85hk4J 1U35Temmfo5oU/YuylcIczbBCacItTFnT1J2+X8DGmGwDqF7tmKrR6ckTPLq4/4Xa/Cn pNphfRouGfom8Fn5miW1GX5XDCxon0P+axBQ08cgikouzA1JszPSnTduJ2GToZsOJmFM tLQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771089102; x=1771693902; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FNAkJ9+Xkxzx6OmOeEwUxFuTSF9UF4m4udIYFnx2DOo=; b=pakxq5aGCAF/gWeroWuElktonTYkmDrDU8oZfcuoGIRAy8ME6HRlIMmClJccW4Y51h jakGSHztVlfrf39qJ9Femqp9KV+Hmbl98c9zCxsajtlISKSftzimiYcXlw0bI1sGGuta 9CDbvUw0PmPJ7pep2INPqc9kCOEsD335xLW2N+ARhOcuUUVupQ17s7bhlDTzFOJZUCOn snBAdNncsxtRfvdp/chm86HEsEqPEDdcX9u0q5lY2xDTvnNyZzUy1uREndRBVjWHhE8C klHIL9eKgkzoOL8hUtraxyD8JFLoPXNj6V8RxKMe5oh1tr/l7u04XjEbnE+5vUNNVkrE hHJw== X-Forwarded-Encrypted: i=1; AJvYcCVdDti17gb44XvOpgO2Ezy+WpIxZvqJCYhu9EiOgJxqe8+r3ZyxY4/9P/W6EZ5RIysddctrOVzZTyRgFeM=@vger.kernel.org X-Gm-Message-State: AOJu0Yz4T212SnIUXq6pKP0F+PxkWgGcc5j2X6zBsBZ4aoeh0sJDDxFX k2r7QVvPVw1pKWr+vuxFx4dIpaxlnKyBtZHBDYU6vin9njPKrddiPDf3hGU/wD2MBcOgMhvuqtt APpWR X-Gm-Gg: AZuq6aKfuw0fwVAFFW+fXJKeDRjPB8+47BzlN6wQtZaMlg56mBDUbA16GdCL16QGOwp mLvk1FBSSGYUoS070jNp/Vmj0Kuw+ikkQYrf13oG4kbcfnBlddzxtRR2G35FToEpmBYYB/5cewN fBWnCylTF72jZz1//sgeaga9RUn2+tk1VVxrm2DBukKTvAJEtrp+sxV+6sltYParo0ztVl/RIrV GknoVWixm+Uw69hs80K9JMVCvjJrqog1zmp5wnvg327D3E3udbbOU3IdZGj2DeRQxYIOHQ/vDvo 1KCWXYfE8T7AudqLz+VezFa9bqmaPnN88EKSs0IBfTbUvphXmvSddIPemoq1M92jJ/rL+qIZqnZ rAglFxdmdvSRwRUDok2YwuMwYsQm1tXWFSHFkZPS6FBtO07Ag9+DV70Zk5mo7IIoxAFgsr1QWwq Z4zhRFGLP6KHuhGY3bDVZvUlaFa4f225fNlpkRW24RByrZqarQ2d7esi+gK79VlQUrVlV63g== X-Received: by 2002:a05:6830:4981:b0:7d1:4f21:ff79 with SMTP id 46e09a7af769-7d4c4ade534mr3765219a34.22.1771089102314; Sat, 14 Feb 2026 09:11:42 -0800 (PST) Received: from ?IPV6:2600:8803:e7e4:500:109:393c:254e:962e? ([2600:8803:e7e4:500:109:393c:254e:962e]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d4a7530d08sm8764230a34.2.2026.02.14.09.11.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Feb 2026 09:11:41 -0800 (PST) Message-ID: <53cb71bb-4943-4e2f-bd26-9adeada84852@baylibre.com> Date: Sat, 14 Feb 2026 11:11:41 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 4/4] docs: iio: adxl345: update math and examples for scaling To: Taha Ed-Dafili <0rayn.dev@gmail.com>, jic23@kernel.org Cc: 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 References: <20260208150515.14798-1-0rayn.dev@gmail.com> <20260208150515.14798-5-0rayn.dev@gmail.com> Content-Language: en-US From: David Lechner In-Reply-To: <20260208150515.14798-5-0rayn.dev@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2/8/26 9:05 AM, Taha Ed-Dafili wrote: > Update the documentation to reflect the addition of event scaling > and correct existing technical errors in scale values. > > key changes: > - Fix the 62.5 g/LSB typo to 62.5 mg/LSB and add SI unit conversion. > - Correct decimal precision of in_accel_scale and > in_accel_scale_available to match actual SI unit (m/s^2) > values reported by the driver. > - Add sysfs example showing how to read and interpret the > newly implemented event scale factor. > > Suggested-by: Jonathan Cameron > Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com> > --- > Documentation/iio/adxl345.rst | 41 +++++++++++++++++++++++------------ > 1 file changed, 27 insertions(+), 14 deletions(-) > > diff --git a/Documentation/iio/adxl345.rst b/Documentation/iio/adxl345.rst > index 3ca6a78feb5b..321565699817 100644 > --- a/Documentation/iio/adxl345.rst > +++ b/Documentation/iio/adxl345.rst > @@ -13,7 +13,12 @@ This driver supports Analog Device's ADXL345/375 on SPI/I2C bus. > * `ADXL375 `_ > > The ADXL345 is a general-purpose, low-power, 3-axis accelerometer with selectable > -measurement ranges. The ADXL345 supports the ±2 g, ±4 g, ±8 g, and ±16 g ranges. > +measurement ranges. The ADXL345 supports the following ranges: > + > +- ±2g (approx. ±19.61 m/s^2) > +- ±4g (approx. ±39.23 m/s^2) > +- ±8g (approx. ±78.45 m/s^2) > +- ±16g (approx. ±156.91 m/s^2) > > 2. Device Attributes > ==================== > @@ -98,23 +103,23 @@ listed. > +---------------------------------------------+---------------------------------------------+ > | in_accel_gesture_singletap_timeout | Single tap duration in [us] | > +---------------------------------------------+---------------------------------------------+ > -| in_accel_gesture_singletap_value | Single tap threshold value in 62.5/LSB | > +| in_accel_gesture_singletap_value | Single tap threshold value | > +---------------------------------------------+---------------------------------------------+ > | in_accel_mag_falling_period | Inactivity time in seconds | > +---------------------------------------------+---------------------------------------------+ > -| in_accel_mag_falling_value | Inactivity threshold value in 62.5/LSB | > +| in_accel_mag_falling_value | Inactivity threshold value | > +---------------------------------------------+---------------------------------------------+ > | in_accel_mag_adaptive_rising_en | Enable AC coupled activity on X axis | > +---------------------------------------------+---------------------------------------------+ > | in_accel_mag_adaptive_falling_period | AC coupled inactivity time in seconds | > +---------------------------------------------+---------------------------------------------+ > -| in_accel_mag_adaptive_falling_value | AC coupled inactivity threshold in 62.5/LSB | > +| in_accel_mag_adaptive_falling_value | AC coupled inactivity threshold | > +---------------------------------------------+---------------------------------------------+ > -| in_accel_mag_adaptive_rising_value | AC coupled activity threshold in 62.5/LSB | > +| in_accel_mag_adaptive_rising_value | AC coupled activity threshold | > +---------------------------------------------+---------------------------------------------+ > | in_accel_mag_rising_en | Enable activity detection on X axis | > +---------------------------------------------+---------------------------------------------+ > -| in_accel_mag_rising_value | Activity threshold value in 62.5/LSB | > +| in_accel_mag_rising_value | Activity threshold value | > +---------------------------------------------+---------------------------------------------+ > | in_accel_x_gesture_singletap_en | Enable single tap detection on X axis | > +---------------------------------------------+---------------------------------------------+ > @@ -126,6 +131,10 @@ listed. > +---------------------------------------------+---------------------------------------------+ > | in_accel_z_gesture_singletap_en | Enable single tap detection on Z axis | > +---------------------------------------------+---------------------------------------------+ > +| in_accel_gesture_scale | Tap threshold scale (0.612915 m/s^2). | > ++---------------------------------------------+---------------------------------------------+ > +| in_accel_mag_scale | Activity threshold scale (0.612915 m/s^2). | > ++---------------------------------------------+---------------------------------------------+ It looks like the others are in alphabetical order (or , so would be nice to insert the new ones in the appropriate order. (in_accel_mag_falling is also out of order, so that could be part of the precursor cleanup patch) Also, missing in_accel_mag_adaptive_scale (it was added in the driver changes.)