[PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller
From: Uwe Kleine-König <hidden>
Date: 2015-01-21 08:20:54
Also in:
linux-devicetree, linux-i2c, lkml
From: Uwe Kleine-König <hidden>
Date: 2015-01-21 08:20:54
Also in:
linux-devicetree, linux-i2c, lkml
Hello, On Wed, Jan 21, 2015 at 11:13:24AM +0800, Eddie Huang wrote:
quoted
quoted
+ /* set when doing the transfer */ + u16 irq_stat; /* interrupt status */ + unsigned int speed_hz; /* The speed in transfer */ + bool trans_stop; /* i2c transfer stop */ + enum mtk_trans_op op; + u16 msg_len; + u8 *msg_buf; /* pointer to msg data */ + u16 msg_aux_len; /* WRRD mode to set AUX_LEN register*/ + u16 addr; /* 7bit slave address, without read/write bit */Wouldn't it be easier to maintain a pointer to the message to be transferred?I think use mtk_i2c pointer is more flexible than maintain a pointer to message.
Not sure you understood what I intended to suggest. My idea was to drop u16 msg_len; u8 *msg_buf; u16 msg_aux_len; // maybe u16 addr; from struct mtk_i2c and add a struct i2c_msg *msg instead. Up to you to decide. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |