@@ -94,6 +94,7 @@ static inline u32 mei_hcsr_read(const struct mei_me_hw *hw)
9494 * and ignores the H_IS bit for it is write-one-to-zero.
9595 *
9696 * @hw: the me hardware structure
97+ * @hcsr: new register value
9798 */
9899static inline void mei_hcsr_set (struct mei_me_hw * hw , u32 hcsr )
99100{
@@ -106,6 +107,8 @@ static inline void mei_hcsr_set(struct mei_me_hw *hw, u32 hcsr)
106107 *
107108 * @dev: mei device
108109 * @fw_status: fw status register values
110+ *
111+ * Return: 0 on success, error otherwise
109112 */
110113static int mei_me_fw_status (struct mei_device * dev ,
111114 struct mei_fw_status * fw_status )
@@ -149,8 +152,9 @@ static void mei_me_hw_config(struct mei_device *dev)
149152 * mei_me_pg_state - translate internal pg state
150153 * to the mei power gating state
151154 *
152- * @hw - me hardware
153- * returns: MEI_PG_OFF if aliveness is on and MEI_PG_ON otherwise
155+ * @dev: mei device
156+ *
157+ * Return: MEI_PG_OFF if aliveness is on and MEI_PG_ON otherwise
154158 */
155159static inline enum mei_pg_state mei_me_pg_state (struct mei_device * dev )
156160{
@@ -160,7 +164,7 @@ static inline enum mei_pg_state mei_me_pg_state(struct mei_device *dev)
160164}
161165
162166/**
163- * mei_clear_interrupts - clear and stop interrupts
167+ * mei_me_intr_clear - clear and stop interrupts
164168 *
165169 * @dev: the device structure
166170 */
@@ -187,7 +191,7 @@ static void mei_me_intr_enable(struct mei_device *dev)
187191}
188192
189193/**
190- * mei_disable_interrupts - disables mei device interrupts
194+ * mei_me_intr_disable - disables mei device interrupts
191195 *
192196 * @dev: the device structure
193197 */
@@ -222,6 +226,8 @@ static void mei_me_hw_reset_release(struct mei_device *dev)
222226 *
223227 * @dev: the device structure
224228 * @intr_enable: if interrupt should be enabled after reset.
229+ *
230+ * Return: always 0
225231 */
226232static int mei_me_hw_reset (struct mei_device * dev , bool intr_enable )
227233{
@@ -259,10 +265,8 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
259265/**
260266 * mei_me_host_set_ready - enable device
261267 *
262- * @dev - mei device
263- * returns bool
268+ * @dev: mei device
264269 */
265-
266270static void mei_me_host_set_ready (struct mei_device * dev )
267271{
268272 struct mei_me_hw * hw = to_me_hw (dev );
@@ -271,6 +275,7 @@ static void mei_me_host_set_ready(struct mei_device *dev)
271275 hw -> host_hw_state |= H_IE | H_IG | H_RDY ;
272276 mei_hcsr_set (hw , hw -> host_hw_state );
273277}
278+
274279/**
275280 * mei_me_host_is_ready - check whether the host has turned ready
276281 *
@@ -299,6 +304,13 @@ static bool mei_me_hw_is_ready(struct mei_device *dev)
299304 return (hw -> me_hw_state & ME_RDY_HRA ) == ME_RDY_HRA ;
300305}
301306
307+ /**
308+ * mei_me_hw_ready_wait - wait until the me(hw) has turned ready
309+ * or timeout is reached
310+ *
311+ * @dev: mei device
312+ * Return: 0 on success, error otherwise
313+ */
302314static int mei_me_hw_ready_wait (struct mei_device * dev )
303315{
304316 mutex_unlock (& dev -> device_lock );
@@ -315,6 +327,12 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)
315327 return 0 ;
316328}
317329
330+ /**
331+ * mei_me_hw_start - hw start routine
332+ *
333+ * @dev: mei device
334+ * Return: 0 on success, error otherwise
335+ */
318336static int mei_me_hw_start (struct mei_device * dev )
319337{
320338 int ret = mei_me_hw_ready_wait (dev );
@@ -381,6 +399,13 @@ static int mei_me_hbuf_empty_slots(struct mei_device *dev)
381399 return empty_slots ;
382400}
383401
402+ /**
403+ * mei_me_hbuf_max_len - returns size of hw buffer.
404+ *
405+ * @dev: the device structure
406+ *
407+ * Return: size of hw buffer in bytes
408+ */
384409static size_t mei_me_hbuf_max_len (const struct mei_device * dev )
385410{
386411 return dev -> hbuf_depth * sizeof (u32 ) - sizeof (struct mei_msg_hdr );
@@ -472,6 +497,8 @@ static int mei_me_count_full_read_slots(struct mei_device *dev)
472497 * @dev: the device structure
473498 * @buffer: message buffer will be written
474499 * @buffer_length: message size will be read
500+ *
501+ * Return: always 0
475502 */
476503static int mei_me_read_slots (struct mei_device * dev , unsigned char * buffer ,
477504 unsigned long buffer_length )
0 commit comments