From: "Javier Carrasco" <javier.carrasco.cruz@gmail.com>
To: "Joshua Crofts" <joshua.crofts1@gmail.com>,
"Javier Carrasco" <javier.carrasco.cruz@gmail.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Rishi Gupta" <gupt21@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/4] iio: light: add support for veml6031x00 ALS series
Date: Tue, 02 Jun 2026 14:22:36 +0200 [thread overview]
Message-ID: <DIYK6APQQX6S.2KLGTD0G5GCDA@gmail.com> (raw)
In-Reply-To: <CALoEA-w3TqD=2YP36=ScmRttmmG3BBCKvtfSqeJL0PVxRxEbuQ@mail.gmail.com>
On Tue Jun 2, 2026 at 1:47 PM CEST, Joshua Crofts wrote:
> On Tue, 2 Jun 2026 at 13:35, Javier Carrasco
> <javier.carrasco.cruz@gmail.com> wrote:
>> Thank you, Joshua. One question, though: maybe you remember that your
>> last driver was missing one header (which I am not criticizing at all,
>> as you can see I missed some too!), and I am wondering if it was because
>> iwyu missed it and if so, how that could be avoided.
>
> About that - I didn't actually run iwyu on my driver, I recently migrated to
> Fedora and forgot to set up LLVM and iywu-tool :-)
I installed IWYU and added your mapping for a quick test, and it wants
to add a million headers or so:
python3 ~/iwyu/include-what-you-use/iwyu_tool.py \
-p . \
drivers/iio/light/veml6031x00.c \
-- \
-Xiwyu --no_default_mappings \
-Xiwyu --mapping_file=tools/iio/iio.imp
drivers/iio/light/veml6031x00.c should add these lines:
#include <asm/byteorder.h> // for le16_to_cpu, cpu_to_le16
#include <linux/bitops.h> // for BIT, const_test_bit
#include <linux/device.h> // for dev_get_drvdata, devic...
#include <linux/errno.h> // for EINVAL, EBUSY, ENOMEM
#include <linux/limits.h> // for U16_MAX
#include <linux/pm.h> // for pm_ptr
#include <linux/stddef.h> // for NULL, true
#include <linux/sysfs.h> // for attribute_group
#include <linux/types.h> // for __le16, bool, aligned_s64
#include "asm-generic/bitops/builtin-ffs.h" // for ffs
#include "asm-generic/bitops/const_hweight.h" // for hweight8
#include "linux/array_size.h" // for ARRAY_SIZE
#include "linux/cleanup.h" // for guard, scoped_guard
#include "linux/compiler-context-analysis.h" // for __must_hold
#include "linux/delay.h" // for fsleep
#include "linux/dev_printk.h" // for dev_err_probe, dev_dbg
#include "linux/device/devres.h" // for devm_add_action_or_reset
#include "linux/err.h" // for IS_ERR, PTR_ERR
#include "linux/iio/buffer.h" // for iio_push_to_buffers_wi...
#include "linux/irqreturn.h" // for irqreturn, irqreturn_t
#include "linux/kconfig.h" // for __ARG_PLACEHOLDER_1
#include "linux/regulator/consumer.h" // for devm_regulator_get_enable
drivers/iio/light/veml6031x00.c should remove these lines:
- #include <linux/bits.h> // lines 9-9
- #include <linux/units.h> // lines 17-17
The full include-list for drivers/iio/light/veml6031x00.c:
#include <asm/byteorder.h> // for le16_to_cpu, cpu_to_le16
#include <linux/bitfield.h> // for FIELD_PREP
#include <linux/bitops.h> // for BIT, const_test_bit
#include <linux/device.h> // for dev_get_drvdata, devic...
#include <linux/errno.h> // for EINVAL, EBUSY, ENOMEM
#include <linux/i2c.h> // for i2c_client, i2c_get_ma...
#include <linux/iio/events.h> // for IIO_UNMOD_EVENT_CODE
#include <linux/iio/iio-gts-helper.h> // for GAIN_SCALE_ITIME_US
#include <linux/iio/iio.h> // for iio_chan_info_enum
#include <linux/iio/sysfs.h> // for iio_const_attr, IIO_CO...
#include <linux/iio/trigger.h> // for devm_iio_trigger_register
#include <linux/iio/trigger_consumer.h> // for iio_poll_func, iio_tri...
#include <linux/iio/triggered_buffer.h> // for devm_iio_triggered_buf...
#include <linux/interrupt.h> // for devm_request_threaded_irq
#include <linux/limits.h> // for U16_MAX
#include <linux/mod_devicetable.h> // for kernel_ulong_t, i2c_de...
#include <linux/module.h> // for MODULE_DEVICE_TABLE
#include <linux/mutex.h> // for class_mutex_constructor
#include <linux/pm.h> // for pm_ptr
#include <linux/pm_runtime.h> // for pm_runtime_put_autosus...
#include <linux/regmap.h> // for regmap_field_write
#include <linux/stddef.h> // for NULL, true
#include <linux/sysfs.h> // for attribute_group
#include <linux/types.h> // for __le16, bool, aligned_s64
#include "asm-generic/bitops/builtin-ffs.h" // for ffs
#include "asm-generic/bitops/const_hweight.h" // for hweight8
#include "linux/array_size.h" // for ARRAY_SIZE
#include "linux/cleanup.h" // for guard, scoped_guard
#include "linux/compiler-context-analysis.h" // for __must_hold
#include "linux/delay.h" // for fsleep
#include "linux/dev_printk.h" // for dev_err_probe, dev_dbg
#include "linux/device/devres.h" // for devm_add_action_or_reset
#include "linux/err.h" // for IS_ERR, PTR_ERR
#include "linux/iio/buffer.h" // for iio_push_to_buffers_wi...
#include "linux/irqreturn.h" // for irqreturn, irqreturn_t
#include "linux/kconfig.h" // for __ARG_PLACEHOLDER_1
#include "linux/regulator/consumer.h" // for devm_regulator_get_enable
---
If that is correct, I bet there is almost no driver prior to IWYU that
has all the headers :D
next prev parent reply other threads:[~2026-06-02 12:22 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 19:58 [PATCH v4 0/4] iio: light: add support for veml6031x00 ALS series Javier Carrasco
2026-05-31 19:58 ` [PATCH v4 1/4] dt-bindings: iio: light: veml6030: add " Javier Carrasco
2026-05-31 19:58 ` [PATCH v4 2/4] iio: light: add support for " Javier Carrasco
2026-05-31 20:16 ` sashiko-bot
2026-06-01 10:21 ` Jonathan Cameron
2026-06-01 20:07 ` Javier Carrasco
2026-06-02 12:33 ` Jonathan Cameron
2026-06-02 17:54 ` Javier Carrasco
2026-06-02 10:01 ` Andy Shevchenko
2026-06-02 10:45 ` Javier Carrasco
2026-06-02 11:12 ` Andy Shevchenko
2026-06-02 11:21 ` Joshua Crofts
2026-06-02 11:35 ` Javier Carrasco
2026-06-02 11:47 ` Joshua Crofts
2026-06-02 12:22 ` Javier Carrasco [this message]
2026-06-02 12:33 ` Joshua Crofts
2026-06-02 12:34 ` Javier Carrasco
2026-06-02 11:42 ` Javier Carrasco
2026-06-02 11:44 ` Javier Carrasco
2026-06-02 12:38 ` Jonathan Cameron
2026-06-02 12:40 ` Javier Carrasco
2026-06-02 14:29 ` Jonathan Cameron
2026-06-02 14:33 ` Javier Carrasco
2026-05-31 19:58 ` [PATCH v4 3/4] iio: light: veml6031x00: add support for triggered buffers Javier Carrasco
2026-05-31 20:30 ` sashiko-bot
2026-06-01 10:26 ` Jonathan Cameron
2026-06-02 10:10 ` Andy Shevchenko
2026-05-31 19:58 ` [PATCH v4 4/4] iio: light: veml6031x00: add support for events and trigger Javier Carrasco
2026-05-31 20:43 ` sashiko-bot
2026-06-01 10:47 ` Jonathan Cameron
2026-06-02 10:27 ` Andy Shevchenko
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=DIYK6APQQX6S.2KLGTD0G5GCDA@gmail.com \
--to=javier.carrasco.cruz@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=gupt21@gmail.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@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