All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: David Miller <davem@davemloft.net>
Cc: tklauser@distanz.ch, nico@fluxnic.net, netdev@vger.kernel.org
Subject: Re: [PATCH net v2] net: smc91x: Fix build without gpiolib
Date: Fri, 12 Dec 2014 08:34:54 -0800	[thread overview]
Message-ID: <20141212163454.GI2950@atomide.com> (raw)
In-Reply-To: <20141212.113020.884577050283133272.davem@davemloft.net>

* David Miller <davem@davemloft.net> [141212 08:32]:
> From: Tobias Klauser <tklauser@distanz.ch>
> Date: Fri, 12 Dec 2014 17:27:46 +0100
> 
> > GPIO is not needed in all configurations of the chip, they are optional.
> > That's why I was going for the ugly #ifdef solution.
> > 
> > It seems that there are stubs for the functions in question in
> > linux/gpio/consumer.h already as Tony suggested. Thus, adding an
> > #include <linux/gpio/consumer.h> to the driver should be enough. I'll
> > send an updated patch.
> 
> So for the "configurations" that need it, how does the user figure out
> that GPIO is needed?
> 
> In my opinion, if the code blocks enabling the configurations that
> need this are enabled, so should GPIO be depended upon.
> 
> I think, at a minimum, when CONFIG_OF is enabled smsc91x should
> require GPIO.

Well in many cases these control GPIOs, or some part of them, are
hardwired with pulls. That's why they are optional.

Regards,

Tony

  reply	other threads:[~2014-12-12 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 16:07 [PATCH net v2] net: smc91x: Fix build without gpiolib Tobias Klauser
2014-12-12 16:11 ` Tony Lindgren
2014-12-12 16:21   ` David Miller
2014-12-12 16:27     ` Tobias Klauser
2014-12-12 16:30       ` David Miller
2014-12-12 16:34         ` Tony Lindgren [this message]
2014-12-12 16:45         ` Tobias Klauser
2014-12-12 16:58           ` David Miller
2014-12-15  8:56             ` Tobias Klauser

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=20141212163454.GI2950@atomide.com \
    --to=tony@atomide.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=tklauser@distanz.ch \
    /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.