History

Revert "Merge branch 'mctp-i2c-driver'"

This reverts commit 71812af7234f30362b43ccff33f93890ae4c0655, reversing changes made to cc0be1ad686fb29a4d127948486f40b17fb34b50. Wolfram Sang says: Please revert. Besides the driver in net, it modifies the I2C core code. This has not been acked by the I2C maintainer (in this case me). So, please don't pull this in via the net tree. The question raised here (extending SMBus calls to 255 byte) is complicated because we need ABI backwards compatibility.

Jakub Kicinski committed 4 years ago

Commit 2f6a4701 parent 6d3b1b012 files · +25 −1209Browse files

Showing the changes to include/uapi (2 of 12 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/i2c-dev.h +0 −2
  2. include/uapi/linux/i2c.h +1 −6
include/uapi/linux/i2c-dev.h+0−2
@@ -39,14 +39,12 @@ · 38 unmodified lines
39 39
40 40
41/* This is the structure as used in the I2C_SMBUS ioctl call */41/* This is the structure as used in the I2C_SMBUS ioctl call */
42#ifndef __KERNEL__
43struct i2c_smbus_ioctl_data {42struct i2c_smbus_ioctl_data {
44 __u8 read_write;43 __u8 read_write;
45 __u8 command;44 __u8 command;
46 __u32 size;45 __u32 size;
47 union i2c_smbus_data __user *data;46 union i2c_smbus_data __user *data;
48};47};
49#endif
50 48
51/* This is the structure as used in the I2C_RDWR ioctl call */49/* This is the structure as used in the I2C_RDWR ioctl call */
52struct i2c_rdwr_ioctl_data {50struct i2c_rdwr_ioctl_data {
include/uapi/linux/i2c.h+1−6
@@ -108,9 +108,6 @@ struct i2c_msg { · 107 unmodified lines
108#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */108#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */
109#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */109#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
110#define I2C_FUNC_SMBUS_HOST_NOTIFY 0x10000000 /* SMBus 2.0 or later */110#define I2C_FUNC_SMBUS_HOST_NOTIFY 0x10000000 /* SMBus 2.0 or later */
111#define I2C_FUNC_SMBUS_V3_BLOCK 0x20000000 /* Device supports 255 byte block */
112 /* Note that I2C_SMBUS ioctl only */
113 /* supports a 32 byte block */
114 111
115#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \112#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
116 I2C_FUNC_SMBUS_WRITE_BYTE)113 I2C_FUNC_SMBUS_WRITE_BYTE)
@@ -140,15 +137,13 @@ struct i2c_msg { · 23 unmodified lines
140/*137/*
141 * Data for SMBus Messages138 * Data for SMBus Messages
142 */139 */
143#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus 2.0 standard */140#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */
144#ifndef __KERNEL__
145union i2c_smbus_data {141union i2c_smbus_data {
146 __u8 byte;142 __u8 byte;
147 __u16 word;143 __u16 word;
148 __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */144 __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */
149 /* and one more for user-space compatibility */145 /* and one more for user-space compatibility */
150};146};
151#endif
152 147
153/* i2c_smbus_xfer read or write markers */148/* i2c_smbus_xfer read or write markers */
154#define I2C_SMBUS_READ 1149#define I2C_SMBUS_READ 1