Re: [PATCH 14/20] i.MX: i2c-imx: Add Vybrid support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux