RE: [PATCH v5 3/4] drivers/i2c/busses/i2c-at91.c: add new driver

2011-11-23 Thread Voss, Nikolaus
Hi, Carsten Behling wrote on 2011-11-23: this case is already catched in at91_do_twi_transfer(): Sorry, I did not found this code in your patch. (http://www.mail-archive.com/linux-i2c@vger.kernel.org/msg06556.html): + if (is_read) { + if (!dev-buf_len) yes, this

AW: [PATCH v5 3/4] drivers/i2c/busses/i2c-at91.c: add new driver

2011-11-23 Thread Carsten Behling
this case is already catched in at91_do_twi_transfer(): Sorry, I did not found this code in your patch. (http://www.mail-archive.com/linux-i2c@vger.kernel.org/msg06556.html): + if (is_read) { + if (!dev-buf_len) + at91_twi_write(dev, AT91_TWI_CR, +

[GIT PULL] i2c fixes for Linux 3.2

2011-11-23 Thread Jean Delvare
Hi Linus, Please pull i2c subsystem fixes for Linux 3.2 from: git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging.git i2c-for-linus Documentation/i2c/ten-bit-addresses | 36 ++ drivers/i2c/algos/i2c-algo-bit.c|4 +- drivers/i2c/i2c-core.c

AW: [PATCH v5 3/4] drivers/i2c/busses/i2c-at91.c: add new driver

2011-11-23 Thread Carsten Behling
Hi, I try to use the at24 eeprom driver on top of this driver. This EEPROM (24c32) works with two address bytes. Writing results in a call to at91_twi_xfer() with num=1. In this case the internal address register is not used and the address is sent out within the buffer. Reading results in a

RE: [PATCH v5 3/4] drivers/i2c/busses/i2c-at91.c: add new driver

2011-11-23 Thread Voss, Nikolaus
Hi Carsten, Carsten Behling wrote on 2011-11-23: I think it must be: + for (i = 0; i msg-len; ++i) { + internal_address |= ((unsigned)msg-buf[msg-len-1-i]) (8 * i); + int_addr_flag += AT91_TWI_IADRSZ_1; + } +

[PATCH v7 4/5] G45 TWI: remove open drain setting for twi function gpios

2011-11-23 Thread Nikolaus Voss
The G45 datasheets explicitly states that setting the open drain property on peripheral function gpios is not allowed. (How about other A91 chips?) Signed-off-by: Nikolaus Voss n.v...@weinmann.de --- arch/arm/mach-at91/at91sam9g45_devices.c |6 -- 1 files changed, 0 insertions(+), 6

[PATCH v7 2/5] Replace clk_lookup.con_id with clk_lookup.dev_id entries for twi clk

2011-11-23 Thread Nikolaus Voss
The old driver used con_id clock entries. Convert to use dev_id for clock lookup via standard method. Signed-off-by: Nikolaus Voss n.v...@weinmann.de --- arch/arm/mach-at91/at91cap9.c|1 + arch/arm/mach-at91/at91rm9200.c |1 + arch/arm/mach-at91/at91sam9260.c |1 +

[PATCH v7 5/5] i2c-at91.c: add SMBUS_READ_BLOCK_DATA functionality

2011-11-23 Thread Nikolaus Voss
SMBus emulation uses I2C_M_RECV_LEN flag to indicate a SMBus block read operation in which the length of a transfer is inicated by the first received byte. Make better use of clk_prepare()/clk_unprepare(). More sensible transfer timeout. Signed-off-by: Nikolaus Voss n.v...@weinmann.de ---

[PATCH v7 3/5] drivers/i2c/busses/i2c-at91.c: add new driver

2011-11-23 Thread Nikolaus Voss
This driver has the following properties compared to the old driver: 1. Support for multiple interfaces. 2. Interrupt driven I/O as opposed to polling/busy waiting. 3. Support for _one_ repeated start (Sr) condition, which is enough for most real-world applications including all SMBus transfer

[PATCH v7 1/5] drivers/i2c/busses/i2c-at91.c: remove broken driver

2011-11-23 Thread Nikolaus Voss
Signed-off-by: Nikolaus Voss n.v...@weinmann.de --- arch/arm/mach-at91/include/mach/at91_twi.h | 68 -- drivers/i2c/busses/Makefile|1 - drivers/i2c/busses/i2c-at91.c | 327 3 files changed, 0 insertions(+), 396 deletions(-)

Re: [PATCH v7 3/5] drivers/i2c/busses/i2c-at91.c: add new driver

2011-11-23 Thread Arnd Bergmann
On Tuesday 08 November 2011, Nikolaus Voss wrote: + +static unsigned at91_twi_read(struct at91_twi_dev *dev, unsigned reg) +{ + return __raw_readl(dev-base + reg); +} + +static void at91_twi_write(struct at91_twi_dev *dev, unsigned reg, unsigned val) +{ + __raw_writel(val,

Re: [PATCH v7 0/5] AT91: replace broken TWI driver i2c-at91.c

2011-11-23 Thread Ben Dooks
On Wed, Nov 23, 2011 at 04:35:55PM +0100, Nikolaus Voss wrote: The old driver has two main deficencies: i) No repeated start (Sr) condiction is possible, this makes it unusable e.g. for most SMBus transfers. ii) I/O was done with polling/busy waiting what caused over-/underruns even

Re: Still problems wit egt20 i2c driver

2011-11-23 Thread Ben Dooks
On Tue, Nov 22, 2011 at 07:52:57PM +0900, Tomoya MORINAGA wrote: Hi Christian, Good news! Except [PATCH] i2c-eg20t: modified the setting of transfer rate, all patches already accepted. So, they will got into linux-3.3. If there's anything that been missed, let me know as I intend on

Re: [PATCH 3/5] SPI: Add helper macro for spi_driver boilerplate

2011-11-23 Thread Ben Dooks
On Wed, Nov 16, 2011 at 10:12:54AM -0700, Grant Likely wrote: On Wed, Nov 16, 2011 at 2:13 AM, Lars-Peter Clausen l...@metafoo.de wrote: This patch introduces the module_spi_driver macro which is a convenience macro for SPI driver modules similar to module_platform_driver. It is intended

Re: Still problems wit egt20 i2c driver

2011-11-23 Thread Tomoya MORINAGA
Hi Ben It seems the following patches are not reviewed yet. [PATCH] i2c-eg20t: modified the setting of transfer rate (Mon, 26 Sep 2011 16:16:23 +0900) [PATCH 1/2] i2c-eg20t: Support new device LAPIS Semiconductor ML7831 IOH (Fri, 28 Oct 2011 09:40:10 +0900) [PATCH 2/2] i2c-eg20t:

RE: [PATCH v7 0/5] AT91: replace broken TWI driver i2c-at91.c

2011-11-23 Thread Voss, Nikolaus
Hi, Ben Dooks wrote on 2011-11-24: On Wed, Nov 23, 2011 at 04:35:55PM +0100, Nikolaus Voss wrote: The old driver has two main deficencies: i) No repeated start (Sr) condiction is possible, this makes it unusable e.g. for most SMBus transfers. ii) I/O was done with polling/busy

Re: [PATCH 3/5] SPI: Add helper macro for spi_driver boilerplate

2011-11-23 Thread Lars-Peter Clausen
On 11/24/2011 01:13 AM, Ben Dooks wrote: On Wed, Nov 16, 2011 at 10:12:54AM -0700, Grant Likely wrote: On Wed, Nov 16, 2011 at 2:13 AM, Lars-Peter Clausen l...@metafoo.de wrote: This patch introduces the module_spi_driver macro which is a convenience macro for SPI driver modules similar to

[PATCH] i2c-mxs: fix compile warning in mxs_i2c_xfer()

2011-11-23 Thread Shawn Guo
CC drivers/i2c/busses/i2c-mxs.o drivers/i2c/busses/i2c-mxs.c: In function ‘mxs_i2c_xfer’: drivers/i2c/busses/i2c-mxs.c:196:6: warning: ‘data’ may be used uninitialized in this function Signed-off-by: Shawn Guo shawn@linaro.org --- drivers/i2c/busses/i2c-mxs.c |2 +- 1 files