Skip to content

Commit 5627f15

Browse files
Wolfram SangAndi Shyti
authored andcommitted
i2c: sprd: reword according to newest specification
Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
1 parent c405861 commit 5627f15

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/i2c/busses/i2c-sprd.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ static int sprd_i2c_handle_msg(struct i2c_adapter *i2c_adap,
283283
return i2c_dev->err;
284284
}
285285

286-
static int sprd_i2c_master_xfer(struct i2c_adapter *i2c_adap,
287-
struct i2c_msg *msgs, int num)
286+
static int sprd_i2c_xfer(struct i2c_adapter *i2c_adap,
287+
struct i2c_msg *msgs, int num)
288288
{
289289
struct sprd_i2c *i2c_dev = i2c_adap->algo_data;
290290
int im, ret;
@@ -314,7 +314,7 @@ static u32 sprd_i2c_func(struct i2c_adapter *adap)
314314
}
315315

316316
static const struct i2c_algorithm sprd_i2c_algo = {
317-
.master_xfer = sprd_i2c_master_xfer,
317+
.xfer = sprd_i2c_xfer,
318318
.functionality = sprd_i2c_func,
319319
};
320320

@@ -378,12 +378,12 @@ static irqreturn_t sprd_i2c_isr_thread(int irq, void *dev_id)
378378
i2c_tran = i2c_dev->count;
379379

380380
/*
381-
* If we got one ACK from slave when writing data, and we did not
381+
* If we got one ACK from target when writing data, and we did not
382382
* finish this transmission (i2c_tran is not zero), then we should
383383
* continue to write data.
384384
*
385385
* For reading data, ack is always true, if i2c_tran is not 0 which
386-
* means we still need to contine to read data from slave.
386+
* means we still need to contine to read data from target.
387387
*/
388388
if (i2c_tran && ack) {
389389
sprd_i2c_data_transfer(i2c_dev);
@@ -393,7 +393,7 @@ static irqreturn_t sprd_i2c_isr_thread(int irq, void *dev_id)
393393
i2c_dev->err = 0;
394394

395395
/*
396-
* If we did not get one ACK from slave when writing data, we should
396+
* If we did not get one ACK from target when writing data, we should
397397
* return -EIO to notify users.
398398
*/
399399
if (!ack)
@@ -422,7 +422,7 @@ static irqreturn_t sprd_i2c_isr(int irq, void *dev_id)
422422
i2c_tran = i2c_dev->count;
423423

424424
/*
425-
* If we did not get one ACK from slave when writing data, then we
425+
* If we did not get one ACK from target when writing data, then we
426426
* should finish this transmission since we got some errors.
427427
*
428428
* When writing data, if i2c_tran == 0 which means we have writen
@@ -653,5 +653,5 @@ static struct platform_driver sprd_i2c_driver = {
653653

654654
module_platform_driver(sprd_i2c_driver);
655655

656-
MODULE_DESCRIPTION("Spreadtrum I2C master controller driver");
656+
MODULE_DESCRIPTION("Spreadtrum I2C controller driver");
657657
MODULE_LICENSE("GPL v2");

0 commit comments

Comments
 (0)