Re: [v6] i2c: imx: support slave mode for imx I2C driver

From: Sascha Hauer
Date: Fri Dec 06 2019 - 02:38:25 EST


On Thu, Dec 05, 2019 at 12:43:46PM +0100, Oleksij Rempel wrote:
> Hi,
>
> On 04.12.19 11:00, Sascha Hauer wrote:
> > Hi,
> >
> > The patch looks ok to me now, but I still do not like the #ifdeffery
> > around CONFIG_I2C_SLAVE. With the patch I just sent (You are on Cc:)
> > we could apply the following on your patch which makes it more readable
> > and increases compile coverage.
> >
> > Wolfram, Biwen, what do you think?
>
>
> RCAR depends on slave:
> config I2C_RCAR
>
> tristate "Renesas R-Car I2C Controller"
>
> depends on ARCH_RENESAS || COMPILE_TEST
>
> select I2C_SLAVE
> see:
> drivers/i2c/busses/i2c-rcar.c
>
> So, I would suggest to do the same in imx.

I suggested that to v1 of this patch. If we agree though that I2C slave
support deserves an extra Kconfig option we should also make the drivers
cope with that situation. Otherwise we would better make I2C slave
support non optional.

Sascha

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |