diff mbox series

[RFC,1/5] dm: core: add on_reset method

Message ID 20240507100431.206670-2-robert.marko@sartura.hr
State RFC
Delegated to: Dario Binacchi
Headers show
Series Implement exiting 4-byte adressing mode before reset | expand

Commit Message

Robert Marko May 7, 2024, 10:03 a.m. UTC
Currently, we dont have a specific method that is intented to be called
right before calling board reset.

Intention for this method is to be able to exit 4-byte adressing mode on
SPI-NOR devices before reset.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 include/dm/device.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/include/dm/device.h b/include/dm/device.h
index add67f9ec0..19713d958c 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -344,6 +344,7 @@  struct udevice_id {
  * @probe: Called to probe a device, i.e. activate it
  * @remove: Called to remove a device, i.e. de-activate it
  * @unbind: Called to unbind a device from its driver
+ * @on_reset: Called befora calling board reset
  * @of_to_plat: Called before probe to decode device tree data
  * @child_post_bind: Called after a new child has been bound
  * @child_pre_probe: Called before a child device is probed. The device has
@@ -379,6 +380,7 @@  struct driver {
 	int (*probe)(struct udevice *dev);
 	int (*remove)(struct udevice *dev);
 	int (*unbind)(struct udevice *dev);
+	int (*on_reset)(struct udevice *dev);
 	int (*of_to_plat)(struct udevice *dev);
 	int (*child_post_bind)(struct udevice *dev);
 	int (*child_pre_probe)(struct udevice *dev);