All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Andrew Bresticker <abrestic@chromium.org>
Cc: Paul Bolle <pebolle@tiscali.nl>,
	Alexandre Courbot <gnurou@gmail.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Linux-MIPS <linux-mips@linux-mips.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ezequiel Garcia <ezequiel.garcia@imgtec.com>,
	James Hartley <james.hartley@imgtec.com>,
	James Hogan <james.hogan@imgtec.com>,
	Damien Horsley <Damien.Horsley@imgtec.com>,
	Govindraj Raja <govindraj.raja@imgtec.com>,
	Kevin Cernekee <cernekee@chromium.org>
Subject: Re: [PATCH V2 3/3] pinctrl: Add Pistachio SoC pin control driver
Date: Tue, 7 Apr 2015 16:13:16 +0200	[thread overview]
Message-ID: <CACRpkdYfN_AV47G8cni=gApcwf8nx_fUrreGZp7ASRsU5PM1bA@mail.gmail.com> (raw)
In-Reply-To: <CAL1qeaG70_42p8r9ogHxMv2h-yx_TENYV_gZbX1wQMhqSaiFpg@mail.gmail.com>

On Tue, Mar 31, 2015 at 6:56 PM, Andrew Bresticker
<abrestic@chromium.org> wrote:
> Hi Paul,
>
> On Tue, Mar 31, 2015 at 1:10 AM, Paul Bolle <pebolle@tiscali.nl> wrote:
>> The patch adds a mismatch between the Kconfig symbol (a bool) and the
>> code (which suggests that a modular build is also possible).
>
> Nearly all of the pinctrl drivers (with the exception of qcom and
> intel) are like this.  They use a bool Kconfig symbol but they are
> written so that they could be built as a module in the future.

There are many aspects to this and I have no strong opinion,
it doesn't really disturb me either way as both are familiar
ways of writing drivers be it modular or not.

I think it's more disturbing that bool drivers have .remove()
functions, and as pointed out elsewhere this is because the
module can still be bound/unbound from sysfs even if compiled
into the kernel and then that code path will actually be executed.

And as I remarked again, elsewhere, that can be overcome
by adding the .suppress_bind_attrs = true to struct device_driver
inside the platform driver.

So if going through all the hazzle to remove anything compiled-out
for non-modules, also take the step above removing .remove()
calls and setting .suppress_bind_attrs.

I will maybe do so sometime myself for any bool drivers...

Yours,
Linus Walleij

  parent reply	other threads:[~2015-04-07 14:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 23:16 [PATCH V2 0/3] pinctrl: Support for IMG Pistachio Andrew Bresticker
2015-03-30 23:16 ` [PATCH V2 1/3] pinctrl: Document "function" + "pins" pinmux binding Andrew Bresticker
2015-04-07 13:20   ` Linus Walleij
2015-03-30 23:16 ` [PATCH V2 2/3] pinctrl: Add Pistachio SoC pin control binding document Andrew Bresticker
2015-03-30 23:16 ` [PATCH V2 3/3] pinctrl: Add Pistachio SoC pin control driver Andrew Bresticker
2015-03-31  8:10   ` Paul Bolle
2015-03-31 16:56     ` Andrew Bresticker
2015-03-31 18:20       ` Paul Bolle
2015-03-31 18:37         ` Andrew Bresticker
2015-03-31 18:55           ` Paul Bolle
2015-04-07 14:13       ` Linus Walleij [this message]
2015-03-31 14:00 ` [PATCH V2 0/3] pinctrl: Support for IMG Pistachio Ralf Baechle
2015-03-31 17:20   ` Andrew Bresticker
2015-04-07 13:24     ` 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='CACRpkdYfN_AV47G8cni=gApcwf8nx_fUrreGZp7ASRsU5PM1bA@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=Damien.Horsley@imgtec.com \
    --cc=abrestic@chromium.org \
    --cc=cernekee@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel.garcia@imgtec.com \
    --cc=gnurou@gmail.com \
    --cc=govindraj.raja@imgtec.com \
    --cc=james.hartley@imgtec.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=pebolle@tiscali.nl \
    --cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.