[ERD][NEUS7920-226] [COMMON] i2c: core: Add client data for multi mode slave devices
authorKyungwoo Kang <kwoo.kang@samsung.com>
Tue, 23 Apr 2019 01:31:22 +0000 (10:31 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 30 Aug 2019 07:58:56 +0000 (16:58 +0900)
Change-Id: Ie43d3c5c80281fe542383de9176918a6a0e50d15
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
drivers/i2c/i2c-core-base.c
include/linux/i2c.h
include/uapi/linux/i2c.h

index 9b3907b89705aa5f06ff633f3bb27814e9ab29ef..8b619df54f3df3ccc1e31e61299b3382da94a301 100644 (file)
@@ -1979,6 +1979,7 @@ int i2c_master_send(const struct i2c_client *client, const char *buf, int count)
        msg.flags = client->flags & I2C_M_TEN;
        msg.len = count;
        msg.buf = (char *)buf;
+       msg.freq = client->frequency;
 
        ret = i2c_transfer(adap, &msg, 1);
 
index 16a1635f2f6827ce813fce24b0a107c5c6ff73f9..9a6e6f157b5dcc23b3f2da9dc7f4bbd4feea32aa 100644 (file)
@@ -239,6 +239,7 @@ struct i2c_driver {
  * managing the device.
  */
 struct i2c_client {
+       unsigned int frequency;
        unsigned short flags;           /* div., see below              */
        unsigned short addr;            /* chip address - NOTE: 7bit    */
                                        /* addresses are stored in the  */
index fe648032d6b9ff2eb8b60a549c80a7814c776619..dfbc8bf02134b76791a8285d7f0ebdb655a9f2b0 100644 (file)
@@ -80,6 +80,7 @@ struct i2c_msg {
 #define I2C_M_STOP             0x8000  /* if I2C_FUNC_PROTOCOL_MANGLING */
        __u16 len;              /* msg length                           */
        __u8 *buf;              /* pointer to msg data                  */
+       unsigned int freq;
 };
 
 /* To determine what functionality is present */