* [PATCH] gpio: Clarify that <linux/gpio.h> is legacy
@ 2017-11-30 10:04 Linus Walleij
0 siblings, 0 replies; only message in thread
From: Linus Walleij @ 2017-11-30 10:04 UTC (permalink / raw)
To: linux-gpio; +Cc: Linus Walleij
It should be clear to developers that they should not include
this file in new code.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
While I should certainly try to fix checkpatch.pl to warn
about this, it doesn't hurt to spell it out in the file as well.
---
include/linux/gpio.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 8ef7fc0ce0f0..91ed23468530 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -1,4 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * <linux/gpio.h>
+ *
+ * This is the LEGACY GPIO bulk include file, including legacy APIs. It is
+ * used for GPIO drivers still referencing the global GPIO numberspace,
+ * and should not be included in new code.
+ *
+ * If you're implementing a GPIO driver, only include <linux/gpio/driver.h>
+ * If you're implementing a GPIO consumer, only include <linux/gpio/consumer.h>
+ */
#ifndef __LINUX_GPIO_H
#define __LINUX_GPIO_H
--
2.14.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-30 10:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 10:04 [PATCH] gpio: Clarify that <linux/gpio.h> is legacy Linus Walleij
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.