Commit 3958bffeb3cb536f378072ee1935c7106db91e06

Authored by Mario Six
Committed by Anatolij Gustschin
1 parent a032e0a6ae

misc: docs: Fix comments in misc.h

The comments in misc.h are not in kernel-doc format. Correct the format.

Signed-off-by: Mario Six <mario.six@gdsys.cc>

Showing 1 changed file with 44 additions and 40 deletions Side-by-side Diff

... ... @@ -6,38 +6,47 @@
6 6 #ifndef _MISC_H_
7 7 #define _MISC_H_
8 8  
9   -/*
10   - * Read the device to buffer, optional.
11   - *
  9 +/**
  10 + * misc_read() - Read the device to buffer, optional.
12 11 * @dev: the device
13 12 * @offset: offset to read the device
14 13 * @buf: pointer to data buffer
15 14 * @size: data size in bytes to read the device
16   - * @return: 0 if OK, -ve on error
  15 + *
  16 + * Return: 0 if OK, -ve on error
17 17 */
18 18 int misc_read(struct udevice *dev, int offset, void *buf, int size);
19   -/*
20   - * Write buffer to the device, optional.
21   - *
  19 +
  20 +/**
  21 + * misc_write() - Write buffer to the device, optional.
22 22 * @dev: the device
23 23 * @offset: offset to write the device
24 24 * @buf: pointer to data buffer
25 25 * @size: data size in bytes to write the device
26   - * @return: 0 if OK, -ve on error
  26 + *
  27 + * Return: 0 if OK, -ve on error
27 28 */
28 29 int misc_write(struct udevice *dev, int offset, void *buf, int size);
29   -/*
30   - * Assert command to the device, optional.
31   - *
  30 +
  31 +/**
  32 + * misc_ioctl() - Assert command to the device, optional.
32 33 * @dev: the device
33 34 * @request: command to be sent to the device
34 35 * @buf: pointer to buffer related to the request
35   - * @return: 0 if OK, -ve on error
  36 + *
  37 + * Return: 0 if OK, -ve on error
36 38 */
37 39 int misc_ioctl(struct udevice *dev, unsigned long request, void *buf);
38 40  
39   -/*
40   - * Send a message to the device and wait for a response.
  41 +/**
  42 + * misc_call() - Send a message to the device and wait for a response.
  43 + * @dev: the device.
  44 + * @msgid: the message ID/number to send.
  45 + * @tx_msg: the request/transmit message payload.
  46 + * @tx_size: the size of the buffer pointed at by tx_msg.
  47 + * @rx_msg: the buffer to receive the response message payload. May be NULL if
  48 + * the caller only cares about the error code.
  49 + * @rx_size: the size of the buffer pointed at by rx_msg.
41 50 *
42 51 * The caller provides the message type/ID and payload to be sent.
43 52 * The callee constructs any message header required, transmits it to the
44 53  
45 54  
46 55  
47 56  
48 57  
49 58  
50 59  
51 60  
52 61  
53 62  
54 63  
55 64  
56 65  
... ... @@ -45,66 +54,61 @@
45 54 * strips any message header from the response, and returns the error code
46 55 * (or a parsed version of it) and the response message payload.
47 56 *
48   - * @dev: the device.
49   - * @msgid: the message ID/number to send.
50   - * tx_msg: the request/transmit message payload.
51   - * tx_size: the size of the buffer pointed at by tx_msg.
52   - * rx_msg: the buffer to receive the response message payload. May be NULL if
53   - * the caller only cares about the error code.
54   - * rx_size: the size of the buffer pointed at by rx_msg.
55   - * @return the response message size if OK, -ve on error
  57 + * Return: the response message size if OK, -ve on error
56 58 */
57 59 int misc_call(struct udevice *dev, int msgid, void *tx_msg, int tx_size,
58 60 void *rx_msg, int rx_size);
59 61  
60   -/*
  62 +/**
61 63 * struct misc_ops - Driver model Misc operations
62 64 *
63 65 * The uclass interface is implemented by all miscellaneous devices which
64 66 * use driver model.
65 67 */
66 68 struct misc_ops {
67   - /*
  69 + /**
68 70 * Read the device to buffer, optional.
69   - *
70 71 * @dev: the device
71 72 * @offset: offset to read the device
72 73 * @buf: pointer to data buffer
73 74 * @size: data size in bytes to read the device
74   - * @return: 0 if OK, -ve on error
  75 + *
  76 + * Return: 0 if OK, -ve on error
75 77 */
76 78 int (*read)(struct udevice *dev, int offset, void *buf, int size);
77   - /*
  79 +
  80 + /**
78 81 * Write buffer to the device, optional.
79   - *
80 82 * @dev: the device
81 83 * @offset: offset to write the device
82 84 * @buf: pointer to data buffer
83 85 * @size: data size in bytes to write the device
84   - * @return: 0 if OK, -ve on error
  86 + *
  87 + * Return: 0 if OK, -ve on error
85 88 */
86 89 int (*write)(struct udevice *dev, int offset, const void *buf,
87 90 int size);
88   - /*
  91 + /**
89 92 * Assert command to the device, optional.
90   - *
91 93 * @dev: the device
92 94 * @request: command to be sent to the device
93 95 * @buf: pointer to buffer related to the request
94   - * @return: 0 if OK, -ve on error
  96 + *
  97 + * Return: 0 if OK, -ve on error
95 98 */
96 99 int (*ioctl)(struct udevice *dev, unsigned long request, void *buf);
97   - /*
  100 +
  101 + /**
98 102 * Send a message to the device and wait for a response.
99   - *
100 103 * @dev: the device
101 104 * @msgid: the message ID/number to send
102   - * tx_msg: the request/transmit message payload
103   - * tx_size: the size of the buffer pointed at by tx_msg
104   - * rx_msg: the buffer to receive the response message payload. May be
105   - * NULL if the caller only cares about the error code.
106   - * rx_size: the size of the buffer pointed at by rx_msg
107   - * @return the response message size if OK, -ve on error
  105 + * @tx_msg: the request/transmit message payload
  106 + * @tx_size: the size of the buffer pointed at by tx_msg
  107 + * @rx_msg: the buffer to receive the response message payload. May be
  108 + * NULL if the caller only cares about the error code.
  109 + * @rx_size: the size of the buffer pointed at by rx_msg
  110 + *
  111 + * Return: the response message size if OK, -ve on error
108 112 */
109 113 int (*call)(struct udevice *dev, int msgid, void *tx_msg, int tx_size,
110 114 void *rx_msg, int rx_size);