From: Vasileios Amoiridis <vassilisamir@gmail.com>
To: jic23@kernel.org, lars@metafoo.de
Cc: krzysztof.kozlowski@linaro.org, nuno.sa@analog.com,
u.kleine-koenig@baylibre.com, abhashkumarjha123@gmail.com,
jstephan@baylibre.com, dlechner@baylibre.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
vassilisamir@gmail.com
Subject: [PATCH RFC 1/6] iio: create accessor for iio_dev->scan_timestamp
Date: Sat, 30 Nov 2024 01:27:05 +0100 [thread overview]
Message-ID: <20241130002710.18615-2-vassilisamir@gmail.com> (raw)
In-Reply-To: <20241130002710.18615-1-vassilisamir@gmail.com>
"scan_timestamp" is supposed to be an internal member of the iio device
structure. However, there are some drivers that are using it directly.
For that reason, the following accessor is created:
iio_is_soft_ts_enabled()
The goal of this accessor, is to ultimately mark "scan_timestamp" as
a __private member of the struct iio_dev.
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
---
include/linux/iio/iio.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index ae65890d4567..5661794d1127 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -902,6 +902,15 @@ int iio_active_scan_mask_index(struct iio_dev *indio_dev);
for_each_set_bit((chan), (indio_dev)->active_scan_mask, \
iio_get_masklength(indio_dev))
+/**
+ * iio_is_soft_ts_enabled - Check if the software timestamp is enabled
+ * @indio_dev: the IIO device
+ */
+static inline bool iio_is_soft_ts_enabled(const struct iio_dev *indio_dev)
+{
+ return indio_dev->scan_timestamp;
+}
+
ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals);
int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
--
2.43.0
next prev parent reply other threads:[~2024-11-30 0:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-30 0:27 [PATCH RFC 0/6] iio: mark scan_timestamp __private Vasileios Amoiridis
2024-11-30 0:27 ` Vasileios Amoiridis [this message]
2024-11-30 0:27 ` [PATCH RFC 2/6] iio: make use of iio_is_soft_ts_enabled() Vasileios Amoiridis
2024-11-30 0:27 ` [PATCH RFC 3/6] iio: adc: dln2-adc: " Vasileios Amoiridis
2024-11-30 14:02 ` Jonathan Cameron
2024-12-03 21:38 ` Vasileios Amoiridis
2024-11-30 0:27 ` [PATCH RFC 4/6] iio: adc: max1363: " Vasileios Amoiridis
2024-11-30 14:09 ` Jonathan Cameron
2024-12-03 22:08 ` Vasileios Amoiridis
2024-11-30 0:27 ` [PATCH RFC 5/6] iio: common: ssp_sensors: " Vasileios Amoiridis
2024-11-30 14:17 ` Jonathan Cameron
2024-12-03 22:10 ` Vasileios Amoiridis
2024-11-30 0:27 ` [PATCH RFC 6/6] iio: core: mark scan_timestamp as __private Vasileios Amoiridis
2024-11-30 14:19 ` Jonathan Cameron
2024-12-03 22:14 ` Vasileios Amoiridis
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=20241130002710.18615-2-vassilisamir@gmail.com \
--to=vassilisamir@gmail.com \
--cc=abhashkumarjha123@gmail.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=jstephan@baylibre.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=u.kleine-koenig@baylibre.com \
/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