@@ -28,16 +28,25 @@ __subsystem struct nrf_mspi_driver_api {
28
28
};
29
29
30
30
/**
31
- * @brief Configure reset pin. It is mandatory when reset pin overlaps with any data pin.
31
+ * @brief Configure reset pin. It should be used if there is a chance that reset pin overlaps with
32
+ * any data pin.
32
33
*
33
- * @param dev pointer to the mspi device structure.
34
- * @param psel pin number
34
+ * Function checks if given reset pin overlap with any pin used by MSPI. If it does and can be used
35
+ * as reset in SINGLE mode (for example, ovelaps with data line DQ3), then it is saved in MSPI
36
+ * driver. If it does not overlap, then gpio_pin_configure_dt() is called.
35
37
*
36
- * @retval non-negative the observed state of the on-off service associated
37
- * with the clock machine at the time the request was
38
- * processed (see onoff_release()), if successful.
39
- * @retval -EIO if service has recorded an error.
40
- * @retval -ENOTSUP if the service is not in a state that permits release.
38
+ * @param dev Pointer to the MSPI device structure.
39
+ * @param dev_id Pointer to the device ID of the MSPI device.
40
+ * @param spec GPIO specification from devicetree.
41
+ * @param gpio_port_num GPIO port number of the selected reset pin.
42
+ * @param extra_flags Additional GPIO flags.
43
+ *
44
+ * @retval 0 If successful.
45
+ * @retval -ENOTSUP Return value from gpio_pin_configure_dt().
46
+ * @retval -EINVAL If reset pin overlaps with MSPI pin that cannot be used as reset (e.g. CLK) or a
47
+ * return value from gpio_pin_configure_dt().
48
+ * @retval -EIO Return value from gpio_pin_configure_dt().
49
+ * @retval -EWOULDBLOCK Return value from gpio_pin_configure_dt().
41
50
*/
42
51
static inline int nrf_mspi_reset_pin_config (const struct device * dev ,
43
52
const struct mspi_dev_id * dev_id ,
@@ -50,16 +59,20 @@ static inline int nrf_mspi_reset_pin_config(const struct device *dev,
50
59
}
51
60
52
61
/**
53
- * @brief Set reset pin state.
62
+ * @brief Set reset pin state. It should be used if there is a chance that reset pin overlaps with
63
+ * any data pin.
64
+ *
65
+ * If reset pin does not overlap with any MSPI pin, gpio_pin_set_dt() is called.
66
+ * Assumes that nrf_mspi_reset_pin_config() was called before.
54
67
*
55
- * @param dev pointer to the mspi device structure.
56
- * @param psel pin number
68
+ * @param dev Pointer to the MSPI device structure.
69
+ * @param spec GPIO specification from devicetree.
70
+ * @param dev_id Pointer to the device ID of the MSPI device.
71
+ * @param value Value assigned to the pin.
57
72
*
58
- * @retval non-negative the observed state of the on-off service associated
59
- * with the clock machine at the time the request was
60
- * processed (see onoff_release()), if successful.
61
- * @retval -EIO if service has recorded an error.
62
- * @retval -ENOTSUP if the service is not in a state that permits release.
73
+ * @retval 0 If successful.
74
+ * @retval -EIO Return value from gpio_pin_set_dt().
75
+ * @retval -EWOULDBLOCK Return value from gpio_pin_set_dt().
63
76
*/
64
77
static inline int nrf_mspi_reset_pin_set (const struct device * dev , const struct gpio_dt_spec * spec ,
65
78
const struct mspi_dev_id * dev_id , int value )
0 commit comments