From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 06 Jul 2011 11:36:45 +0200 Subject: [U-Boot] [PATCH] i2c:gpio:s5p: I2C GPIO Software implementation In-Reply-To: <4E13F904.50402@denx.de> References: <1309868621-19921-1-git-send-email-l.majewski@samsung.com> <201107051347.01833.vapier@gentoo.org> <4E13F904.50402@denx.de> Message-ID: <20110706113645.70178792@lmajewski.digital.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 06 Jul 2011 07:56:20 +0200 Heiko Schocher wrote: > Hello Mike, > > Mike Frysinger wrote: > > On Tuesday, July 05, 2011 08:23:41 Lukasz Majewski wrote: > >> This commit adds I2C software support for Samsung's S5PC110 > >> family of processors. > >> The generic drivers/i2c/soft_i2c framework is used, with > >> routines provided by this commit. > > > > if you simply implemented the generic gpio layer (asm/gpio.h), the > > soft_i2c.c code already handles gluing to GPIO pins. then you > > wouldnt need a sep driver at all. you can see the bf561-ezkit > > already using this code. -mike > > Yes, that was my thought too. No seperate i2c driver should be needed > here. > > bye, > Heiko Thanks Mike and Heiko for reply. However I've got some extra question. In the bf651-ezkit.h file I can see the I2C definition: #define CONFIG_SOFT_I2C #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF0 #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF1 My concern is about the situation when SoC needs more than one Software I2C run via GPIO? Please consider following scenario: One sensor is connected to pins 1(SCL) and 3(SDA) and another to 4(SCL) and 5(SDA) in a GPIO port. As fair as I've understood the software_i2c framework, it is supposed to run only one instance of GPIO I2C. Is there any way to "instantiate" more than one I2C GPIO interface via software_i2c? -- Best regards, Lukasz Majewski Samsung Poland R&D Center Platform Group