mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Akshay Jindal <akshayaj.lkd@gmail.com>
Cc: anshulusr@gmail.com, jic23@kernel.org, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, shuah@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: light: ltr390: Add sysfs attribute to report data freshness
Date: Wed, 23 Jul 2025 17:02:48 +0300	[thread overview]
Message-ID: <aIDriADP9O38eNNT@smile.fi.intel.com> (raw)
In-Reply-To: <20250721195419.526920-1-akshayaj.lkd@gmail.com>

On Tue, Jul 22, 2025 at 01:24:18AM +0530, Akshay Jindal wrote:
> Some IIO sensors provide a status bit indicating whether the current data
> register holds freshly measured data or stale data previously read.
> 
> Expose this status via a new read-only sysfs attribute, 'data_fresh',
> which returns:
>   - 1 if the data is freshly sampled
>   - 0 if the data is stale
> 
> This attribute allows userspace to observe data freshness directly, which
> can be useful for debugging or application-level filtering.
> 
> Document the attribute under Documentation/ABI/testing/sysfs-bus-iio.

> +What:		/sys/.../iio:deviceX/data_fresh
> +KernelVersion:	6.16

No way it can make this version. Neither v6.17 if I understood that this
feature is proposed in this patch.

> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Read-only attribute indicating whether the sensor data currently
> +		available in the device is freshly measured or stale.
> +
> +		Returns:
> +			1 - Data is freshly measured
> +			0 - Data is stale (previously read or not yet updated)
> +
> +		Provides userspace visibility into data_freshness status which
> +		can be used for debugging and informational use.

...

>  
> +#define LTR390_DATA_STATUS_MASK		BIT(3)

Missing blank line.

>  /*
>   * At 20-bit resolution (integration time: 400ms) and 18x gain, 2300 counts of
>   * the sensor are equal to 1 UV Index [Datasheet Page#8].

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2025-07-23 14:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 19:54 Akshay Jindal
2025-07-21 19:54 ` [PATCH 2/2] iio: light: ltr390: Add conditional data freshness check with sysfs control Akshay Jindal
2025-07-24 18:54   ` Akshay Jindal
2025-07-27 20:12     ` Akshay Jindal
2025-07-28 13:45       ` Jonathan Cameron
2025-07-21 20:25 ` [PATCH 1/2] iio: light: ltr390: Add sysfs attribute to report data freshness David Lechner
2025-07-22  3:55   ` Akshay Jindal
2025-07-22 21:15     ` David Lechner
2025-07-24 12:39       ` Jonathan Cameron
2025-07-24 16:55         ` Akshay Jindal
2025-07-24 17:41           ` David Lechner
2025-07-27 13:12             ` Jonathan Cameron
2025-07-23 14:02 ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aIDriADP9O38eNNT@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=akshayaj.lkd@gmail.com \
    --cc=andy@kernel.org \
    --cc=anshulusr@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®