Skip to content

Commit 0582d98

Browse files
rddunlapwsakernel
authored andcommitted
i2c: rk3x: fix a bunch of kernel-doc warnings
Fix multiple W=1 kernel-doc warnings in i2c-rk3x.c: drivers/i2c/busses/i2c-rk3x.c:83: warning: missing initial short description on line: * struct i2c_spec_values: drivers/i2c/busses/i2c-rk3x.c:139: warning: missing initial short description on line: * struct rk3x_i2c_calced_timings: drivers/i2c/busses/i2c-rk3x.c:162: warning: missing initial short description on line: * struct rk3x_i2c_soc_data: drivers/i2c/busses/i2c-rk3x.c:242: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Generate a START condition, which triggers a REG_INT_START interrupt. drivers/i2c/busses/i2c-rk3x.c:261: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Generate a STOP condition, which triggers a REG_INT_STOP interrupt. drivers/i2c/busses/i2c-rk3x.c:304: warning: expecting prototype for Setup a read according to i2c(). Prototype was for rk3x_i2c_prepare_read() instead drivers/i2c/busses/i2c-rk3x.c:335: warning: expecting prototype for Fill the transmit buffer with data from i2c(). Prototype was for rk3x_i2c_fill_transmit_buf() instead drivers/i2c/busses/i2c-rk3x.c:535: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Get timing values of I2C specification drivers/i2c/busses/i2c-rk3x.c:552: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Calculate divider values for desired SCL frequency drivers/i2c/busses/i2c-rk3x.c:713: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Calculate timing values for desired SCL frequency drivers/i2c/busses/i2c-rk3x.c:963: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Setup I2C registers for an I2C operation specified by msgs, num. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent e49560f commit 0582d98

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

drivers/i2c/busses/i2c-rk3x.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ enum {
8080
#define DEFAULT_SCL_RATE (100 * 1000) /* Hz */
8181

8282
/**
83-
* struct i2c_spec_values:
83+
* struct i2c_spec_values - I2C specification values for various modes
8484
* @min_hold_start_ns: min hold time (repeated) START condition
8585
* @min_low_ns: min LOW period of the SCL clock
8686
* @min_high_ns: min HIGH period of the SCL cloc
@@ -136,7 +136,7 @@ static const struct i2c_spec_values fast_mode_plus_spec = {
136136
};
137137

138138
/**
139-
* struct rk3x_i2c_calced_timings:
139+
* struct rk3x_i2c_calced_timings - calculated V1 timings
140140
* @div_low: Divider output for low
141141
* @div_high: Divider output for high
142142
* @tuning: Used to adjust setup/hold data time,
@@ -159,7 +159,7 @@ enum rk3x_i2c_state {
159159
};
160160

161161
/**
162-
* struct rk3x_i2c_soc_data:
162+
* struct rk3x_i2c_soc_data - SOC-specific data
163163
* @grf_offset: offset inside the grf regmap for setting the i2c type
164164
* @calc_timings: Callback function for i2c timing information calculated
165165
*/
@@ -239,7 +239,8 @@ static inline void rk3x_i2c_clean_ipd(struct rk3x_i2c *i2c)
239239
}
240240

241241
/**
242-
* Generate a START condition, which triggers a REG_INT_START interrupt.
242+
* rk3x_i2c_start - Generate a START condition, which triggers a REG_INT_START interrupt.
243+
* @i2c: target controller data
243244
*/
244245
static void rk3x_i2c_start(struct rk3x_i2c *i2c)
245246
{
@@ -258,8 +259,8 @@ static void rk3x_i2c_start(struct rk3x_i2c *i2c)
258259
}
259260

260261
/**
261-
* Generate a STOP condition, which triggers a REG_INT_STOP interrupt.
262-
*
262+
* rk3x_i2c_stop - Generate a STOP condition, which triggers a REG_INT_STOP interrupt.
263+
* @i2c: target controller data
263264
* @error: Error code to return in rk3x_i2c_xfer
264265
*/
265266
static void rk3x_i2c_stop(struct rk3x_i2c *i2c, int error)
@@ -298,7 +299,8 @@ static void rk3x_i2c_stop(struct rk3x_i2c *i2c, int error)
298299
}
299300

300301
/**
301-
* Setup a read according to i2c->msg
302+
* rk3x_i2c_prepare_read - Setup a read according to i2c->msg
303+
* @i2c: target controller data
302304
*/
303305
static void rk3x_i2c_prepare_read(struct rk3x_i2c *i2c)
304306
{
@@ -329,7 +331,8 @@ static void rk3x_i2c_prepare_read(struct rk3x_i2c *i2c)
329331
}
330332

331333
/**
332-
* Fill the transmit buffer with data from i2c->msg
334+
* rk3x_i2c_fill_transmit_buf - Fill the transmit buffer with data from i2c->msg
335+
* @i2c: target controller data
333336
*/
334337
static void rk3x_i2c_fill_transmit_buf(struct rk3x_i2c *i2c)
335338
{
@@ -532,11 +535,10 @@ static irqreturn_t rk3x_i2c_irq(int irqno, void *dev_id)
532535
}
533536

534537
/**
535-
* Get timing values of I2C specification
536-
*
538+
* rk3x_i2c_get_spec - Get timing values of I2C specification
537539
* @speed: Desired SCL frequency
538540
*
539-
* Returns: Matched i2c spec values.
541+
* Return: Matched i2c_spec_values.
540542
*/
541543
static const struct i2c_spec_values *rk3x_i2c_get_spec(unsigned int speed)
542544
{
@@ -549,13 +551,12 @@ static const struct i2c_spec_values *rk3x_i2c_get_spec(unsigned int speed)
549551
}
550552

551553
/**
552-
* Calculate divider values for desired SCL frequency
553-
*
554+
* rk3x_i2c_v0_calc_timings - Calculate divider values for desired SCL frequency
554555
* @clk_rate: I2C input clock rate
555556
* @t: Known I2C timing information
556557
* @t_calc: Caculated rk3x private timings that would be written into regs
557558
*
558-
* Returns: 0 on success, -EINVAL if the goal SCL rate is too slow. In that case
559+
* Return: %0 on success, -%EINVAL if the goal SCL rate is too slow. In that case
559560
* a best-effort divider value is returned in divs. If the target rate is
560561
* too high, we silently use the highest possible rate.
561562
*/
@@ -710,13 +711,12 @@ static int rk3x_i2c_v0_calc_timings(unsigned long clk_rate,
710711
}
711712

712713
/**
713-
* Calculate timing values for desired SCL frequency
714-
*
714+
* rk3x_i2c_v1_calc_timings - Calculate timing values for desired SCL frequency
715715
* @clk_rate: I2C input clock rate
716716
* @t: Known I2C timing information
717717
* @t_calc: Caculated rk3x private timings that would be written into regs
718718
*
719-
* Returns: 0 on success, -EINVAL if the goal SCL rate is too slow. In that case
719+
* Return: %0 on success, -%EINVAL if the goal SCL rate is too slow. In that case
720720
* a best-effort divider value is returned in divs. If the target rate is
721721
* too high, we silently use the highest possible rate.
722722
* The following formulas are v1's method to calculate timings.
@@ -960,14 +960,14 @@ static int rk3x_i2c_clk_notifier_cb(struct notifier_block *nb, unsigned long
960960
}
961961

962962
/**
963-
* Setup I2C registers for an I2C operation specified by msgs, num.
964-
*
965-
* Must be called with i2c->lock held.
966-
*
963+
* rk3x_i2c_setup - Setup I2C registers for an I2C operation specified by msgs, num.
964+
* @i2c: target controller data
967965
* @msgs: I2C msgs to process
968966
* @num: Number of msgs
969967
*
970-
* returns: Number of I2C msgs processed or negative in case of error
968+
* Must be called with i2c->lock held.
969+
*
970+
* Return: Number of I2C msgs processed or negative in case of error
971971
*/
972972
static int rk3x_i2c_setup(struct rk3x_i2c *i2c, struct i2c_msg *msgs, int num)
973973
{

0 commit comments

Comments
 (0)