Re: [PATCH 05/13] i2c-designware: split of i2c-designware.c intocore and bus specific parts

From: Randy Dunlap
Date: Sat Mar 12 2011 - 16:00:50 EST


On Sat, 12 Mar 2011 12:23:19 -0800 dirk.brandewie@xxxxxxxxx wrote:

> From: Dirk Brandewie <dirk.brandewie@xxxxxxxxx>
>
> This patch splits i2c-designware.c into three pieces:
> i2c-designware-core.c, contains the code that interacts directly
> with the core.
>
> i2c-designware-platdrv.c, contains the code specific to the
> platform driver using the core.
>
> i2c-designware-core.h contains the definitions and declareations
> shared by i2c-designware-core.c and i2c-designware-platdrv.c.
>
> This patch is the first in a set to allow multiple instances of the
> designware I2C core in the system.
>
> Signed-off-by: Dirk Brandewie <dirk.brandewie@xxxxxxxxx>
> ---
> drivers/i2c/busses/Kconfig | 6 +-
> drivers/i2c/busses/Makefile | 3 +-
> .../{i2c-designware.c => i2c-designware-core.c} | 353 +-------------------
> drivers/i2c/busses/i2c-designware-core.h | 194 +++++++++++
> drivers/i2c/busses/i2c-designware-platdrv.c | 199 +++++++++++
> 5 files changed, 412 insertions(+), 343 deletions(-)
> rename drivers/i2c/busses/{i2c-designware.c => i2c-designware-core.c} (60%)
> create mode 100644 drivers/i2c/busses/i2c-designware-core.h
> create mode 100644 drivers/i2c/busses/i2c-designware-platdrv.c
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index 113505a..35b5e6b 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -347,15 +347,15 @@ config I2C_DAVINCI
> devices such as DaVinci NIC.
> For details please see http://www.ti.com/davinci
>
> -config I2C_DESIGNWARE
> - tristate "Synopsys DesignWare"
> +config I2C_DESIGNWARE_PLATFORM
> + tristate "Synopsys DesignWare Platfrom"

Platform

> depends on HAVE_CLK
> help
> If you say yes to this option, support will be included for the
> Synopsys DesignWare I2C adapter. Only master mode is supported.
>
> This driver can also be built as a module. If so, the module
> - will be called i2c-designware.
> + will be called i2c-designware-platform.
>
> config I2C_GPIO
> tristate "GPIO-based bitbanging I2C"

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/