Skip to content

Commit be0f5b0

Browse files
pdgendtjhedberg
authored andcommitted
drivers: syscon: Cleanup some doxygen return commands
Documenting return values with doxygen should use the retval tags. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 6a4af24 commit be0f5b0

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

drivers/syscon/syscon_common.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ extern "C" {
1818
* @param reg Pointer to the register address in question.
1919
* @param reg_size The size of the syscon register region.
2020
* @param reg_width The width of a single register (in bytes).
21-
* @return 0 if the register read is valid.
22-
* @return -EINVAL is the read is invalid.
21+
*
22+
* @retval 0 if the register read is valid.
23+
* @retval -EINVAL if the read is invalid.
2324
*/
2425
static inline int syscon_sanitize_reg(uint16_t *reg, size_t reg_size, uint8_t reg_width)
2526
{

include/zephyr/drivers/syscon.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ __subsystem struct syscon_driver_api {
7272
*
7373
* @param dev The device to get the register size for.
7474
* @param addr Where to write the base address.
75-
* @return 0 When @a addr was written to.
76-
* @return -ENOSYS If the API or function isn't implemented.
75+
*
76+
* @retval 0 When @a addr was written to.
77+
* @retval -ENOSYS If the API or function isn't implemented.
7778
*/
7879
__syscall int syscon_get_base(const struct device *dev, uintptr_t *addr);
7980

@@ -98,8 +99,8 @@ static inline int z_impl_syscon_get_base(const struct device *dev, uintptr_t *ad
9899
* @param reg The register offset
99100
* @param val The returned value read from the syscon register
100101
*
101-
* @return 0 on success.
102-
* @return -ENOSYS If the API or function isn't implemented.
102+
* @retval 0 on success.
103+
* @retval -ENOSYS If the API or function isn't implemented.
103104
*/
104105
__syscall int syscon_read_reg(const struct device *dev, uint16_t reg, uint32_t *val);
105106

@@ -124,8 +125,8 @@ static inline int z_impl_syscon_read_reg(const struct device *dev, uint16_t reg,
124125
* @param reg The register offset
125126
* @param val The value to be written in the register
126127
*
127-
* @return 0 on success.
128-
* @return -ENOSYS If the API or function isn't implemented.
128+
* @retval 0 on success.
129+
* @retval -ENOSYS If the API or function isn't implemented.
129130
*/
130131
__syscall int syscon_write_reg(const struct device *dev, uint16_t reg, uint32_t val);
131132

@@ -145,8 +146,9 @@ static inline int z_impl_syscon_write_reg(const struct device *dev, uint16_t reg
145146
*
146147
* @param dev The device to get the register size for.
147148
* @param size Pointer to write the size to.
148-
* @return 0 for success.
149-
* @return -ENOSYS If the API or function isn't implemented.
149+
*
150+
* @retval 0 on success.
151+
* @retval -ENOSYS If the API or function isn't implemented.
150152
*/
151153
__syscall int syscon_get_size(const struct device *dev, size_t *size);
152154

0 commit comments

Comments
 (0)