Wolfram Sang | 24 Jul 12:38 2014
Picon

Vacation

Hi people,

I'll be mostly away from the net for a week or so. I might be able to 
read mails (no promises, though), yet I won't be able to review patches 
during that time.

Until then,

    Wolfram

Yao Yuan | 24 Jul 05:19 2014

RE: [PATCH v4 1/2] i2c: add DMA support for freescale i2c driver

On Fri, May 21, 2014 at 4:01 PM +0200, Wolfram Sang wrote:
> 
> Ping. Any updates? I think this was pretty close to inclusion?

Hi, Wolfram
	Thanks for your concern. Sorry for my reply so late. I had on a business trip for months.
At that time I have no device to debug it. Now, I'm come back and I will try my best to finish it.
I have sent the patch for V5. Thanks for your review.

Best regards,
Yuan Yao
Maxime COQUELIN | 23 Jul 17:44 2014

[PATCH v2] drivers: i2c: i2c-st: Update i2c timings

The i2c timing values specified in the driver are the minimun values defined
in the I2C specifications.
The I2C specification does not specify any default or maximum values.

Some I2C devices are out of spec, such as the HDMI link of the Toshiba 19AV600
TV, and might not work properly with minimum values.

This patch adds a 10% margin on all the timings in both Normal and Fast modes.

Trial and error method have been used to find the minimum margin necessary to
have the out-of-spec device working, and a security margin has been added.

Signed-off-by: Maxime Coquelin <maxime.coquelin@...>
---
 drivers/i2c/busses/i2c-st.c | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index 95b94767..4ab14ad 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
 <at>  <at>  -206,25 +206,31  <at>  <at>  static inline void st_i2c_clr_bits(void __iomem *reg, u32 mask)
 	writel_relaxed(readl_relaxed(reg) & ~mask, reg);
 }

-/* From I2C Specifications v0.5 */
+/*
+ * From I2C Specifications v0.5.
+ *
+ * All the values below have +10% margin added to be
(Continue reading)

Alan Cox | 23 Jul 14:06 2014
Picon

i2c,designware: add new bindings

This may appear as PCI or ACPI depending upon the firmware so we
have to list both. All share the same ACPI identifier but not
the same PCI identifier.

Signed-off-by: Alan Cox <alan@...>
---
 drivers/i2c/busses/i2c-designware-pcidrv.c  |    9 +++++++++
 drivers/i2c/busses/i2c-designware-platdrv.c |    1 +
 2 files changed, 10 insertions(+)

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 3356f7a..d31d313 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
 <at>  <at>  -188,6 +188,7  <at>  <at>  static struct  dw_pci_controller dw_pci_controllers[] = {
 		.scl_sda_cfg = &hsw_config,
 	},
 };
+
 static struct i2c_algorithm i2c_dw_algo = {
 	.master_xfer	= i2c_dw_xfer,
 	.functionality	= i2c_dw_func,
 <at>  <at>  -350,6 +351,14  <at>  <at>  static const struct pci_device_id i2_designware_pci_ids[] = {
 	/* Haswell */
 	{ PCI_VDEVICE(INTEL, 0x9c61), haswell },
 	{ PCI_VDEVICE(INTEL, 0x9c62), haswell },
+	/* Braswell / Cherrytrail */
+	{ PCI_VDEVICE(INTEL, 0x22C1), baytrail,},
+	{ PCI_VDEVICE(INTEL, 0x22C2), baytrail },
+	{ PCI_VDEVICE(INTEL, 0x22C3), baytrail },
(Continue reading)

Wolfram Sang | 18 Jul 14:35 2014
Picon

Re: I2C Slave monitor mode support


> Currently, one would have to put a loop on the address transfer waiting an ack
> is received in user space.

This is what most i2c master drivers would need to do anyhow. I have
never heard of hardware support for that. Do you know an IP core which
does that? And how are timeouts defined/handled?

> This helps the app or the user software to not busy wait considering the slow
> clk of i2c.

Currently, this is not supported in Linux I2C. It probably could be
using another I2C_M_* flag, but a number of details need to be designed
and implemented first. Would you be interested?

Kind regards,

   Wolfram

Jean Delvare | 17 Jul 15:04 2014
Picon

[PATCH v2] i2c-i801: Add device ID for Intel Wildcat Point PCH

Signed-off-by: Jean Delvare <jdelvare@...>
Cc: James Ralston <james.d.ralston@...>
Cc: Wolfram Sang <wsa@...>
---
Untested, but the datasheet show full compatibility with previous
chipsets.

Changes since v1:
 * Rebased, no other change

 Documentation/i2c/busses/i2c-i801 |    1 +
 drivers/i2c/busses/Kconfig        |    1 +
 drivers/i2c/busses/i2c-i801.c     |    3 +++
 3 files changed, 5 insertions(+)

--- linux-3.16-rc4.orig/Documentation/i2c/busses/i2c-i801	2014-07-17 12:59:12.569368248 +0200
+++ linux-3.16-rc4/Documentation/i2c/busses/i2c-i801	2014-07-17 13:02:02.011437148 +0200
 <at>  <at>  -25,6 +25,7  <at>  <at>  Supported adapters:
   * Intel Avoton (SOC)
   * Intel Wellsburg (PCH)
   * Intel Coleto Creek (PCH)
+  * Intel Wildcat Point (PCH)
   * Intel Wildcat Point-LP (PCH)
   * Intel BayTrail (SOC)
    Datasheets: Publicly available at the Intel website
--- linux-3.16-rc4.orig/drivers/i2c/busses/Kconfig	2014-07-17 12:59:12.569368248 +0200
+++ linux-3.16-rc4/drivers/i2c/busses/Kconfig	2014-07-17 13:02:02.011437148 +0200
 <at>  <at>  -109,6 +109,7  <at>  <at>  config I2C_I801
 	    Avoton (SOC)
 	    Wellsburg (PCH)
(Continue reading)

Jean Delvare | 17 Jul 15:03 2014
Picon

[PATCH v2] i2c-i801: Fix the alignment of the device table

A long name broke the alignment, shift the columns a bit to fix it and
make the table look nice again. While we're here, switch to the
standard comment style to make checkpatch happy, and use tabs instead
of spaces for column alignment.

Signed-off-by: Jean Delvare <jdelvare@...>
Cc: James Ralston <james.d.ralston@...>
Cc: Wolfram Sang <wsa@...>
---
Changes since v1:
 * Use tabs instead of spaces
 * Align the device ID definitions too

 drivers/i2c/busses/i2c-i801.c |  136 +++++++++++++++++++++---------------------
 1 file changed, 68 insertions(+), 68 deletions(-)

--- linux-3.16-rc4.orig/drivers/i2c/busses/i2c-i801.c	2014-07-12 09:40:49.219392496 +0200
+++ linux-3.16-rc4/drivers/i2c/busses/i2c-i801.c	2014-07-17 12:51:15.562327954 +0200
 <at>  <at>  -22,57 +22,57  <at>  <at> 
 */

 /*
-  Supports the following Intel I/O Controller Hubs (ICH):
-
-                                  I/O                     Block   I2C
-                                  region  SMBus   Block   proc.   block
-  Chip name             PCI ID    size    PEC     buffer  call    read
-  ----------------------------------------------------------------------
-  82801AA  (ICH)        0x2413     16      no      no      no      no
-  82801AB  (ICH0)       0x2423     16      no      no      no      no
(Continue reading)

Michal Minář | 17 Jul 10:57 2014
Picon

Re: autoload i2c-dev module when needed


Thanks Dan!

Updated and a bit refactored patch is attached.

Michal
On 07/17/2014 02:56 AM, Danielle Costantino wrote:
> you need to add this after the #else , before the err = system...
> to accommodate for systems that have i2c-dev.ko built in, not as a
> module, on older kernels.
> 
> struct stat st;
> 
> err = stat("/sys/class/i2c-dev", &st);
> 
> if (err < 0) { if (errno != ENOENT) { err = -errno; goto done; }
> else err = 0; } else return 1;
> 
> 
> 
> On Wed, Jul 16, 2014 at 10:14 AM, Wolfram Sang <wsa@...>
> wrote:
> 
>> 
>> Adding Jean Delvare who maintains i2c-tools to CC...
>> 
>> On Thu, Jun 05, 2014 at 10:17:33AM +0200, Michal Minář wrote:
> Hello,
> 
> we've got following request (viz [1]):
(Continue reading)

Rickard Strandqvist | 16 Jul 23:14 2014
Picon

[PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

This start as a fix for possible null pointer dereference.
But after discussion with especially Wolfram, Jingoo and Emil it was
decided to convert the code to uses Managed Device Resource instead.

Rickard Strandqvist (1):
  i2c: busses: i2c-pxa.c:  Fix for possible null pointer dereference

 drivers/i2c/busses/i2c-pxa.c |   65 ++++++++++++++----------------------------
 1 file changed, 22 insertions(+), 43 deletions(-)

--

-- 
1.7.10.4

Wolfram Sang | 16 Jul 23:00 2014
Picon

Re: [PATCH] i2c: scx200: drop GPIO based i2c driver

On Wed, Jul 16, 2014 at 02:37:12PM -0600, Jim Cromie wrote:
> Ive not had an i2c device to test this with, so ack

Great, thanks!

Jean Delvare | 13 Jul 17:17 2014
Picon

[PATCH] i2c-stub: Avoid an array overrun on I2C block transfers

I2C block transfers can have a size up to 32 bytes. If starting close
to the end of the address space, there may not be enough room to write
that many bytes (on I2C block writes) or not enough bytes to be read
(on I2C block reads.) In that case, we must shorten the transfer so
that it does not exceed the address space.

Signed-off-by: Jean Delvare <jdelvare@...>
Cc: Guenter Roeck <linux@...>
Cc: Wolfram Sang <wsa@...>
---
 drivers/i2c/i2c-stub.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-3.16-rc4.orig/drivers/i2c/i2c-stub.c	2014-07-12 11:56:30.933096483 +0200
+++ linux-3.16-rc4/drivers/i2c/i2c-stub.c	2014-07-13 17:01:02.891235856 +0200
 <at>  <at>  -220,6 +220,8  <at>  <at>  static s32 stub_xfer(struct i2c_adapter
 		 * We ignore banks here, because banked chips don't use I2C
 		 * block transfers
 		 */
+		if (data->block[0] > 256 - command)	/* Avoid overrun */
+			data->block[0] = 256 - command;
 		len = data->block[0];
 		if (read_write == I2C_SMBUS_WRITE) {
 			for (i = 0; i < len; i++) {

--

-- 
Jean Delvare
SUSE L3 Support

Gmane