From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org, Andy Shevchenko <andy@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Liam Beguin" <liambeguin@gmail.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Ibrahim Tilki" <Ibrahim.Tilki@analog.com>,
"Cosmin Tanislav" <cosmin.tanislav@analog.com>,
"Alisa-Dariana Roman" <alisadariana@gmail.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: [PATCH 07/11] iio: adc: ad4130: Improve include relevance
Date: Mon, 19 Jan 2026 21:21:06 +0000 [thread overview]
Message-ID: <20260119212110.726941-8-jic23@kernel.org> (raw)
In-Reply-To: <20260119212110.726941-1-jic23@kernel.org>
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Replace asm/div64.h with linux/math64.h and drop kernel.h in
favor of more specific includes. Also add some others that should
be directly included to follow approximate include what you use.
Justification for new headers from iwyu with a couple of comments where
this deviates from recommendations.
#include <linux/array_size.h> // for ARRAY_SIZE
#include <linux/bitmap.h> // for for_each_set_bit
#include <linux/build_bug.h> // for static_assert
#include <linux/compiler.h> // for __aligned
#include <linux/completion.h> // for complete, init_completion, rei...
#include <linux/container_of.h> // for container_of
#include <linux/init.h> // for THIS_MODULE
Ignored this one as seems reasonable to assume module.h will always include
whereever that is!
#include <linux/jiffies.h> // for msecs_to_jiffies
#include <linux/math.h> // for rounddown
#include <linux/math64.h> // for div_u64, div_u64_rem, DIV64_U6...
#include <linux/minmax.h> // for __cmp_op_max
#include <linux/mod_devicetable.h> // for of_device_id
#include <linux/mutex.h> // for class_mutex_constructor, class...
#include <linux/of.h> // for of_property_read_string, devic...
#include <linux/stddef.h> // for false, true, NULL
#include <linux/string.h> // for memcpy, memset
#include <linux/stringify.h> // for __stringify
#include <linux/sysfs.h> // for sysfs_emit
#include <linux/types.h> // for u32, bool, u64, u8, ssize_t
struct fwnode_handle;
Ignored this last recomendation because I think property.h can reasonably
be expected to always include whereever this is.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Cosmin Tanislav <cosmin.tanislav@analog.com>
---
drivers/iio/adc/ad4130.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/ad4130.c b/drivers/iio/adc/ad4130.c
index 5567ae5dee88..745efefb7f35 100644
--- a/drivers/iio/adc/ad4130.c
+++ b/drivers/iio/adc/ad4130.c
@@ -4,8 +4,14 @@
* Author: Cosmin Tanislav <cosmin.tanislav@analog.com>
*/
+#include <linux/array_size.h>
+#include <linux/bitmap.h>
#include <linux/bitfield.h>
#include <linux/bitops.h>
+#include <linux/build_bug.h>
+#include <linux/compiler.h>
+#include <linux/completion.h>
+#include <linux/container_of.h>
#include <linux/cleanup.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
@@ -15,16 +21,24 @@
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
-#include <linux/kernel.h>
+#include <linux/jiffies.h>
+#include <linux/math.h>
+#include <linux/math64.h>
+#include <linux/minmax.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/of.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
-#include <linux/units.h>
-
-#include <asm/div64.h>
+#include <linux/stddef.h>
+#include <linux/stringify.h>
+#include <linux/sysfs.h>
+#include <linux/types.h>
#include <linux/unaligned.h>
+#include <linux/units.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
--
2.52.0
next prev parent reply other threads:[~2026-01-19 21:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 21:20 [PATCH 00/11] iio: adc: Improve include relevance for some ADCs Jonathan Cameron
2026-01-19 21:21 ` [PATCH 01/11] iio: adc: ltc2471: Improve include relevance Jonathan Cameron
2026-01-20 7:51 ` Andy Shevchenko
2026-01-19 21:21 ` [PATCH 02/11] iio: adc: ltc2309: " Jonathan Cameron
2026-01-20 7:52 ` Andy Shevchenko
2026-01-19 21:21 ` [PATCH 03/11] iio: adc: max1027: Reorder headers into alphabetical order Jonathan Cameron
2026-01-20 7:53 ` Andy Shevchenko
2026-01-19 21:21 ` [PATCH 04/11] iio: adc: max1027: Improve include relevance Jonathan Cameron
2026-01-20 7:56 ` Andy Shevchenko
2026-01-20 22:10 ` Jonathan Cameron
2026-01-20 22:52 ` Andy Shevchenko
2026-01-21 9:37 ` Nuno Sá
2026-01-19 21:21 ` [PATCH 05/11] iio: adc: max11100: " Jonathan Cameron
2026-01-19 21:21 ` [PATCH 06/11] iio: adc: max11410: Improve relevance of includes Jonathan Cameron
2026-01-19 21:21 ` Jonathan Cameron [this message]
2026-01-19 21:21 ` [PATCH 08/11] iio: adc: ad7124: Improve include relevance Jonathan Cameron
2026-01-19 21:21 ` [PATCH 09/11] iio: adc: ad7124: Replace device.h with more specific includes Jonathan Cameron
2026-01-19 21:21 ` [PATCH 10/11] iio: adc: ad7192: Put headers in alphabetical order Jonathan Cameron
2026-01-19 21:21 ` [PATCH 11/11] iio: adc: ad7192: Improve include relevance Jonathan Cameron
2026-01-20 7:58 ` [PATCH 00/11] iio: adc: Improve include relevance for some ADCs Andy Shevchenko
2026-01-21 9:41 ` Nuno Sá
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=20260119212110.726941-8-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=Ibrahim.Tilki@analog.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alisadariana@gmail.com \
--cc=andy@kernel.org \
--cc=cosmin.tanislav@analog.com \
--cc=dlechner@baylibre.com \
--cc=liambeguin@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
--cc=miquel.raynal@bootlin.com \
--cc=nuno.sa@analog.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