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 */
244245static 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 */
265266static 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 */
303305static 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 */
334337static 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 */
541543static 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 */
972972static int rk3x_i2c_setup (struct rk3x_i2c * i2c , struct i2c_msg * msgs , int num )
973973{
0 commit comments