aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorJan Glauber <jglauber@cavium.com>2016-03-07 10:10:44 -0500
committerWolfram Sang <wsa@the-dreams.de>2016-03-12 10:58:30 -0500
commitbd7784c2d12f5af03c05abee051a73cca3a0fd1d (patch)
tree226f32fb81c605a4c7d89a2ce3227407812ac8bb /drivers/i2c/busses
parent95026658c46ea2d94498d0dac1282e28cd47c64a (diff)
i2c: octeon: Cleanup kerneldoc comments
Remove point after parameter description and replace kerneldoc by a comment if it has no additional no value. Signed-off-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-octeon.c89
1 files changed, 39 insertions, 50 deletions
diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
index 32914ab42a19..4a08418a2ab1 100644
--- a/drivers/i2c/busses/i2c-octeon.c
+++ b/drivers/i2c/busses/i2c-octeon.c
@@ -73,10 +73,10 @@ struct octeon_i2c {
73}; 73};
74 74
75/** 75/**
76 * octeon_i2c_write_sw - write an I2C core register. 76 * octeon_i2c_write_sw - write an I2C core register
77 * @i2c: The struct octeon_i2c. 77 * @i2c: The struct octeon_i2c
78 * @eop_reg: Register selector. 78 * @eop_reg: Register selector
79 * @data: Value to be written. 79 * @data: Value to be written
80 * 80 *
81 * The I2C core registers are accessed indirectly via the SW_TWSI CSR. 81 * The I2C core registers are accessed indirectly via the SW_TWSI CSR.
82 */ 82 */
@@ -93,9 +93,9 @@ static void octeon_i2c_write_sw(struct octeon_i2c *i2c,
93} 93}
94 94
95/** 95/**
96 * octeon_i2c_read_sw - write an I2C core register. 96 * octeon_i2c_read_sw - write an I2C core register
97 * @i2c: The struct octeon_i2c. 97 * @i2c: The struct octeon_i2c
98 * @eop_reg: Register selector. 98 * @eop_reg: Register selector
99 * 99 *
100 * Returns the data. 100 * Returns the data.
101 * 101 *
@@ -115,8 +115,8 @@ static u8 octeon_i2c_read_sw(struct octeon_i2c *i2c, u64 eop_reg)
115 115
116/** 116/**
117 * octeon_i2c_write_int - write the TWSI_INT register 117 * octeon_i2c_write_int - write the TWSI_INT register
118 * @i2c: The struct octeon_i2c. 118 * @i2c: The struct octeon_i2c
119 * @data: Value to be written. 119 * @data: Value to be written
120 */ 120 */
121static void octeon_i2c_write_int(struct octeon_i2c *i2c, u64 data) 121static void octeon_i2c_write_int(struct octeon_i2c *i2c, u64 data)
122{ 122{
@@ -125,8 +125,8 @@ static void octeon_i2c_write_int(struct octeon_i2c *i2c, u64 data)
125} 125}
126 126
127/** 127/**
128 * octeon_i2c_int_enable - enable the TS interrupt. 128 * octeon_i2c_int_enable - enable the CORE interrupt
129 * @i2c: The struct octeon_i2c. 129 * @i2c: The struct octeon_i2c
130 * 130 *
131 * The interrupt will be asserted when there is non-STAT_IDLE state in 131 * The interrupt will be asserted when there is non-STAT_IDLE state in
132 * the SW_TWSI_EOP_TWSI_STAT register. 132 * the SW_TWSI_EOP_TWSI_STAT register.
@@ -136,22 +136,18 @@ static void octeon_i2c_int_enable(struct octeon_i2c *i2c)
136 octeon_i2c_write_int(i2c, 0x40); 136 octeon_i2c_write_int(i2c, 0x40);
137} 137}
138 138
139/** 139/* disable the CORE interrupt */
140 * octeon_i2c_int_disable - disable the TS interrupt.
141 * @i2c: The struct octeon_i2c.
142 */
143static void octeon_i2c_int_disable(struct octeon_i2c *i2c) 140static void octeon_i2c_int_disable(struct octeon_i2c *i2c)
144{ 141{
145 octeon_i2c_write_int(i2c, 0); 142 octeon_i2c_write_int(i2c, 0);
146} 143}
147 144
148/** 145/**
149 * octeon_i2c_unblock - unblock the bus. 146 * octeon_i2c_unblock - unblock the bus
150 * @i2c: The struct octeon_i2c. 147 * @i2c: The struct octeon_i2c
151 * 148 *
152 * If there was a reset while a device was driving 0 to bus, 149 * If there was a reset while a device was driving 0 to bus, bus is blocked.
153 * bus is blocked. We toggle it free manually by some clock 150 * We toggle it free manually by some clock cycles and send a stop.
154 * cycles and send a stop.
155 */ 151 */
156static void octeon_i2c_unblock(struct octeon_i2c *i2c) 152static void octeon_i2c_unblock(struct octeon_i2c *i2c)
157{ 153{
@@ -171,11 +167,7 @@ static void octeon_i2c_unblock(struct octeon_i2c *i2c)
171 octeon_i2c_write_int(i2c, 0x0); 167 octeon_i2c_write_int(i2c, 0x0);
172} 168}
173 169
174/** 170/* interrupt service routine */
175 * octeon_i2c_isr - the interrupt service routine.
176 * @int: The irq, unused.
177 * @dev_id: Our struct octeon_i2c.
178 */
179static irqreturn_t octeon_i2c_isr(int irq, void *dev_id) 171static irqreturn_t octeon_i2c_isr(int irq, void *dev_id)
180{ 172{
181 struct octeon_i2c *i2c = dev_id; 173 struct octeon_i2c *i2c = dev_id;
@@ -193,8 +185,8 @@ static int octeon_i2c_test_iflg(struct octeon_i2c *i2c)
193} 185}
194 186
195/** 187/**
196 * octeon_i2c_wait - wait for the IFLG to be set. 188 * octeon_i2c_wait - wait for the IFLG to be set
197 * @i2c: The struct octeon_i2c. 189 * @i2c: The struct octeon_i2c
198 * 190 *
199 * Returns 0 on success, otherwise a negative errno. 191 * Returns 0 on success, otherwise a negative errno.
200 */ 192 */
@@ -219,8 +211,8 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
219} 211}
220 212
221/** 213/**
222 * octeon_i2c_start - send START to the bus. 214 * octeon_i2c_start - send START to the bus
223 * @i2c: The struct octeon_i2c. 215 * @i2c: The struct octeon_i2c
224 * 216 *
225 * Returns 0 on success, otherwise a negative errno. 217 * Returns 0 on success, otherwise a negative errno.
226 */ 218 */
@@ -260,8 +252,8 @@ static int octeon_i2c_start(struct octeon_i2c *i2c)
260} 252}
261 253
262/** 254/**
263 * octeon_i2c_stop - send STOP to the bus. 255 * octeon_i2c_stop - send STOP to the bus
264 * @i2c: The struct octeon_i2c. 256 * @i2c: The struct octeon_i2c
265 * 257 *
266 * Returns 0 on success, otherwise a negative errno. 258 * Returns 0 on success, otherwise a negative errno.
267 */ 259 */
@@ -282,11 +274,11 @@ static int octeon_i2c_stop(struct octeon_i2c *i2c)
282} 274}
283 275
284/** 276/**
285 * octeon_i2c_write - send data to the bus. 277 * octeon_i2c_write - send data to the bus via low-level controller
286 * @i2c: The struct octeon_i2c. 278 * @i2c: The struct octeon_i2c
287 * @target: Target address. 279 * @target: Target address
288 * @data: Pointer to the data to be sent. 280 * @data: Pointer to the data to be sent
289 * @length: Length of the data. 281 * @length: Length of the data
290 * 282 *
291 * The address is sent over the bus, then the data. 283 * The address is sent over the bus, then the data.
292 * 284 *
@@ -330,11 +322,11 @@ static int octeon_i2c_write(struct octeon_i2c *i2c, int target,
330} 322}
331 323
332/** 324/**
333 * octeon_i2c_read - receive data from the bus. 325 * octeon_i2c_read - receive data from the bus via low-level controller
334 * @i2c: The struct octeon_i2c. 326 * @i2c: The struct octeon_i2c
335 * @target: Target address. 327 * @target: Target address
336 * @data: Pointer to the location to store the datae . 328 * @data: Pointer to the location to store the data
337 * @length: Length of the data. 329 * @length: Length of the data
338 * 330 *
339 * The address is sent over the bus, then the data is read. 331 * The address is sent over the bus, then the data is read.
340 * 332 *
@@ -386,13 +378,12 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target,
386} 378}
387 379
388/** 380/**
389 * octeon_i2c_xfer - The driver's master_xfer function. 381 * octeon_i2c_xfer - The driver's master_xfer function
390 * @adap: Pointer to the i2c_adapter structure. 382 * @adap: Pointer to the i2c_adapter structure
391 * @msgs: Pointer to the messages to be processed. 383 * @msgs: Pointer to the messages to be processed
392 * @num: Length of the MSGS array. 384 * @num: Length of the MSGS array
393 * 385 *
394 * Returns the number of messages processed, or a negative errno on 386 * Returns the number of messages processed, or a negative errno on failure.
395 * failure.
396 */ 387 */
397static int octeon_i2c_xfer(struct i2c_adapter *adap, 388static int octeon_i2c_xfer(struct i2c_adapter *adap,
398 struct i2c_msg *msgs, 389 struct i2c_msg *msgs,
@@ -438,9 +429,7 @@ static struct i2c_adapter octeon_i2c_ops = {
438 .timeout = HZ / 50, 429 .timeout = HZ / 50,
439}; 430};
440 431
441/** 432/* calculate and set clock divisors */
442 * octeon_i2c_setclock - Calculate and set clock divisors.
443 */
444static int octeon_i2c_setclock(struct octeon_i2c *i2c) 433static int octeon_i2c_setclock(struct octeon_i2c *i2c)
445{ 434{
446 int tclk, thp_base, inc, thp_idx, mdiv_idx, ndiv_idx, foscl, diff; 435 int tclk, thp_base, inc, thp_idx, mdiv_idx, ndiv_idx, foscl, diff;