summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Walleij <linusw@kernel.org>2026-05-11 22:33:30 +0200
committerLinus Walleij <linusw@kernel.org>2026-05-11 22:33:30 +0200
commit42ec31ec8df4675af621ec686db7410153beebfd (patch)
treeb8fc157fa4111282e01f0ab1e263e830a5315b35 /include
parent0942cdb8f4b14cbfdc1996c2c332c6402a203bf3 (diff)
parentd8074fd57a0231457e580c1f6cd33f089f09fd12 (diff)
downloadlinux-next-42ec31ec8df4675af621ec686db7410153beebfd.tar.gz
linux-next-42ec31ec8df4675af621ec686db7410153beebfd.zip
Merge branch 'ib-mux-pinctrl' into devel
Diffstat (limited to 'include')
-rw-r--r--include/linux/mux/consumer.h8
-rw-r--r--include/linux/pinctrl/pinmux.h5
2 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/mux/consumer.h b/include/linux/mux/consumer.h
index a961861a503b..449e38e6e2c5 100644
--- a/include/linux/mux/consumer.h
+++ b/include/linux/mux/consumer.h
@@ -60,7 +60,10 @@ struct mux_control *mux_control_get_optional(struct device *dev, const char *mux
void mux_control_put(struct mux_control *mux);
struct mux_control *devm_mux_control_get(struct device *dev, const char *mux_name);
-struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name);
+
+struct mux_state *
+devm_mux_state_get_from_np(struct device *dev, const char *mux_name, struct device_node *np);
+
struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name);
struct mux_state *devm_mux_state_get_optional_selected(struct device *dev, const char *mux_name);
@@ -161,4 +164,7 @@ static inline struct mux_state *devm_mux_state_get_optional_selected(struct devi
#endif /* CONFIG_MULTIPLEXER */
+#define devm_mux_state_get(dev, mux_name) \
+ devm_mux_state_get_from_np(dev, mux_name, NULL)
+
#endif /* _LINUX_MUX_CONSUMER_H */
diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h
index 094bbe2fd6fd..77664937eeb2 100644
--- a/include/linux/pinctrl/pinmux.h
+++ b/include/linux/pinctrl/pinmux.h
@@ -51,6 +51,8 @@ struct pinctrl_gpio_range;
* are handled by the pinmux subsystem. The @func_selector selects a
* certain function whereas @group_selector selects a certain set of pins
* to be used. On simple controllers the latter argument may be ignored
+ * @release_mux: Release software resources acquired by @set_mux. This callback
+ * must not change hardware state to avoid glitches when switching mux.
* @gpio_request_enable: requests and enables GPIO on a certain pin.
* Implement this only if you can mux every pin individually as GPIO. The
* affected GPIO range is passed along with an offset(pin number) into that
@@ -80,6 +82,9 @@ struct pinmux_ops {
unsigned int selector);
int (*set_mux) (struct pinctrl_dev *pctldev, unsigned int func_selector,
unsigned int group_selector);
+ void (*release_mux) (struct pinctrl_dev *pctldev,
+ unsigned int func_selector,
+ unsigned int group_selector);
int (*gpio_request_enable) (struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned int offset);