Skip to contentSkip to conversation

iio: temperature: make headers conform to IWYU

PATCH Superseded Joshua Crofts 3 participants 21 messages Aug 22 – Aug 24

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover iio: temperature: make headers conform to IWYU

This series removes any instances of kernel.h in the temperature/ subdirectory and cleans up the headers in order to improve readability and enforce IYWU instead of relying on transitive dependencies during the build process.

I had Gemini generate a summary (a bit more verbose) of changed headers under the --- in each IWYU patch to improve the review process.

This is part of an ongoing effort to remove kernel.h entirely from IIO.

---
Joshua Crofts (14):
iio: temperature: iqs620at-temp: separate IIO header from others
iio: temperature: iqs620at-temp: make headers conform to IWYU
iio: temperature: ltc2983: reorder headers
iio: temperature: ltc2983: make headers conform to IWYU
iio: temperature: mlx90632: sort headers alphabetically
iio: temperature: mlx90632: make headers conform to IWYU
iio: temperature: mlx90635: sort headers alphabetically
iio: temperature: mlx90635: make headers conform to IWYU
iio: temperature: tmp117: sort headers alphabetically
iio: temperature: tmp117: make headers conform to IWYU
iio: temperature: tsys01: reorder headers
iio: temperature: tsys01: make headers conform to IWYU
iio: temperature: tsys02d: reorder headers
iio: temperature: tsys02d: make headers conform to IWYU

 drivers/iio/temperature/iqs620at-temp.c |  9 +++++++--
 drivers/iio/temperature/ltc2983.c       | 13 +++++++++----
 drivers/iio/temperature/mlx90632.c      |  8 ++++++--
 drivers/iio/temperature/mlx90635.c      |  8 ++++++--
 drivers/iio/temperature/tmp117.c        |  8 ++++----
 drivers/iio/temperature/tsys01.c        | 15 +++++++++------
 drivers/iio/temperature/tsys02d.c       | 12 ++++++++----
 7 files changed, 49 insertions(+), 24 deletions(-)

---
base-commit: 350d1fb9204b13c5f95e511e98b8bcb47574d425
change-id: 20260821-kernel-header-removal-d95efd197d78

Best regards,

Signature · 2 lines
Kind regards,
Joshua Crofts
#1 lore raw

PATCH 1/14 iio: temperature: iqs620at-temp: separate IIO header from others

Separate the <linux/iio/iio.h> header from the other generic <linux/*> headers to comply with the IIO style.

No functional change.

---
 drivers/iio/temperature/iqs620at-temp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/temperature/iqs620at-temp.c +2 -1
index e2f878d57af7..24b4d50740f3 100644
@@ -6,13 +6,14 @@
  */
 
 #include <linux/device.h>
-#include <linux/iio/iio.h>
 #include <linux/kernel.h>
 #include <linux/mfd/iqs62x.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
+#include <linux/iio/iio.h>
+
 #define IQS620_TEMP_UI_OUT			0x1A
 
 #define IQS620_TEMP_SCALE			1000
Signature · 1 line
2.55.0
#2 lore raw

PATCH 2/14 iio: temperature: iqs620at-temp: make headers conform to IWYU

In reply to Joshua Crofts

Remove the catch-all kernel.h header and add the missing headers to enforce IWYU.

---
Header changes explained:
Added:
- <asm/byteorder.h>: for endianness helpers
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bits.h>: for GENMASK() and BIT() macros
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.) Removed:
- <linux/kernel.h>: catch-all header no longer needed

---
 drivers/iio/temperature/iqs620at-temp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/iio/temperature/iqs620at-temp.c +5 -1
index 24b4d50740f3..3a3b1f256585 100644
@@ -5,12 +5,16 @@
  * Copyright (C) 2019 Jeff LaBundy <[email protected]>
  */
 
+#include <linux/array_size.h>
+#include <linux/bits.h>
 #include <linux/device.h>
-#include <linux/kernel.h>
 #include <linux/mfd/iqs62x.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
+#include <linux/types.h>
+
+#include <asm/byteorder.h>
 
 #include <linux/iio/iio.h>
 
Signature · 1 line
2.55.0
#3 lore raw

PATCH 3/14 iio: temperature: ltc2983: reorder headers

In reply to Joshua Crofts

Separate the IIO specific header and group unaligned.h with the other generic <linux/*> headers.

No functional change.

---
 drivers/iio/temperature/ltc2983.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/iio/temperature/ltc2983.c +3 -2
index 6efb5252a773..fe9eec3058d4 100644
@@ -11,7 +11,6 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
-#include <linux/iio/iio.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/module.h>
@@ -19,9 +18,11 @@
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
+#include <linux/unaligned.h>
 
 #include <asm/byteorder.h>
-#include <linux/unaligned.h>
+
+#include <linux/iio/iio.h>
 
 /* register map */
 #define LTC2983_STATUS_REG			0x0000
Signature · 1 line
2.55.0
#4 lore raw

PATCH 4/14 iio: temperature: ltc2983: make headers conform to IWYU

In reply to Joshua Crofts

Remove the catch-all kernel.h header and add the missing headers to enforce IWYU.

---
Header changes explained:
Added:
- <asm/div64.h>: for div64 functions
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bits.h>: for GENMASK() and BIT() macros
- <linux/mutex.h>: for struct mutex and mutex_lock/unlock
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.) Removed:
- <linux/errno.h>: not directly used in this driver
- <linux/kernel.h>: catch-all header no longer needed

---
 drivers/iio/temperature/ltc2983.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/iio/temperature/ltc2983.c +6 -2
index fe9eec3058d4..0b1b442bb133 100644
@@ -5,22 +5,26 @@
  *
  * Copyright 2019 Analog Devices Inc.
  */
+
+#include <linux/array_size.h>
 #include <linux/bitfield.h>
+#include <linux/bits.h>
 #include <linux/completion.h>
 #include <linux/device.h>
 #include <linux/err.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/property.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
+#include <linux/types.h>
 #include <linux/unaligned.h>
 
 #include <asm/byteorder.h>
+#include <asm/div64.h>
 
 #include <linux/iio/iio.h>
 
Signature · 1 line
2.55.0
#8 lore raw

PATCH 5/14 iio: temperature: mlx90632: sort headers alphabetically

In reply to Joshua Crofts

Sort headers alphabetically to improve readability.

No functional change.

---
 drivers/iio/temperature/mlx90632.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/temperature/mlx90632.c +1 -1
index 2fde48f337e2..73c935364d33 100644
@@ -16,8 +16,8 @@
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
 #include <linux/limits.h>
-#include <linux/module.h>
 #include <linux/math64.h>
+#include <linux/module.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
Signature · 1 line
2.55.0
#10 lore raw

PATCH 6/14 iio: temperature: mlx90632: make headers conform to IWYU

In reply to Joshua Crofts

Remove the catch-all kernel.h header and add the missing headers to enforce IWYU.

---
Header changes explained:
Added:
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bits.h>: for GENMASK() and BIT() macros
- <linux/mutex.h>: for struct mutex and mutex_lock/unlock
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.) Removed:
- <linux/kernel.h>: catch-all header no longer needed

---
 drivers/iio/temperature/mlx90632.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/iio/temperature/mlx90632.c +5 -1
index 73c935364d33..bca31c4bef00 100644
@@ -6,7 +6,10 @@
  *
  * Driver for the Melexis MLX90632 I2C 16-bit IR thermopile sensor
  */
+
+#include <linux/array_size.h>
 #include <linux/bitfield.h>
+#include <linux/bits.h>
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/err.h>
@@ -14,13 +17,14 @@
 #include <linux/i2c.h>
 #include <linux/iopoll.h>
 #include <linux/jiffies.h>
-#include <linux/kernel.h>
 #include <linux/limits.h>
 #include <linux/math64.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
+#include <linux/types.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
Signature · 1 line
2.55.0
#11 lore raw

PATCH 7/14 iio: temperature: mlx90635: sort headers alphabetically

In reply to Joshua Crofts

Sort the headers alphabetically to improve readability.

No functional change.

---
 drivers/iio/temperature/mlx90635.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/temperature/mlx90635.c +1 -1
index 0f31879a4f64..ecff00634271 100644
@@ -16,8 +16,8 @@
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
 #include <linux/limits.h>
-#include <linux/module.h>
 #include <linux/math64.h>
+#include <linux/module.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
Signature · 1 line
2.55.0
#12 lore raw

PATCH 8/14 iio: temperature: mlx90635: make headers conform to IWYU

In reply to Joshua Crofts

Remove the catch-all kernel.h header and add the missing headers to enforce IWYU.

---
Header changes explained:
Added:
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bits.h>: for GENMASK() and BIT() macros
- <linux/mutex.h>: for struct mutex and mutex_lock/unlock
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.) Removed:
- <linux/kernel.h>: catch-all header no longer needed

---
 drivers/iio/temperature/mlx90635.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/iio/temperature/mlx90635.c +5 -1
index ecff00634271..b3fa2c8f566a 100644
@@ -6,7 +6,10 @@
  *
  * Driver for the Melexis MLX90635 I2C 16-bit IR thermopile sensor
  */
+
+#include <linux/array_size.h>
 #include <linux/bitfield.h>
+#include <linux/bits.h>
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/err.h>
@@ -14,13 +17,14 @@
 #include <linux/i2c.h>
 #include <linux/iopoll.h>
 #include <linux/jiffies.h>
-#include <linux/kernel.h>
 #include <linux/limits.h>
 #include <linux/math64.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
+#include <linux/types.h>
 
 #include <linux/iio/iio.h>
 
Signature · 1 line
2.55.0
#14 lore raw

PATCH 10/14 iio: temperature: tmp117: make headers conform to IWYU

In reply to Joshua Crofts

Remove the catch-all kernel.h header and add the missing <linux/dev_printk.h> header to enforce IWYU.

---
Header changes explained:
Added:
- <linux/dev_printk.h>: for dev_err(), dev_info(), etc. Removed:
- <linux/kernel.h>: catch-all header no longer needed

---
 drivers/iio/temperature/tmp117.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/temperature/tmp117.c +1 -1
index fed8af2d81eb..2caab0624a23 100644
@@ -12,9 +12,9 @@
 #include <linux/array_size.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/dev_printk.h>
 #include <linux/err.h>
 #include <linux/i2c.h>
-#include <linux/kernel.h>
 #include <linux/limits.h>
 #include <linux/module.h>
 #include <linux/property.h>
Signature · 1 line
2.55.0
#15 lore raw

PATCH 11/14 iio: temperature: tsys01: reorder headers

In reply to Joshua Crofts

Sort the headers alphabetically and group the IIO headers and vendor specific header separately.

No functional change.

---
 drivers/iio/temperature/tsys01.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/iio/temperature/tsys01.c +6 -4
index 28b3ce022ce7..14de67ee8be7 100644
@@ -8,14 +8,16 @@
  *  http://www.meas-spec.com/downloads/TSYS01_Digital_Temperature_Sensor.pdf
  */
 
-#include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
 #include <linux/device.h>
-#include <linux/mutex.h>
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/stat.h>
+
+#include <linux/iio/iio.h>
+#include <linux/iio/sysfs.h>
+
 #include "../common/ms_sensors/ms_sensors_i2c.h"
 
 /* TSYS01 Commands */
Signature · 1 line
2.55.0
#13 lore raw

PATCH 9/14 iio: temperature: tmp117: sort headers alphabetically

In reply to Joshua Crofts

Sort the headers alphabetically to improve readability.

No functional change.

---
 drivers/iio/temperature/tmp117.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/temperature/tmp117.c +3 -3
index 74cb8d62bef3..fed8af2d81eb 100644
@@ -10,16 +10,16 @@
  */
 
 #include <linux/array_size.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/i2c.h>
-#include <linux/module.h>
-#include <linux/bitops.h>
-#include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/limits.h>
+#include <linux/module.h>
 #include <linux/property.h>
 #include <linux/regulator/consumer.h>
+#include <linux/types.h>
 
 #include <linux/iio/iio.h>
 
Signature · 1 line
2.55.0
#17 lore raw

PATCH 12/14 iio: temperature: tsys01: make headers conform to IWYU

In reply to Joshua Crofts

Remove the catch-all kernel.h header, add missing headers and remove unused headers.

---
Header changes explained:
Added:
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/dev_printk.h>: for dev_err(), dev_info(), etc.
- <linux/i2c.h>: for i2c_client and i2c_device_id
- <linux/math64.h>: for div64 functions
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.) Removed:
- <linux/device.h>: not directly used in this driver
- <linux/init.h>: not directly used in this driver
- <linux/kernel.h>: catch-all header no longer needed
- <linux/stat.h>: not directly used in this driver

---
 drivers/iio/temperature/tsys01.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/iio/temperature/tsys01.c +5 -4
index 14de67ee8be7..4b8c2a3287fc 100644
@@ -8,12 +8,13 @@
  *  http://www.meas-spec.com/downloads/TSYS01_Digital_Temperature_Sensor.pdf
  */
 
-#include <linux/device.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
+#include <linux/array_size.h>
+#include <linux/dev_printk.h>
+#include <linux/i2c.h>
+#include <linux/math64.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include <linux/stat.h>
+#include <linux/types.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
Signature · 1 line
2.55.0
#19 lore raw

PATCH 14/14 iio: temperature: tsys02d: make headers conform to IWYU

In reply to Joshua Crofts

Remove the catch-all kernel.h header, add missing headers and remove unused headers.

---
Header changes explained:
Added:
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bits.h>: for GENMASK() and BIT() macros
- <linux/dev_printk.h>: for dev_err(), dev_info(), etc.
- <linux/i2c.h>: for i2c_client and i2c_device_id
- <linux/mutex.h>: for struct mutex and mutex_lock/unlock
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.) Removed:
- <linux/device.h>: not directly used in this driver
- <linux/init.h>: not directly used in this driver
- <linux/kernel.h>: catch-all header no longer needed

---
 drivers/iio/temperature/tsys02d.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/iio/temperature/tsys02d.c +6 -3
index 377e27b45fdd..9fa803bec92c 100644
@@ -10,11 +10,14 @@
  *  http://www.meas-spec.com/downloads/Digital_Sensor_TSYS02D.pdf
  */
 
-#include <linux/device.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/dev_printk.h>
+#include <linux/i2c.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/stat.h>
+#include <linux/types.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
Signature · 1 line
2.55.0
#18 lore raw

PATCH 13/14 iio: temperature: tsys02d: reorder headers

In reply to Joshua Crofts

Sort the headers alphabetically and group the IIO specific headers separately.

No functional change.

---
 drivers/iio/temperature/tsys02d.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/iio/temperature/tsys02d.c +3 -2
index 3ef72347456e..377e27b45fdd 100644
@@ -10,11 +10,12 @@
  *  http://www.meas-spec.com/downloads/Digital_Sensor_TSYS02D.pdf
  */
 
-#include <linux/init.h>
 #include <linux/device.h>
+#include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/stat.h>
 #include <linux/module.h>
+#include <linux/stat.h>
+
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
Signature · 1 line
2.55.0
#20 lore raw
In reply to Joshua Crofts
Quoted 10 lines · On Sat, 22 Aug 2026 10:02:27 +0200 Joshua Crofts <[email protected]>…

This series removes any instances of kernel.h in the temperature/ subdirectory and cleans up the headers in order to improve readability and enforce IYWU instead of relying on transitive dependencies during the build process.

I had Gemini generate a summary (a bit more verbose) of changed headers under the --- in each IWYU patch to improve the review process.

This is part of an ongoing effort to remove kernel.h entirely from IIO.

Okay, initial Sashiko review came back and I've missed a couple more headers... will have to send a v2.

Signature · 2 lines
Kind regards,
Joshua Crofts
maintainer
#5 lore raw

Re: [PATCH 04/14] iio: temperature: ltc2983: make headers conform to IWYU

In reply to Joshua Crofts
Quoted 39 lines · On Sat, 22 Aug 2026 10:02:31 +0200 Joshua Crofts <[email protected]>…

Remove the catch-all kernel.h header and add the missing headers to enforce IWYU.

---
Header changes explained:
Added:
- <asm/div64.h>: for div64 functions
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bits.h>: for GENMASK() and BIT() macros
- <linux/mutex.h>: for struct mutex and mutex_lock/unlock
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.) Removed:
- <linux/errno.h>: not directly used in this driver
- <linux/kernel.h>: catch-all header no longer needed

---
 drivers/iio/temperature/ltc2983.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/iio/temperature/ltc2983.c +3 -2
index fe9eec3058d4..0b1b442bb133 100644
@@ -5,22 +5,26 @@
  *
  * Copyright 2019 Analog Devices Inc.
  */
+
+#include <linux/array_size.h>
 #include <linux/bitfield.h>
+#include <linux/bits.h>
 #include <linux/completion.h>
 #include <linux/device.h>
 #include <linux/err.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/module.h>

drivers/iio/temperature/ltc2983.c line 27

Quoted 10 lines
drivers/iio/temperature/ltc2983.c +3 -0
+#include <linux/mutex.h>
 #include <linux/property.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
+#include <linux/types.h>
 #include <linux/unaligned.h>
 
 #include <asm/byteorder.h>
+#include <asm/div64.h>

I think we normally use linux/math64.h for that one.

Quoted 4 lines
drivers/iio/temperature/ltc2983.c +0 -0
 #include <linux/iio/iio.h>
 
 
maintainer
#9 lore raw

Re: [PATCH 05/14] iio: temperature: mlx90632: sort headers alphabetically

In reply to Joshua Crofts
Quoted 1 line · On Sat, 22 Aug 2026 10:02:32 +0200 Joshua Crofts <[email protected]>…

Sort headers alphabetically to improve readability.

Whilst I don't really mind these being separate patches the main motivation for doing this is to make it easier to see what is added and removed in the next patch. When only one or two entries move in the reorder it matters a lot less. Upshot, you could combine this with the ones making actual changes.

Jonathan

Quoted 23 lines

No functional change.

---
 drivers/iio/temperature/mlx90632.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/temperature/mlx90632.c +1 -1
index 2fde48f337e2..73c935364d33 100644
@@ -16,8 +16,8 @@
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
 #include <linux/limits.h>
-#include <linux/module.h>
 #include <linux/math64.h>
+#include <linux/module.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
maintainer
#16 lore raw

Re: [PATCH 11/14] iio: temperature: tsys01: reorder headers

In reply to Joshua Crofts
Quoted 6 lines · On Sat, 22 Aug 2026 10:02:38 +0200 Joshua Crofts <[email protected]>…

Sort the headers alphabetically and group the IIO headers and vendor specific header separately.

No functional change.

Just as a reference - this level of reorder definitely wants to be on its own as a separate patch as you have it here!

Jonathan

Quoted 30 lines
---
 drivers/iio/temperature/tsys01.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/iio/temperature/tsys01.c +6 -4
index 28b3ce022ce7..14de67ee8be7 100644
@@ -8,14 +8,16 @@
  *  http://www.meas-spec.com/downloads/TSYS01_Digital_Temperature_Sensor.pdf
  */
 
-#include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
 #include <linux/device.h>
-#include <linux/mutex.h>
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/stat.h>
+
+#include <linux/iio/iio.h>
+#include <linux/iio/sysfs.h>
+
 #include "../common/ms_sensors/ms_sensors_i2c.h"
 
 /* TSYS01 Commands */
#6 lore raw

Re: [PATCH 04/14] iio: temperature: ltc2983: make headers conform to IWYU

In reply to Jonathan Cameron
Quoted 2 lines · Jonathan Cameron

On Sat, 22 Aug 2026 10:02:31 +0200
Joshua Crofts <[email protected]> wrote:

...

Quoted 3 lines
Quoted 1 line

+#include <asm/div64.h>

I think we normally use linux/math64.h for that one.

Right, the rule of thumb is to prefer linux/*.h over asm/*.h in the C files like mere drivers.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#7 lore raw

Re: [PATCH 04/14] iio: temperature: ltc2983: make headers conform to IWYU

Quoted 4 lines · On Mon, 24 Aug 2026 11:27:12 +0300 Andy Shevchenko…
Quoted 2 lines · Jonathan Cameron

On Sat, 22 Aug 2026 10:02:31 +0200
Joshua Crofts <[email protected]> wrote:

Quoted 10 lines

...

Quoted 3 lines
Quoted 1 line

+#include <asm/div64.h>

I think we normally use linux/math64.h for that one.

Right, the rule of thumb is to prefer linux/*.h over asm/*.h in the C files like mere drivers.

I was working on some driver that had asm/div64.h so it just stuck. Will replace this.

Signature · 2 lines
Kind regards,
Joshua Crofts