Re: [PATCH v6 4/9] i2c: refactor i2c_master_{send_recv}

2017-11-10 Thread Jonathan Cameron
On Sat, 4 Nov 2017 21:20:04 +0100 Wolfram Sang wrote: > Those two functions are very similar, the only differences are that one > needs the I2C_M_RD flag for its message while the other one needs the > buffer casted to drop the const. Introduce a generic helper

Re: [PATCH v6 4/9] i2c: refactor i2c_master_{send_recv}

2017-11-10 Thread Jonathan Cameron
On Sat, 4 Nov 2017 21:20:04 +0100 Wolfram Sang wrote: > Those two functions are very similar, the only differences are that one > needs the I2C_M_RD flag for its message while the other one needs the > buffer casted to drop the const. Introduce a generic helper which > allows to specify the

[PATCH v6 4/9] i2c: refactor i2c_master_{send_recv}

2017-11-04 Thread Wolfram Sang
Those two functions are very similar, the only differences are that one needs the I2C_M_RD flag for its message while the other one needs the buffer casted to drop the const. Introduce a generic helper which allows to specify the flags (also needed later for DMA safe variants of these calls) and

[PATCH v6 4/9] i2c: refactor i2c_master_{send_recv}

2017-11-04 Thread Wolfram Sang
Those two functions are very similar, the only differences are that one needs the I2C_M_RD flag for its message while the other one needs the buffer casted to drop the const. Introduce a generic helper which allows to specify the flags (also needed later for DMA safe variants of these calls) and