* [PATCH] pinctrl: split pincontrol states into its own header
@ 2012-03-06 21:15 Linus Walleij
2012-03-06 21:21 ` Stephen Warren
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2012-03-06 21:15 UTC (permalink / raw)
To: linux-arm-kernel
From: Linus Walleij <linus.walleij@linaro.org>
Move the pin control state defines into its own header file,
since it is used both by machine.h which is facing the platform
and by consumer.h which is facing the drivers, and pinctrl.h
which is pinctrl-driver internal, let's not have each and every
.h file include all others, then isolation is moot.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
include/linux/pinctrl/consumer.h | 2 +-
include/linux/pinctrl/machine.h | 2 +-
include/linux/pinctrl/pinctrl-state.h | 6 ++++++
include/linux/pinctrl/pinctrl.h | 3 +--
4 files changed, 9 insertions(+), 4 deletions(-)
create mode 100644 include/linux/pinctrl/pinctrl-state.h
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
index 9ad5896..191e726 100644
--- a/include/linux/pinctrl/consumer.h
+++ b/include/linux/pinctrl/consumer.h
@@ -15,7 +15,7 @@
#include <linux/err.h>
#include <linux/list.h>
#include <linux/seq_file.h>
-#include "pinctrl.h"
+#include "pinctrl-state.h"
/* This struct is private to the core and should be regarded as a cookie */
struct pinctrl;
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h
index 3fd2f9d..fee4349 100644
--- a/include/linux/pinctrl/machine.h
+++ b/include/linux/pinctrl/machine.h
@@ -12,7 +12,7 @@
#ifndef __LINUX_PINCTRL_MACHINE_H
#define __LINUX_PINCTRL_MACHINE_H
-#include "pinctrl.h"
+#include "pinctrl-state.h"
enum pinctrl_map_type {
PIN_MAP_TYPE_INVALID,
diff --git a/include/linux/pinctrl/pinctrl-state.h b/include/linux/pinctrl/pinctrl-state.h
new file mode 100644
index 0000000..3920e28
--- /dev/null
+++ b/include/linux/pinctrl/pinctrl-state.h
@@ -0,0 +1,6 @@
+/*
+ * Standard pin control state definitions
+ */
+
+#define PINCTRL_STATE_DEFAULT "default"
+#define PINCTRL_STATE_IDLE "idle"
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index bbdd7e1..e9e94eb 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -17,8 +17,7 @@
#include <linux/radix-tree.h>
#include <linux/list.h>
#include <linux/seq_file.h>
-
-#define PINCTRL_STATE_DEFAULT "default"
+#include "pinctrl-state.h"
struct pinctrl_dev;
struct pinmux_ops;
--
1.7.8
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] pinctrl: split pincontrol states into its own header
2012-03-06 21:15 [PATCH] pinctrl: split pincontrol states into its own header Linus Walleij
@ 2012-03-06 21:21 ` Stephen Warren
2012-03-06 22:09 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2012-03-06 21:21 UTC (permalink / raw)
To: linux-arm-kernel
On 03/06/2012 02:15 PM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> Move the pin control state defines into its own header file,
> since it is used both by machine.h which is facing the platform
> and by consumer.h which is facing the drivers, and pinctrl.h
> which is pinctrl-driver internal, let's not have each and every
> .h file include all others, then isolation is moot.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Sure. I'm not quite sure how many (or how many standardized) states we
expect to have such that it warrants 'pinctrl-state.h' vs. say
'pinctrl-common.h', but it's probably fine.
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] pinctrl: split pincontrol states into its own header
2012-03-06 21:21 ` Stephen Warren
@ 2012-03-06 22:09 ` Linus Walleij
0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-03-06 22:09 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 6, 2012 at 10:21 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> Sure. I'm not quite sure how many (or how many standardized) states we
> expect to have such that it warrants 'pinctrl-state.h' vs. say
> 'pinctrl-common.h', but it's probably fine.
We can just rename it as seems fit I guess...
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
I really like your new email address!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-06 22:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 21:15 [PATCH] pinctrl: split pincontrol states into its own header Linus Walleij
2012-03-06 21:21 ` Stephen Warren
2012-03-06 22:09 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox