public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Sirat <email@sirat.me>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: proximity: add driver for ST VL53L1X ToF sensor
Date: Sun, 8 Mar 2026 18:06:03 +0000	[thread overview]
Message-ID: <20260308180603.61eb03ab@jic23-huawei> (raw)
In-Reply-To: <CANn+LWL57iruSLnmg8rY5qrgnzLww+Z9hUc=ZveA31dKh9k6Fw@mail.gmail.com>


> > > + */
> > > +
> > > +#include <linux/bits.h>
> > > +#include <linux/delay.h>
> > > +#include <linux/gpio/consumer.h>
> > > +#include <linux/i2c.h>
> > > +#include <linux/irq.h>
> > > +#include <linux/interrupt.h>
> > > +#include <linux/module.h>
> > > +#include <linux/regmap.h>
> > > +#include <linux/regulator/consumer.h>  
> >
> > Check that you have includes for all things used directly in this
> > driver. For example dev_err()
> >
> > We use a slightly relaxed version of include what you use for IIO
> > (and the kernel in general). So sometimes there are headers that
> > are well documented as including others, but when that's not true
> > we don't make assumptions and so include everything relevant even
> > if it happens to be included via another path today.
> >  
> I've added linux/device.h, linux/bitfield.h, linux/completion.h, and
> linux/mod_devicetable.h. Hopefully this covers everything. For dev_err(),
> I was conflicted between linux/dev_printk.h and linux/device.h, but
> ended up using the latter.
Preference there is for the lesser header, so would be linux/dev_printk.h
There are two big headers like this that we are trying to reduce includes
of, kernel.h and device.h
For device.h more or less only need it in drivers if you are actually
directly dereferencing something in struct device.

Thanks,

Jonathan

  reply	other threads:[~2026-03-08 18:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03  9:02 [PATCH 0/3] iio: proximity: add driver for ST VL53L1X ToF sensor Siratul Islam
2026-03-03  9:02 ` [PATCH 1/3] dt-bindings: iio: proximity: add " Siratul Islam
2026-03-03 19:12   ` Conor Dooley
2026-03-03 19:49     ` Sirat
2026-03-07 16:55       ` David Lechner
2026-03-03  9:02 ` [PATCH 2/3] iio: proximity: add driver for " Siratul Islam
2026-03-07 13:59   ` Jonathan Cameron
2026-03-08 10:37     ` Sirat
2026-03-08 18:06       ` Jonathan Cameron [this message]
2026-03-07 17:17   ` David Lechner
2026-03-08 11:04     ` Sirat
2026-03-08 17:33       ` David Lechner
2026-03-03  9:02 ` [PATCH 3/3] MAINTAINERS: add entry for ST VL53L1X ToF sensor driver Siratul Islam
2026-03-07 16:57   ` David Lechner

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=20260308180603.61eb03ab@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=email@sirat.me \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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