[PATCH V2 3/6] pinctrl: prepare API for reading pins, groups & functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rafał Miłecki <rafal@xxxxxxxxxx>

That API can be used for parsing platform data (coming from e.g. DT or
ACPI) into pinctrl generic structures.

Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
---
V2: New patch in the series to address Andy's API review
---
 drivers/pinctrl/core.c   | 12 ++++++++++++
 drivers/pinctrl/core.h   |  4 ++++
 drivers/pinctrl/pinmux.c |  6 ++++++
 drivers/pinctrl/pinmux.h |  2 ++
 4 files changed, 24 insertions(+)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index ffe39336fcac..53b3e8b54a9b 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -515,8 +515,20 @@ void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,
 }
 EXPORT_SYMBOL_GPL(pinctrl_remove_gpio_range);
 
+int pinctrl_generic_load_pins(struct pinctrl_desc *pctldesc, struct device *dev)
+{
+	return -ENOENT;
+}
+EXPORT_SYMBOL_GPL(pinctrl_generic_load_pins);
+
 #ifdef CONFIG_GENERIC_PINCTRL_GROUPS
 
+int pinctrl_generic_load_groups(struct pinctrl_dev *pctldev)
+{
+	return -ENOENT;
+}
+EXPORT_SYMBOL_GPL(pinctrl_generic_load_groups);
+
 /**
  * pinctrl_generic_get_group_count() - returns the number of pin groups
  * @pctldev: pin controller device
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index 840103c40c14..def60d89d37b 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -182,6 +182,8 @@ struct pinctrl_maps {
 	unsigned num_maps;
 };
 
+int pinctrl_generic_load_pins(struct pinctrl_desc *pctldesc, struct device *dev);
+
 #ifdef CONFIG_GENERIC_PINCTRL_GROUPS
 
 /**
@@ -198,6 +200,8 @@ struct group_desc {
 	void *data;
 };
 
+int pinctrl_generic_load_groups(struct pinctrl_dev *pctldev);
+
 int pinctrl_generic_get_group_count(struct pinctrl_dev *pctldev);
 
 const char *pinctrl_generic_get_group_name(struct pinctrl_dev *pctldev,
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 6cdbd9ccf2f0..ef7d2cbf0946 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -788,6 +788,12 @@ void pinmux_init_device_debugfs(struct dentry *devroot,
 
 #ifdef CONFIG_GENERIC_PINMUX_FUNCTIONS
 
+int pinmux_generic_load_functions(struct pinctrl_dev *pctldev)
+{
+	return -ENOENT;
+}
+EXPORT_SYMBOL_GPL(pinmux_generic_load_functions);
+
 /**
  * pinmux_generic_get_function_count() - returns number of functions
  * @pctldev: pin controller device
diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h
index 78c3a31be882..85e5e3a0222f 100644
--- a/drivers/pinctrl/pinmux.h
+++ b/drivers/pinctrl/pinmux.h
@@ -134,6 +134,8 @@ struct function_desc {
 	void *data;
 };
 
+int pinmux_generic_load_functions(struct pinctrl_dev *pctldev);
+
 int pinmux_generic_get_function_count(struct pinctrl_dev *pctldev);
 
 const char *
-- 
2.31.1




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux