aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorOlof Johansson <[email protected]>2021-06-17 12:54:28 -0700
committerOlof Johansson <[email protected]>2021-06-17 12:57:14 -0700
commit25da503ecce8f523c1c1c678659cb484d3bcd73f (patch)
tree00aedb891a1c0d01a1fb9e1c462ad83b33273a1f /include/linux
parent1eb5f83ee936de6a69b2bcee95088a6e0ab7c202 (diff)
parent48a74b1147f7db4623eaed591cc01eb740b871c0 (diff)
Merge tag 'reset-for-v5.14-2' of git://git.pengutronix.de/pza/linux into arm/drivers
Reset controller updates for v5.14, part2 This tag contains a few small fixes, allows to build the Berlin reset driver as a module, and adds stubs to the reset controller API to allow compile-testing drivers outside of drivers/reset without enabling the reset framework. * tag 'reset-for-v5.14-2' of git://git.pengutronix.de/pza/linux: reset: Add compile-test stubs reset: berlin: support module build reset: bail if try_module_get() fails reset: mchp: sparx5: fix return value check in mchp_sparx5_map_io() reset: lantiq: use devm_reset_controller_register() reset: hi6220: Use the correct HiSilicon copyright Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Olof Johansson <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/reset-controller.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
index ec35814e0bbb..0fa4f60e1186 100644
--- a/include/linux/reset-controller.h
+++ b/include/linux/reset-controller.h
@@ -79,6 +79,7 @@ struct reset_controller_dev {
unsigned int nr_resets;
};
+#if IS_ENABLED(CONFIG_RESET_CONTROLLER)
int reset_controller_register(struct reset_controller_dev *rcdev);
void reset_controller_unregister(struct reset_controller_dev *rcdev);
@@ -88,5 +89,26 @@ int devm_reset_controller_register(struct device *dev,
void reset_controller_add_lookup(struct reset_control_lookup *lookup,
unsigned int num_entries);
+#else
+static inline int reset_controller_register(struct reset_controller_dev *rcdev)
+{
+ return 0;
+}
+
+static inline void reset_controller_unregister(struct reset_controller_dev *rcdev)
+{
+}
+
+static inline int devm_reset_controller_register(struct device *dev,
+ struct reset_controller_dev *rcdev)
+{
+ return 0;
+}
+
+static inline void reset_controller_add_lookup(struct reset_control_lookup *lookup,
+ unsigned int num_entries)
+{
+}
+#endif
#endif