diff mbox series

[RFC,v7,net-next,04/13] net: ocelot: add interface to get regmaps when exernally controlled

Message ID 20220307021208.2406741-5-colin.foster@in-advantage.com
State Not Applicable
Headers show
Series add support for VSC7512 control over SPI | expand

Commit Message

Colin Foster March 7, 2022, 2:11 a.m. UTC
Ocelot chips have several peripherals: pinctrl, sgpio, miim... If the chip
is in a configuration where it is being externally controlled via SPI, the
child device will need to request a resource from the parent.

Add the function call that will be used in those scenarios so that drivers
can be updated before the full functionality is added.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
 include/soc/mscc/ocelot.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index ee3c59639d70..998616511ffb 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -1018,4 +1018,11 @@  ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port,
 }
 #endif
 
+static inline struct regmap *
+ocelot_get_regmap_from_resource(struct device *child,
+				const struct resource *res)
+{
+	return ERR_PTR(-EOPNOTSUPP);
+}
+
 #endif