i2c: Clean up <linux/i2c.h>
Fix most checkpatch.pl errors and warnings. This includes replacing spaces with tabs in many places, adding and removing spaces, and folding long lines. Also complete a couple prototypes to make it clearer what the parameters represent. Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
@@ -53,13 +53,14 @@ struct i2c_board_info;
|
||||
* transmit one message at a time, a more complex version can be used to
|
||||
* transmit an arbitrary number of messages without interruption.
|
||||
*/
|
||||
extern int i2c_master_send(struct i2c_client *,const char* ,int);
|
||||
extern int i2c_master_recv(struct i2c_client *,char* ,int);
|
||||
extern int i2c_master_send(struct i2c_client *client, const char *buf,
|
||||
int count);
|
||||
extern int i2c_master_recv(struct i2c_client *client, char *buf, int count);
|
||||
|
||||
/* Transfer num messages.
|
||||
*/
|
||||
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
|
||||
|
||||
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
||||
int num);
|
||||
|
||||
/* This is the very generalized SMBus access routine. You probably do not
|
||||
want to use this, though; one of the functions below may be much easier,
|
||||
@@ -67,9 +68,8 @@ extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
|
||||
Note that we use i2c_adapter here, because you do not need a specific
|
||||
smbus adapter to call this function. */
|
||||
extern s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
|
||||
unsigned short flags,
|
||||
char read_write, u8 command, int size,
|
||||
union i2c_smbus_data * data);
|
||||
unsigned short flags, char read_write, u8 command,
|
||||
int size, union i2c_smbus_data *data);
|
||||
|
||||
/* Now follow the 'nice' access routines. These also document the calling
|
||||
conventions of i2c_smbus_xfer. */
|
||||
@@ -86,8 +86,7 @@ extern s32 i2c_smbus_write_word_data(struct i2c_client * client,
|
||||
extern s32 i2c_smbus_read_block_data(struct i2c_client *client,
|
||||
u8 command, u8 *values);
|
||||
extern s32 i2c_smbus_write_block_data(struct i2c_client *client,
|
||||
u8 command, u8 length,
|
||||
const u8 *values);
|
||||
u8 command, u8 length, const u8 *values);
|
||||
/* Returns the number of read bytes */
|
||||
extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client,
|
||||
u8 command, u8 length, u8 *values);
|
||||
@@ -306,10 +305,12 @@ extern void i2c_unregister_device(struct i2c_client *);
|
||||
*/
|
||||
#ifdef CONFIG_I2C_BOARDINFO
|
||||
extern int
|
||||
i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n);
|
||||
i2c_register_board_info(int busnum, struct i2c_board_info const *info,
|
||||
unsigned n);
|
||||
#else
|
||||
static inline int
|
||||
i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n)
|
||||
i2c_register_board_info(int busnum, struct i2c_board_info const *info,
|
||||
unsigned n)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -465,7 +466,7 @@ static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func)
|
||||
return (func & i2c_get_functionality(adap)) == func;
|
||||
}
|
||||
|
||||
/* Return id number for a specific adapter */
|
||||
/* Return the adapter number for a specific adapter */
|
||||
static inline int i2c_adapter_id(struct i2c_adapter *adap)
|
||||
{
|
||||
return adap->nr;
|
||||
@@ -526,7 +527,7 @@ struct i2c_msg {
|
||||
|
||||
#define I2C_FUNC_I2C 0x00000001
|
||||
#define I2C_FUNC_10BIT_ADDR 0x00000002
|
||||
#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */
|
||||
#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_NOSTART etc. */
|
||||
#define I2C_FUNC_SMBUS_PEC 0x00000008
|
||||
#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */
|
||||
#define I2C_FUNC_SMBUS_QUICK 0x00010000
|
||||
|
Reference in New Issue
Block a user