summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/devicetree.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-11-03 19:35:47 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-11-05 00:50:55 +0300
commit42124bc598f64f84b3335d5a058304207695b84f (patch)
tree0faea03d1084618e3799c5eda2b20aebdbe59f10 /drivers/pinctrl/devicetree.h
parentb83bd893f3a04d35f5bfcf399c1034660e5b2403 (diff)
downloadlinux-42124bc598f64f84b3335d5a058304207695b84f.tar.xz
pinctrl: Introduce generic #pinctrl-cells and pinctrl_parse_index_with_args
Introduce #pinctrl-cells helper binding and generic helper functions pinctrl_count_index_with_args() and pinctrl_parse_index_with_args(). Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> [Forward-declare of_phandle_args] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/devicetree.h')
-rw-r--r--drivers/pinctrl/devicetree.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/pinctrl/devicetree.h b/drivers/pinctrl/devicetree.h
index 760bc4960f58..c2d1a5505850 100644
--- a/drivers/pinctrl/devicetree.h
+++ b/drivers/pinctrl/devicetree.h
@@ -16,11 +16,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+struct of_phandle_args;
+
#ifdef CONFIG_OF
void pinctrl_dt_free_maps(struct pinctrl *p);
int pinctrl_dt_to_map(struct pinctrl *p);
+int pinctrl_count_index_with_args(const struct device_node *np,
+ const char *list_name);
+
+int pinctrl_parse_index_with_args(const struct device_node *np,
+ const char *list_name, int index,
+ struct of_phandle_args *out_args);
+
#else
static inline int pinctrl_dt_to_map(struct pinctrl *p)
@@ -32,4 +41,18 @@ static inline void pinctrl_dt_free_maps(struct pinctrl *p)
{
}
+static inline int pinctrl_count_index_with_args(const struct device_node *np,
+ const char *list_name)
+{
+ return -ENODEV;
+}
+
+static inline int
+pinctrl_parse_index_with_args(const struct device_node *np,
+ const char *list_name, int index,
+ struct of_phandle_args *out_args)
+{
+ return -ENODEV;
+}
+
#endif