linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: Include GPIO consumer header in main include
@ 2017-12-08 13:39 Linus Walleij
  2017-12-12 22:33 ` Wolfram Sang
  2018-01-15 18:03 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2017-12-08 13:39 UTC (permalink / raw)
  To: linux-arm-kernel

It seems most users of <linux/i2c.h> pick up their
dependency of <linux/gpio/consumer.h> from other paths but
that is not a universal law, so include the header
explicitly so we have struct gpio_desc available.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 include/linux/i2c.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 5d7f3c1853ae..8b968c44ddfa 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -34,6 +34,7 @@
 #include <linux/irqdomain.h>		/* for Host Notify IRQ */
 #include <linux/of.h>		/* for struct device_node */
 #include <linux/swab.h>		/* for swab16 */
+#include <linux/gpio/consumer.h>
 #include <uapi/linux/i2c.h>
 
 extern struct bus_type i2c_bus_type;
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] i2c: Include GPIO consumer header in main include
  2017-12-08 13:39 [PATCH] i2c: Include GPIO consumer header in main include Linus Walleij
@ 2017-12-12 22:33 ` Wolfram Sang
  2018-01-15 18:03 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-12-12 22:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 08, 2017 at 02:39:34PM +0100, Linus Walleij wrote:
> It seems most users of <linux/i2c.h> pick up their
> dependency of <linux/gpio/consumer.h> from other paths but
> that is not a universal law, so include the header
> explicitly so we have struct gpio_desc available.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Not sure. Having GPIOs is not really a requirement for I2C. I tend to
think drivers using it should include this explicitly?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171212/de103bf0/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* i2c: Include GPIO consumer header in main include
  2017-12-08 13:39 [PATCH] i2c: Include GPIO consumer header in main include Linus Walleij
  2017-12-12 22:33 ` Wolfram Sang
@ 2018-01-15 18:03 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2018-01-15 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 08, 2017 at 02:39:34PM +0100, Linus Walleij wrote:
> It seems most users of <linux/i2c.h> pick up their
> dependency of <linux/gpio/consumer.h> from other paths but
> that is not a universal law, so include the header
> explicitly so we have struct gpio_desc available.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

I still think drivers needing GPIO should include it explicitly.
So, NAK until further arguments arrive...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180115/11fd1e6e/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-15 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 13:39 [PATCH] i2c: Include GPIO consumer header in main include Linus Walleij
2017-12-12 22:33 ` Wolfram Sang
2018-01-15 18:03 ` Wolfram Sang

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).