Re: [PATCH 1/2] i2c designware make SCL and SDA falling time configurable

2013-10-13 Thread Shinya Kuribayashi
On 10/10/13 9:54 AM, Ryan Mallon wrote: On 09/10/13 18:55, Mika Westerberg wrote: On Tue, Oct 08, 2013 at 05:00:54PM +0200, Romain Baeriswyl wrote: @@ -307,15 +309,25 @@ int i2c_dw_init(struct dw_i2c_dev *dev) /* set standard and fast speed deviders for high/low periods */ + if

Re: [PATCH 2/2] i2c designware add support of I2C standard mode

2013-10-13 Thread Shinya Kuribayashi
On 10/9/13 4:56 PM, Mika Westerberg wrote: On Tue, Oct 08, 2013 at 05:00:55PM +0200, Romain Baeriswyl wrote: Some legacy devices support ony I2C standard mode at 100kHz. This patch allows to select the standard mode through the DTS with the use of the existing clock-frequency parameter. When

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-23 Thread Shinya Kuribayashi
On 8/21/13 11:39 PM, Christian Ruppert wrote: On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: On 8/5/13 6:31 PM, Christian Ruppert wrote: On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote: As said before, all t_SCL things should go away. Please forget

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-08-19 Thread Shinya Kuribayashi
Hi, On 8/19/13 8:36 PM, Mika Westerberg wrote: On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote: Actually, the I2C specification clearly defines f_SCL;max (and thus implies t_SCL;min), both in the tables and the timing diagrams. Why can we ignore this constraint while having

Re: [PATCH v2 1/2] i2c-designware: make HCNT/LCNT values configurable

2013-08-19 Thread Shinya Kuribayashi
...@linux.intel.com Looks good, thanks. Acked-by: Shinya Kuribayashi skuri...@pobox.com -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-24 Thread Shinya Kuribayashi
On 7/22/13 10:17 PM, Christian Ruppert wrote: On Wed, Jul 17, 2013 at 11:39:58PM +0900, Shinya Kuribayashi wrote: On 7/16/13 8:16 PM, Christian Ruppert wrote: On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Basically, DW I2C core provides a good enough (and quite direct

Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

2013-07-17 Thread Shinya Kuribayashi
On 7/16/13 8:16 PM, Christian Ruppert wrote: On Sat, Jul 13, 2013 at 02:36:43PM +0900, Shinya Kuribayashi wrote: Basically, DW I2C core provides a good enough (and quite direct) way to control tHIGH and tLOW timing specs, *HCNT and *LCNT registers. But from my experience (with a slightly old

Re: [PATCH 0/5] i2c-sh_mobile non-urgent changes

2012-11-16 Thread Shinya Kuribayashi
/we think, in most cases it work without problem. What's more important for me is to record the issue and how to solve it. So I'd like to have patch 2 and 3 separately. Thank you for your offer anyway, -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list: send the line

[PATCH 0/5] i2c-sh_mobile non-urgent changes

2012-10-24 Thread Shinya Kuribayashi
cooking these patches over a year, and they work perfectly fine with older kernels ..v3.4 so far. Shinya Kuribayashi (5): i2c: i2c-sh_mobile: calculate clock parameters at driver probing time i2c: i2c-sh_mobile: optimize ICCH/ICCL values according to I2C bus speed i2c: i2c

[PATCH 1/5] i2c: i2c-sh_mobile: calculate clock parameters at driver probing time

2012-10-24 Thread Shinya Kuribayashi
hardware I/O accesses. We don't have to care about run-time PM maintenance here. Signed-off-by: Shinya Kuribayashi shinya.kuribayashi...@renesas.com --- drivers/i2c/busses/i2c-sh_mobile.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c

[PATCH 2/5] i2c: i2c-sh_mobile: optimize ICCH/ICCL values according to I2C bus speed

2012-10-24 Thread Shinya Kuribayashi
-by: Shinya Kuribayashi shinya.kuribayashi...@renesas.com --- drivers/i2c/busses/i2c-sh_mobile.c | 121 ++--- 1 file changed, 72 insertions(+), 49 deletions(-) diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 309d0d5..1ad80c9 100644

[PATCH 3/5] i2c: i2c-sh_mobile: fix ICCH to avoid violation of the tHD;STA timing spec

2012-10-24 Thread Shinya Kuribayashi
(), but they're providing good descriptions of SH-/R-Mobile I2C hardware spec, and I'd leave them as separated. Signed-off-by: Shinya Kuribayashi shinya.kuribayashi...@renesas.com --- drivers/i2c/busses/i2c-sh_mobile.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH 4/5] i2c: i2c-sh_mobile: support I2C hardware block with a faster operating clock

2012-10-24 Thread Shinya Kuribayashi
clock counter gets incremented every 2 clocks of the operating clock. This patch makes it configurable through platform data. Signed-off-by: Shinya Kuribayashi shinya.kuribayashi...@renesas.com --- drivers/i2c/busses/i2c-sh_mobile.c | 5 + include/linux/i2c/i2c-sh_mobile.h | 1 + 2 files changed

[PATCH 5/5] i2c: i2c-sh_mobile: fix spurious transfer request timed out

2012-10-24 Thread Shinya Kuribayashi
, and the transaction failed. Tracked-down-by: Teppei Kamijou teppei.kamijou...@renesas.com Signed-off-by: Shinya Kuribayashi shinya.kuribayashi...@renesas.com --- drivers/i2c/busses/i2c-sh_mobile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c

Re: [PATCH 01/10] i2c-designware: Allow mixed endianness accesses

2011-02-09 Thread Shinya Kuribayashi
On 02/03/2011 11:19 AM, dirk.brande...@gmail.com wrote: @@ -356,24 +393,24 @@ static void i2c_dw_xfer_init(struct dw_i2c_dev *dev) u32 ic_con; /* Disable the adapter */ - writel(0, dev-base + DW_IC_ENABLE); + dw_writel(dev, 0, DW_IC_ENABLE); /* set the slave

Re: [PATCH 02/10] i2c-designware: split of i2c-designware.c into core and bus specific parts

2011-02-03 Thread Shinya Kuribayashi
/i2c-designware.c deleted file mode 100644 index cd03f5e..000 --- a/drivers/i2c/busses/i2c-designware.c +++ /dev/null Will take git diff with rename detection, and check diffs later. -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH 03/10] i2c-designware: retrieve clock frequency based CONFIG_HAVE_CLK

2011-02-03 Thread Shinya Kuribayashi
offset) { Unnecessary empty line. As for the rest, this is ok. -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 2/9] i2c-designware: Initial split of i2c-designware.c into core and bus specific parts

2011-01-24 Thread Shinya Kuribayashi
in the above patch simply using #ifdef HAVE_CLK, rather than completely removed. The other is, how about separating such changes into another commit, or cook it along with PATCH 3/9? I'll follow up other patches later. -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list

Re: [PATCH 5/9] i2c-designware: move i2c functionality bit field to be adapter specific

2011-01-24 Thread Shinya Kuribayashi
| + I2C_FUNC_SMBUS_WORD_DATA | + I2C_FUNC_SMBUS_I2C_BLOCK; + dev-base = ioremap(mem-start, resource_size(mem)); if (dev-base == NULL) { dev_err(pdev-dev, failure mapping io resources\n); Ditto. -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list

Re: [PATCH 6/9] i2c-designware: move controller config to bus specific portion of driver

2011-01-24 Thread Shinya Kuribayashi
, this patch improves a situation at PCI driver side only, and we need to come up with a way for platform side in the future! -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 7/9] i2c-designware: Allow mixed endianness accesses

2011-01-24 Thread Shinya Kuribayashi
at the start at Dirk-san's patchset. We don't want to make a already proposed patch adapted to a modified driver. -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 8/9] i2c-designware-pci: Add runtime power management support

2011-01-24 Thread Shinya Kuribayashi
err_free_irq; } + pm_runtime_enable(pdev-dev); return 0; err_free_irq: -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH 3/4] i2c-nomadik: support smbus emulation

2010-09-27 Thread Shinya Kuribayashi
On 9/27/2010 6:00 PM, Linus Walleij wrote: 2010/9/24 Shinya Kuribayashi shinya.kuribayashi...@renesas.com: On 9/23/2010 4:04 PM, Linus Walleij wrote: Is this I2C core capable of I2C_FUNC_SMBUS_QUICK? Unless it's capable of full SMBus emulation, it would be better to turn off relevant flags

Re: [PATCH 3/4] i2c-nomadik: support smbus emulation

2010-09-23 Thread Shinya Kuribayashi
the driver, so would like to make sure) Is this I2C core capable of I2C_FUNC_SMBUS_QUICK? Unless it's capable of full SMBus emulation, it would be better to turn off relevant flags for safety. I'm not objecting to the patch, but just wondered. -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe

Re: [CORRECTED] I2C driver supporting Moorestown and Medfield platform

2010-08-09 Thread Shinya Kuribayashi
it as two drivers. Otherwise you drag a lot of PCI and PCI pm logic into a simpler driver that is used on non PCI platforms. Got it, thanks. I'll have a look at the differences, first. -- Shinya Kuribayashi Renesas Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c

Re: [PATCH v2 0/3] i2c-designware: Allow mixed endianness

2010-01-20 Thread Shinya Kuribayashi
Jean-Hugues Deschenes wrote: This is the v2 version of the patch which adds support for the i2c Designware controller when its endianness differs from that of the cpu. --- Changelog v1-v2 - rename i2c_dw_(read|write)l to dw_(read|write)l (Shinya Kuribayashi) - rename dw_(read|write)l's addr

Re: [PATCH v2 0/3] i2c-designware: Allow mixed endianness

2010-01-20 Thread Shinya Kuribayashi
Shinya Kuribayashi wrote: Jean-Hugues Deschenes wrote: This is the v2 version of the patch which adds support for the i2c Designware controller when its endianness differs from that of the cpu. --- Changelog v1-v2 - rename i2c_dw_(read|write)l to dw_(read|write)l (Shinya Kuribayashi) - rename

Re: [PATCH 1/3] Use local version of readl writel

2010-01-14 Thread Shinya Kuribayashi
] wrappers do. I'd prefer a reasonably shorter name for this kind of accessors! -- Shinya Kuribayashi NEC Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 3/3] Allow mixed endianness accesses

2010-01-14 Thread Shinya Kuribayashi
/swab settings in any way, that's fine. Then I wonder is there any way to statically optimize them? Note that I'm not objecting against this patch, just would like to search for a better way if available! -- Shinya Kuribayashi NEC Electronics -- To unsubscribe from this list: send the line

Re: [PATCH 0/3] i2c-designware: Allow mixed endianness

2010-01-13 Thread Shinya Kuribayashi
, but it seems doesn't work for your environment, R/W data is swapped :-( -- Shinya Kuribayashi NEC Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v2 21/22] i2c-designware: Tx abort cleanups

2009-11-16 Thread Shinya Kuribayashi
an additional patch shortly. -- Shinya Kuribayashi NEC Electronics -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 23/22] i2c-designware: i2c_dw_handle_tx_abort: Use dev_dbg() for NOACK cases

2009-11-16 Thread Shinya Kuribayashi
In the case of no-ACKs, we don't want to see dev_err() messages in the console, because some utilities like i2c-tools are capable of printing decorated console output. This patch will ease such situations. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- Hi Ben, This patch

Re: [PATCH v2 21/22] i2c-designware: Tx abort cleanups

2009-11-11 Thread Shinya Kuribayashi
Baruch, Shinya Kuribayashi wrote: * ABRT_MASTER_DIS: Fix a typo. * i2c_dw_handle_tx_abort: Return an appropriate error number depending on abort_source. * i2c_dw_xfer: Add a missing abort_source initialization. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com

Re: [RFC] i2c-designware patches

2009-10-18 Thread Shinya Kuribayashi
Hi Baruch, Baruch Siach wrote: Your contribution to the implementation of transactions that are longer than the hardware buffers is very important. I wrote this code as a theoretical exercise, as I never had access to an i2c slave which requires long transactions. So I'm not surprised to find

Re: [PATCH 16/16] i2c-designware: Add I2C_FUNC_SMBUS_* bits

2009-10-14 Thread Shinya Kuribayashi
Hi Baruch, Baruch Siach wrote: On Tue, Oct 13, 2009 at 11:54:21AM +0900, Shinya Kuribayashi wrote: This will ease our testing a bit with i2c-tools. Note that DW I2C core doesn't support I2C_FUNC_SMBUS_QUICK, as it's not capable of slave- addressing-only I2C transactions. Is this supposed

Re: [PATCH 07/16] i2c-designware: Set a clock name to DesignWare I2C clock source

2009-10-14 Thread Shinya Kuribayashi
Ben, Mark and Russell, Russell King - ARM Linux wrote: [ big snip ] I would strongly advise you to ensure that your implementation conforms to the intentions of the clk API Thanks for kind explanations. I'd like to give the clkdev a try. -- Shinya Kuribayashi NEC Electronics

Re: [PATCH 15/16] i2c-designware: i2c_dw_xfer_msg: Mark as completed on an error

2009-10-14 Thread Shinya Kuribayashi
Shinya Kuribayashi wrote: As wait_for_completion_interruptible_timeout() will be invoked after the first call to i2c_dw_xfer_msg() is made whether or not an error is detected in it, we need to mark -cmd_complete as completed to avoid a needless HZ timeout. diff --git a/drivers/i2c/busses/i2c

Re: [PATCH 07/16] i2c-designware: Set a clock name to DesignWare I2C clock source

2009-10-13 Thread Shinya Kuribayashi
Ben Dooks wrote: On Tue, Oct 13, 2009 at 11:50:49AM +0900, Shinya Kuribayashi wrote: This driver is originally prepared for the ARM kernel where rich and well-maintained clkdev clock framework is available, and clock name might not be strictly required. ARM's clkdev does slightly fuzzy

Re: [PATCH 07/16] i2c-designware: Set a clock name to DesignWare I2C clock source

2009-10-13 Thread Shinya Kuribayashi
Mark Brown wrote: On Tue, Oct 13, 2009 at 11:50:49AM +0900, Shinya Kuribayashi wrote: This driver is originally prepared for the ARM kernel where rich and well-maintained clkdev clock framework is available, and clock name might not be strictly required. ARM's clkdev does slightly fuzzy

[RFC] i2c-designware patches

2009-10-12 Thread Shinya Kuribayashi
. Then I'll respin and give it a test, thanks. Baruch, I'd say the base driver is in good shape enogh, so I'm having a fun with modifing the driver. Thanks for the initial work. P.S. ARM and MIPS lists are Cc:ed as I believe there must be potential users of this driver. Shinya Kuribayashi (16

[PATCH 01/16] i2c-designware: Consolidate to use 32-bit word accesses

2009-10-12 Thread Shinya Kuribayashi
This driver looks originally meant for armel machines where readw()/ writew() works perfectly fine. But that doens't work for big-endian systems. This patch converts all 8/16-bit-aware usages to 32-bit variants, so that the driver works for MIPS big-endian machines, too. Signed-off-by: Shinya

[PATCH 03/16] i2c-designware: Use platform_get_irq helper

2009-10-12 Thread Shinya Kuribayashi
Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index efddae1..0164092 100644

[PATCH 04/16] i2c-designware: i2c_dw_read: Take struct dw_i2c_dev pointer

2009-10-12 Thread Shinya Kuribayashi
There's no need to interface using with struct i2c_adapter pointer. Let's use a local struct dw_i2c_dev pointer, instead. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff

[PATCH 05/16] i2c-designware: i2c_dw_xfer_msg: Take struct dw_i2c_dev pointer

2009-10-12 Thread Shinya Kuribayashi
There's no need to interface using with struct i2c_adapter pointer. Let's use a local struct dw_i2c_dev pointer, instead. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff

[PATCH 06/16] i2c-designware: Remove an useless local variable num

2009-10-12 Thread Shinya Kuribayashi
We couldn't know the original intent for this variable, but at this point it's useless. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c

[PATCH 07/16] i2c-designware: Set a clock name to DesignWare I2C clock source

2009-10-12 Thread Shinya Kuribayashi
could make use of the driver. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index 9d81775

[PATCH 08/16] i2c-designware: Improve _HCNT/_LCNT calculation

2009-10-12 Thread Shinya Kuribayashi
timing spec. To make the driver configurable as much as possible for various cases, we'd have separated arguments tf and offset, and for safety default values should be 0.3 us and 0, respectively. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c

[PATCH 09/16] i2c-designware: i2c_dw_xfer_msg: Fix an i2c_msg search bug

2009-10-12 Thread Shinya Kuribayashi
In case an i2c_msg, which is currently work-in-progress, has more bytes to be written, we need to set STATUS_WRITE_IN_PROGRESS _and_ exit from the msg_write_idx-search loop. Otherwise, we'll overtake the current index without waiting for transmission completed. Signed-off-by: Shinya Kuribayashi

[PATCH 11/16] i2c-designware: Set Tx/Rx FIFO threshold levels

2009-10-12 Thread Shinya Kuribayashi
, and hook it in the handler) Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c | 15 +++ 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index 52a69a2

[PATCH 12/16] i2c-designware: Divide i2c_dw_xfer_msg into two functions

2009-10-12 Thread Shinya Kuribayashi
i2c_dw_xfer_msg(). Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c | 45 +++--- 1 files changed, 25 insertions(+), 20 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c

[PATCH 13/16] i2c-designware: i2c_dw_xfer_msg: Introduce a local buf pointer

2009-10-12 Thread Shinya Kuribayashi
slightly hard to follow. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- Furthermore, even with this change, i2c_dw_xfer_msg() is still inconsistent with i2c_dw_read(). I don't have preference around here, but would like to sort out. Any suggestions are welcome. drivers/i2c

[PATCH 15/16] i2c-designware: i2c_dw_xfer_msg: Mark as completed on an error

2009-10-12 Thread Shinya Kuribayashi
As wait_for_completion_interruptible_timeout() will be invoked after the first call to i2c_dw_xfer_msg() is made whether or not an error is detected in it, we need to mark -cmd_complete as completed to avoid a needless HZ timeout. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com

[PATCH 16/16] i2c-designware: Add I2C_FUNC_SMBUS_* bits

2009-10-12 Thread Shinya Kuribayashi
This will ease our testing a bit with i2c-tools. Note that DW I2C core doesn't support I2C_FUNC_SMBUS_QUICK, as it's not capable of slave- addressing-only I2C transactions. Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com --- drivers/i2c/busses/i2c-designware.c |9 - 1