Skip to content

Commit 5d89b5b

Browse files
author
Wolfram Sang
committed
i2c: document new callbacks in i2c_algorithm
When updating the callbacks, adding their kernel-doc was forgotten. Add it now. Reported-by: Stephen Rothwell <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Fixes: a93c2e5 ("i2c: reword i2c_algorithm according to newest specification") Signed-off-by: Wolfram Sang <[email protected]>
1 parent 479f18c commit 5d89b5b

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

include/linux/i2c.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,10 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info,
513513

514514
/**
515515
* struct i2c_algorithm - represent I2C transfer method
516-
* @master_xfer: Issue a set of i2c transactions to the given I2C adapter
516+
* @xfer: Issue a set of i2c transactions to the given I2C adapter
517517
* defined by the msgs array, with num messages available to transfer via
518518
* the adapter specified by adap.
519-
* @master_xfer_atomic: same as @master_xfer. Yet, only using atomic context
519+
* @xfer_atomic: same as @xfer. Yet, only using atomic context
520520
* so e.g. PMICs can be accessed very late before shutdown. Optional.
521521
* @smbus_xfer: Issue smbus transactions to the given I2C adapter. If this
522522
* is not present, then the bus layer will try and convert the SMBus calls
@@ -525,27 +525,33 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info,
525525
* so e.g. PMICs can be accessed very late before shutdown. Optional.
526526
* @functionality: Return the flags that this algorithm/adapter pair supports
527527
* from the ``I2C_FUNC_*`` flags.
528-
* @reg_slave: Register given client to I2C slave mode of this adapter
529-
* @unreg_slave: Unregister given client from I2C slave mode of this adapter
528+
* @reg_target: Register given client to local target mode of this adapter
529+
* @unreg_target: Unregister given client from local target mode of this adapter
530+
*
531+
* @master_xfer: deprecated, use @xfer
532+
* @master_xfer_atomic: deprecated, use @xfer_atomic
533+
* @reg_slave: deprecated, use @reg_target
534+
* @unreg_slave: deprecated, use @unreg_target
535+
*
530536
*
531537
* The following structs are for those who like to implement new bus drivers:
532538
* i2c_algorithm is the interface to a class of hardware solutions which can
533539
* be addressed using the same bus algorithms - i.e. bit-banging or the PCF8584
534540
* to name two of the most common.
535541
*
536-
* The return codes from the ``master_xfer{_atomic}`` fields should indicate the
542+
* The return codes from the ``xfer{_atomic}`` fields should indicate the
537543
* type of error code that occurred during the transfer, as documented in the
538544
* Kernel Documentation file Documentation/i2c/fault-codes.rst. Otherwise, the
539545
* number of messages executed should be returned.
540546
*/
541547
struct i2c_algorithm {
542548
/*
543-
* If an adapter algorithm can't do I2C-level access, set master_xfer
549+
* If an adapter algorithm can't do I2C-level access, set xfer
544550
* to NULL. If an adapter algorithm can do SMBus access, set
545551
* smbus_xfer. If set to NULL, the SMBus protocol is simulated
546552
* using common I2C messages.
547553
*
548-
* master_xfer should return the number of messages successfully
554+
* xfer should return the number of messages successfully
549555
* processed, or a negative value on error
550556
*/
551557
union {

0 commit comments

Comments
 (0)