On Tue, Oct 4, 2016 at 12:20 AM, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote: > On Mon, Oct 03, 2016 at 07:40:51AM -0700, Andrey Smirnov wrote: >> Vybrid flavour of the I2C controller requires some additional quirks on >> part of the driver. This commit ports those quirks code from analogous >> Linux kernel driver. >> >> Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> >> --- >> drivers/i2c/busses/i2c-imx.c | 215 ++++++++++++++++++++++++++++++++----------- >> 1 file changed, 160 insertions(+), 55 deletions(-) >> >> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c >> index e407896..dbc76c2 100644 >> --- a/drivers/i2c/busses/i2c-imx.c >> +++ b/drivers/i2c/busses/i2c-imx.c >> @@ -43,6 +43,7 @@ >> +static inline void fsl_i2c_write_reg(unsigned int val, >> + struct fsl_i2c_struct *i2c_fsl, >> + unsigned int reg) >> +{ >> + writeb(val, i2c_fsl->base + (reg << i2c_fsl->hwdata->regshift)); >> +} >> + >> +static inline unsigned char fsl_i2c_read_reg(struct fsl_i2c_struct *i2c_fsl, >> + unsigned int reg) >> +{ >> + return readb(i2c_fsl->base + (reg << i2c_fsl->hwdata->regshift)); >> +} > > Can we have the introduction of the read/write accessor functions as a > separate patch (with regshift hardcoded to 0)? This would make reviewing > the rest easier. OK, will do in v2. Thanks, Andrey _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox