Antony Pavlov | 4 Jul 08:59 2015
Picon

Re: i2c: i2c-mv64xxx: rework offload support to fix several problems

Hi!

I have found your commit in the linux kernel mainline

  commit 00d8689b85a7bb37cc57ba4c40bd46325f51ced4
  Author: Thomas Petazzoni <thomas.petazzoni@...>
  Date:   Thu Dec 11 17:33:46 2014 +0100

      i2c: mv64xxx: rework offload support to fix several problems

see also https://patchwork.ozlabs.org/patch/420180/

Here is a fragment:

+static bool
+mv64xxx_i2c_can_offload(struct mv64xxx_i2c_data *drv_data)
+{
+	struct i2c_msg *msgs = drv_data->msgs;
+	int num = drv_data->num_msgs;
+
+	return false;
^^^^^^^^^^^^^^^^^^^^^
+
+	if (!drv_data->offload_enabled)
+		return false;

So mv64xxx_i2c_can_offload() is always returns false and offload is always disabled.

Please comment this.

(Continue reading)

Irina Tirdea | 3 Jul 11:33 2015
Picon

[PATCH v3 0/8] Add support for best effort block read emulation

This is version 3 for adding i2c_smbus_read_i2c_block_data_or_emulated
to i2c-core. The i2c core part is the same as in v2, but I have added
3 more users for iio drivers.

Changes in v2:
 - changed bmc150-accel, kxcjk-1013 and bmg160 drivers to use
i2c_smbus_read_i2c_block_data_or_emulated

Changes in v1:
 - dropped the RFC tag
 - changed at24 to use i2c_smbus_read_i2c_block_data_or_emulated
 - when reading an odd number of bytes using word emulation, read an even
number of bytes and drop the last one
 - add a comment that this might not be suitable for all I2C slaves 

Adriana Reus (2):
  iio: accel: kxcjk-1013: use available_scan_masks
  iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler

Irina Tirdea (6):
  i2c: core: Add support for best effort block read emulation
  eeprom: at24: use i2c_smbus_read_i2c_block_data_or_emulated
  iio: accel: bmc150: use available_scan_masks
  iio: accel: bmc150: optimize i2c transfers in trigger handler
  iio: gyro: bmg160: use available_scan_masks
  iio: gyro: bmg160: optimize i2c transfers in trigger handler

 drivers/i2c/i2c-core.c           | 60 ++++++++++++++++++++++++++++++++++++++++
 drivers/iio/accel/bmc150-accel.c | 23 +++++++--------
 drivers/iio/accel/kxcjk-1013.c   | 24 ++++++++--------
(Continue reading)

Sasnett_Karen | 1 Jul 13:53 2015

(unknown)


Haben Sie einen Investor brauchen?

Haben Sie geschäftliche oder persönliche Darlehen benötigen?

Wir geben Darlehen an eine natürliche Person und Unternehmen bei 3% Zinsen jährlich. Weitere
Informationen Kontaktieren Sie uns per E-Mail: omfcreditspa@...<mailto:omfcreditspa@...>

HINWEIS: Leiten Sie Ihre Antwort nur an diese E-Mail: omfcreditspa <at> hotmail.com<mailto:omfcreditspa@...>
Axel Lin | 30 Jun 05:41 2015

[PATCH] i2c: jz4780: Fix return value if probe fails

Current code returns 0 if fails to read clock-frequency DT property,
fix it. Also add checking return value of clk_prepare_enable and
propagate return value of devm_request_irq.

Signed-off-by: Axel Lin <axel.lin@...>
---
 drivers/i2c/busses/i2c-jz4780.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index 19b2d68..f325663 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
 <at>  <at>  -764,12 +764,15  <at>  <at>  static int jz4780_i2c_probe(struct platform_device *pdev)
 	if (IS_ERR(i2c->clk))
 		return PTR_ERR(i2c->clk);

-	clk_prepare_enable(i2c->clk);
+	ret = clk_prepare_enable(i2c->clk);
+	if (ret)
+		return ret;

-	if (of_property_read_u32(pdev->dev.of_node, "clock-frequency",
-				 &clk_freq)) {
+	ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency",
+				   &clk_freq);
+	if (ret) {
 		dev_err(&pdev->dev, "clock-frequency not specified in DT");
-		return clk_freq;
+		goto err;
(Continue reading)

Axel Lin | 30 Jun 05:08 2015

[PATCH] i2c: xgene-slimpro: Fix missing mbox_free_channel call in probe error path

Free requested mailbox channel before return error.

Signed-off-by: Axel Lin <axel.lin@...>
---
 drivers/i2c/busses/i2c-xgene-slimpro.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-xgene-slimpro.c b/drivers/i2c/busses/i2c-xgene-slimpro.c
index dcca707..1c9cb65a 100644
--- a/drivers/i2c/busses/i2c-xgene-slimpro.c
+++ b/drivers/i2c/busses/i2c-xgene-slimpro.c
 <at>  <at>  -419,6 +419,7  <at>  <at>  static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
 	rc = i2c_add_adapter(adapter);
 	if (rc) {
 		dev_err(&pdev->dev, "Adapter registeration failed\n");
+		mbox_free_channel(ctx->mbox_chan);
 		return rc;
 	}

--

-- 
2.1.0

Matwey V. Kornilov | 29 Jun 20:14 2015
Picon

[PATCH v2] i2c-tools: Implement Module.mk for eeprog subdir

Move eeprog to separate subdir and implement Module.mk for it

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@...>
---
 eeprog/24cXX.c         | 185 ++++++++++++++++++++++++++++++++
 eeprog/24cXX.h         |  58 ++++++++++
 eeprog/Module.mk       |  67 ++++++++++++
 eeprog/README.eeprog   |  12 +++
 eeprog/eeprog.8        | 103 ++++++++++++++++++
 eeprog/eeprog.c        | 283 +++++++++++++++++++++++++++++++++++++++++++++++++
 eepromer/24cXX.c       | 185 --------------------------------
 eepromer/24cXX.h       |  58 ----------
 eepromer/Makefile      |   6 +-
 eepromer/README.eeprog |  12 ---
 eepromer/eeprog.8      | 103 ------------------
 eepromer/eeprog.c      | 283 -------------------------------------------------
 12 files changed, 710 insertions(+), 645 deletions(-)
 create mode 100644 eeprog/24cXX.c
 create mode 100644 eeprog/24cXX.h
 create mode 100644 eeprog/Module.mk
 create mode 100644 eeprog/README.eeprog
 create mode 100644 eeprog/eeprog.8
 create mode 100644 eeprog/eeprog.c
 delete mode 100644 eepromer/24cXX.c
 delete mode 100644 eepromer/24cXX.h
 delete mode 100644 eepromer/README.eeprog
 delete mode 100644 eepromer/eeprog.8
 delete mode 100644 eepromer/eeprog.c

diff --git a/eeprog/24cXX.c b/eeprog/24cXX.c
(Continue reading)

Gao Pandy | 29 Jun 09:27 2015

RE: [Patch v2] i2c: imx: add runtime pm support to improve the performance

Ping ... 

From: Gao Pan <b54642 <at> freescale.com> Sent: Thursday, June 18, 2015 5:28 PM
> To: wsa <at> the-dreams.de
> Cc: linux-i2c <at> vger.kernel.org; Li Frank-B20596; Duan Fugang-B38611; 
> Gao Pan-B54642; u.kleine-koenig <at> pengutronix.de
> Subject: [Patch v2] i2c: imx: add runtime pm support to improve the 
> performance
> 
> In our former i2c driver, i2c clk is enabled and disabled in xfer 
> function, which contributes to power saving. However, the clk enable 
> process brings a busy wait delay until the core is stable. As a 
> result, the performance is sacrificed.
> 
> To weigh the power consumption and i2c bus performance, runtime pm is 
> the good solution for it. The clk is enabled when a i2c transfer 
> starts, and disabled after a specifically defined delay.
> 
> Without the patch the test case (many eeprom reads) executes with approx:
> real 1m7.735s
> user 0m0.488s
> sys 0m20.040s
> 
> With the patch the same test case (many eeprom reads) executes with
> approx:
> real 0m54.241s
> user 0m0.440s
> sys 0m5.920s
> 
> From the test result, the patch get better performance.
(Continue reading)

Frkuska, Joshua | 29 Jun 08:36 2015

[RFC PATCH 1/1] i2c: core: add of_get_i2c_adapter_by_node

This adds of_get_i2c_adapter_by_node which both finds and properly
increments the adapter reference count.

This is different from of_find_i2c_device_by_node which does not
increment the adapter reference counter.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@...>
Signed-off-by: Joshua Frkuska <joshua_frkuska@...>
---
  drivers/i2c/i2c-core.c | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 987c124..97caec6 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
 <at>  <at>  -1347,6 +1347,26  <at>  <at>  struct i2c_adapter 
*of_find_i2c_adapter_by_node(struct device_node *node)
      return i2c_verify_adapter(dev);
  }
  EXPORT_SYMBOL(of_find_i2c_adapter_by_node);
+
+/* must call put_device() when done with returned i2c_adapter device */
+struct i2c_adapter *of_get_i2c_adapter_by_node(struct device_node *node)
+{
+    struct device *dev;
+    struct i2c_adapter *adapter;
+
+    dev = bus_find_device(&i2c_bus_type, NULL, node,
+                of_dev_node_match);
(Continue reading)

David Kessler | 28 Jun 02:08 2015

[PATCH] i2c-pnx: Adds support for repeated start i2c transactions

The i2c-pnx driver implements the i2c specification incorrectly. The
specification allows for 'repeated start' transactions in which the i2c
master generates two start conditions without generating a stop condition in
between them. However, the i2c-pnx driver always generates a stop condition
after every start condition. This patch correctly implements repeated start
transactions.
---
 drivers/i2c/busses/i2c-pnx.c | 88 ++++++++++++++++++++++++++++++++++----------
 include/linux/i2c-pnx.h      |  2 +
 2 files changed, 71 insertions(+), 19 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index e814a36..7bac253 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
 <at>  <at>  -139,20 +139,24  <at>  <at>  static int i2c_pnx_start(unsigned char slave_addr,
 	}

 	/* First, make sure bus is idle */
-	if (wait_timeout(alg_data)) {
-		/* Somebody else is monopolizing the bus */
-		dev_err(&alg_data->adapter.dev,
-			"%s: Bus busy. Slave addr = %02x, cntrl = %x, stat = %x\n",
-			alg_data->adapter.name, slave_addr,
-			ioread32(I2C_REG_CTL(alg_data)),
-			ioread32(I2C_REG_STS(alg_data)));
-		return -EBUSY;
-	} else if (ioread32(I2C_REG_STS(alg_data)) & mstatus_afi) {
-		/* Sorry, we lost the bus */
-		dev_err(&alg_data->adapter.dev,
(Continue reading)

Matwey V. Kornilov | 27 Jun 10:49 2015
Picon

[PATCH] i2c-tools: Implement Module.mk for eepromer subdir

eepromer/Module.mk has to be present in order to do
    make EXTRA=eepromer

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@...>
---
--- /dev/null
+++ i2c-tools-3.1.1/eepromer/Module.mk
 <at>  <at>  -0,0 +1,79  <at>  <at> 
+# eepromer
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+EEPROMER_DIR	:= eepromer
+
+EEPROMER_CFLAGS := -O2 -Iinclude -Wall 
+ifeq ($(USE_STATIC_LIB),1)
+EEPROMER_LDFLAGS	:= $(LIB_DIR)/$(LIB_STLIBNAME)
+else
+EEPROMER_LDFLAGS	:= -L$(LIB_DIR) -li2c
+endif
+
+EEPROMER_TARGETS	:= eepromer eeprom eeprog
+
+#
+# Programs
+#
+
(Continue reading)

Geert Uytterhoeven | 26 Jun 14:12 2015

[PATCH] i2c: I2C_MT65XX should depend on HAS_DMA

If NO_DMA=y:

    ERROR: "dma_unmap_single" [drivers/i2c/busses/i2c-mt65xx.ko] undefined!
    ERROR: "dma_mapping_error" [drivers/i2c/busses/i2c-mt65xx.ko] undefined!
    ERROR: "dma_map_single" [drivers/i2c/busses/i2c-mt65xx.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@...>
---
 drivers/i2c/busses/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 35ac23768ce9662f..577d58d1f1a19881 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
 <at>  <at>  -633,6 +633,7  <at>  <at>  config I2C_MPC
 config I2C_MT65XX
 	tristate "MediaTek I2C adapter"
 	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on HAS_DMA
 	help
 	  This selects the MediaTek(R) Integrated Inter Circuit bus driver
 	  for MT65xx and MT81xx.
--

-- 
1.9.1


Gmane