From: Thierry Reding <thierry.reding@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org,
linux-next <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: mediatek: Explicitly include pinctrl headers
Date: Mon, 5 Feb 2018 18:59:06 +0100 [thread overview]
Message-ID: <20180205175906.GA8237@ulmo> (raw)
In-Reply-To: <CA+55aFy--bQRDZEUsBfiWhyP+Of3+s4zEcKo1T8cCoAMXBrwsw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1721 bytes --]
On Mon, Feb 05, 2018 at 09:42:21AM -0800, Linus Torvalds wrote:
> On Mon, Feb 5, 2018 at 4:54 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
> >
> > Include these headers explicitly to avoid the build failure.
>
> I don't think you need to include *both*.
>
> <linux/device.h> used to include just <linux/pinctrl/devinfo.h>.
>
> I'll edit your patches to include just that.
> <linux/pinctrl/consumer.h> will come in automatically through it.
I was trying to avoid any implicit inclusion, but looking at
pinctrl/devinfo.h it has a comment right above the pinctrl/consumer.h
include that makes it clear that pinctrl/devinfo.h is the consumer of
pinctrl for the core, so I guess the implicit include is fine here.
I do question, though, if drivers have any business including this
pinctrl/devinfo.h in the first place. For the Mediatek ethernet it seems
like selecting the default state is redundant (the core should already
have taken care of that, and the driver never selects a different state
anywhere).
The same is true of drm/rockchip, which also only seems to select a
state which the pinctrl core should've selected by default already. See
arch/arm/boot/dts/rk3288.dtsi which sets up the "lcdc" state as the only
state for the LVDS output.
Anyway, I think going with the pinctrl/devinfo.h include only is fine
for now. If it turns out that the Mediatek ethernet and Rockchip LVDS
drivers can just omit the bits fiddling with struct dev_pin_info, we can
swap out the pinctrl/devinfo.h include for pinctrl/consumer.h at that
time.
LinusW: what are your thoughts on the struct dev_pin_info usage by these
drivers? Does their code seem redundant to you, too?
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-02-05 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 12:47 [PATCH 0/2] pinctrl: Implicit inclusion fallout fixes Thierry Reding
2018-02-05 12:47 ` [PATCH 1/2] drm/rockchip: lvds: Explicitly include pinctrl headers Thierry Reding
2018-02-05 12:47 ` [PATCH 2/2] mmc: meson-gx-mmc: Explicitly include pinctr/consumer.h Thierry Reding
2018-02-05 12:54 ` [PATCH] net: mediatek: Explicitly include pinctrl headers Thierry Reding
2018-02-05 17:42 ` Linus Torvalds
2018-02-05 17:59 ` Thierry Reding [this message]
2018-02-05 19:02 ` Linus Walleij
2018-02-05 19:08 ` Thierry Reding
2018-02-05 23:03 ` Linus Walleij
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=20180205175906.GA8237@ulmo \
--to=thierry.reding@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).