Michael Lawnick | 24 Oct 13:25 2014
Picon
Picon

Q: i2c-mux-pca954x.c : How to get deselect activated via device tree?

Hi,

there is means to unselect I2C multiplexer pca954x after every transfer.
I've now run into situation where I need this feature: When two 
multiplexers are on same bus and they host devices with same address.

I could not yet find out from documentation or sources how to get 
deselect feature enabled:

i2c-mux-pca954x.c:pca954x_probe()
...
			i2c_add_mux_adapter(adap, &client->dev, client,
				force, num, class, pca954x_select_chan,
				(pdata && pdata->modes[num].deselect_on_exit)
					? pca954x_deselect_mux : NULL);
...

How to initialize pdata->modes[num].deselect_on_exit?
Some attribute in device tree should do the trick, shouldn't it?

Has anybody a useful hint?

--

-- 
KR
Michael
Wenyou Yang | 24 Oct 08:50 2014

[PATCH v3 0/3] i2c/at91: add support PM functions

Hi Wolfram,

The patches is to add the PM functions support for the at91 i2c controller.

It is based on the i2c/for-next branch of 
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git.

Best Regards,
Wenyou Yang

------
Change log:
v2.0

According to the advice from Kevin Hilman, 
1./ Wrap the runtime suspend/resume functions in CONFIG_PM instead of CONFIG_PM_RUNTIME.
2./ Call the runtime suspend/resume functions directly in the system suspend/resume.

v3.0
   Covert the system suspend/resume to suspend_noirq/resume_noirq.

Wenyou Yang (3):
  i2c/at91: add support for runtime PM
  i2c/at91: add support for system PM
  i2c/at91: adopt pinctrl support

 drivers/i2c/busses/i2c-at91.c |   71 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 65 insertions(+), 6 deletions(-)

--

-- 
(Continue reading)

John de la Garza | 22 Oct 22:05 2014

Re: [PATCH 1/2] i2c: Add generic support passing secondary devices addresses

instead of:

+	np = client->dev.of_node;
+
+	if (np) {
+		i = of_property_match_string(np, "reg-names", name);
+		if (i >= 0)
+			of_property_read_u32_index(np, "reg", i, &addr);
+		else if (default_addr != 0)
+			addr = default_addr;
+		else
+			addr = NULL;
+	} else {
+		addr = default_addr;
+	}

how about making the middle part like this to remove the repeated code

	np = client->dev.of_node;
	addr = default_addr;

	if (np) {
		i = of_property_match_string(np, "reg-names", name);
		if (i >= 0)
			of_property_read_u32_index(np, "reg", i, &addr);
		else if (default_addr == 0)
			addr = NULL;
	}

(Continue reading)

John de la Garza | 22 Oct 19:35 2014

i2c-dev not showing up on MacBookPro6,2

I have my kernel built with dev-i2c and i2c_i801 but do not have
a /dev entry.

kernel ver:
Linux vega 3.18.0-rc1+ #71 SMP Wed Oct 22 00:49:21 EDT 2014 x86_64 GNU/Linux

lspci -nn  shows this:
00:1f.3 SMBus [0c05]: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller [8086:3b30] (rev 06)

dmesg shows this:
[    1.566003] i801_smbus 0000:00:1f.3: enabling device (0000 -> 0003)

ls /sys/bus/i2c/devices/ shows nothing...

on running this on a MacBookPro6,2

What am I missing?  Shouldn't I see a i2c device?  I think SMBus is
a subset of i2c and I should be able to use that subset, right?

Danielle Costantino | 21 Oct 09:05 2014
Picon

[PATCH] i2c: mpc: Report correct I2C error codes on Freescale MPC i2c bus driver

From: Danielle Costantino <danielle.costantino@...>

This patch enforces correct I2C error returned codes from Freescale's
MPC i2c bus driver, allowing for proper user-space/kernel error
handling.

Signed-off-by: Danielle Costantino <danielle.costantino@...>
---
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 0edf630..66bef28 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
 <at>  <at>  -124,7 +124,7  <at>  <at> 
 static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
 {
  unsigned long orig_jiffies = jiffies;
- u32 x;
+ u32 cmd_err;
  int result = 0;

  if (!i2c->irq) {
 <at>  <at>  -137,7 +137,7  <at>  <at> 
  break;
  }
  }
- x = readb(i2c->base + MPC_I2C_SR);
+ cmd_err = readb(i2c->base + MPC_I2C_SR);
  writeb(0, i2c->base + MPC_I2C_SR);
  } else {
  /* Interrupt mode */
(Continue reading)

Wenyou Yang | 21 Oct 04:26 2014

[PATCH v2 0/3] i2c/at91: add support PM functions

Hi Wolfram,

The patches is to add the PM functions support for the at91 i2c controller.

It is based on the i2c/for-next branch of 
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git.

Best Regards,
Wenyou Yang

------
Change log:
v2.0

According to the advice from Kevin Hilman, 
1./ Wrap the runtime suspend/resume functions in CONFIG_PM instead of CONFIG_PM_RUNTIME.
2./ Call the runtime suspend/resume functions directly in the system suspend/resume.

Wenyou Yang (3):
  i2c/at91: add support for runtime PM
  i2c/at91: add support for system PM
  i2c/at91: adopt pinctrl support

 drivers/i2c/busses/i2c-at91.c |   74 ++++++++++++++++++++++++++++++++++++-----
 1 file changed, 66 insertions(+), 8 deletions(-)

--

-- 
1.7.9.5

(Continue reading)

Ezequiel Garcia | 20 Oct 20:23 2014
Picon

[RESEND/PATCH] i2c: pxa: Use suspend() and resume() instead of the _noirq hooks

The _noirq were previously chosen to make sure all the users of the
adapter were suspended by the time the adapter itself enters the
suspended state.

The {suspend,resume}_noirq usage was converted from an earlier
implementation based on suspend_late and resume_early on this commit:

commit 57f4d4f1b72983f8c76e2f232e064730aeffe599
Author: Magnus Damm <damm@...>
Date:   Wed Jul 8 13:22:39 2009 +0200

    I2C: Rework i2c-pxa suspend_late()/resume_early()

However, all the I2C devices are probed as children of its I2C adapter,
and hence the device model guarantees they are suspended before its parent, and
resumed after it.

In other words, there's no need to use the _noirq hooks to get a suspend/resume
device/adapter order.

This commit changes this by using the suspend/resume PM hooks in the I2C
adapter.

Signed-off-by: Ezequiel Garcia <ezequiel@...>
---
Tested on a PXA CM-X300 board with a vendor-provided patch to make
suspend/resume work properly.

Now that the merge window is closed, I'm resending this rebased on
v3.18-rc1.
(Continue reading)

Octavian Purdila | 15 Oct 22:03 2014
Picon

[PATH v3 0/4] i2c: show and change bus frequency via sysfs

This patch series adds support to show and change the bus frequency
via sysfs, by exposing files to show the minimum, maximum and current
frequency as well as allowing the frequency to be changed. This allows
the user to view or change the bus frequency on a per bus level.

Changes since v3:

 * use DEVICE_ATTR_RO and make i2c_adapter_visible_attr static

 * implement sysfs bus frequency support for the diolan u2c bus

Octavian Purdila (4):
  i2c: document the existing i2c sysfs ABI
  i2c: document struct i2c_adapter
  i2c: show and change bus frequency via sysfs
  i2c: i2c-diolan-u2c: sysfs bus frequency support

 Documentation/ABI/testing/sysfs-bus-i2c | 75 +++++++++++++++++++++++++++
 drivers/i2c/busses/i2c-diolan-u2c.c     | 49 ++++++++++++------
 drivers/i2c/i2c-core.c                  | 90 +++++++++++++++++++++++++++++++++
 include/linux/i2c.h                     | 32 ++++++++++--
 4 files changed, 228 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c

--

-- 
1.9.1

Jiri Prchal | 14 Oct 13:53 2014
Picon

[PATCH v2] misc: eeprom: add driver for Cypress FRAM

This patch adds driver for Cypress FRAMs on SPI bus, such as FM25V05, FM25V10
etc.
Reworked from at25 driver:
- simplified writing since data are written without erasing and waiting to
finish write cycle
- add reading device ID and choose size and addr len from it
- add serial number reading and exporting it to sysfs

Signed-off-by: Jiri Prchal <jiri.prchal@...>
---
v2: changed upon Varka Bhadram coments

 drivers/misc/eeprom/Kconfig  |  11 +
 drivers/misc/eeprom/Makefile |   1 +
 drivers/misc/eeprom/fm25.c   | 499 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 511 insertions(+)

diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
index 9536852f..aee6a73 100644
--- a/drivers/misc/eeprom/Kconfig
+++ b/drivers/misc/eeprom/Kconfig
 <at>  <at>  -38,6 +38,17  <at>  <at>  config EEPROM_AT25
 	  This driver can also be built as a module.  If so, the module
 	  will be called at25.

+config FRAM_FM25
+	tristate "SPI Cypress FRAM"
+	depends on SPI && SYSFS
+	help
+	  Enable this driver to get read/write support to SPI FRAMs,
(Continue reading)

Jiri Prchal | 14 Oct 11:23 2014
Picon

[PATCH] misc: eeprom: add driver for Cypress FRAM

This patch adds driver for Cypress FRAMs on SPI bus, such as FM25V05, FM25V10
etc.
Reworked from at25 driver:
- simplified writing since data are written without erasing and waiting to
finish write cycle
- add reading device ID and choose size and addr len from it
- add serial number reading and exporting it to sysfs

Signed-off-by: Jiri Prchal <jiri.prchal@...>
---
 drivers/misc/eeprom/Kconfig  |  11 +
 drivers/misc/eeprom/Makefile |   1 +
 drivers/misc/eeprom/fm25.c   | 500 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 512 insertions(+)

diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
index 9536852f..aee6a73 100644
--- a/drivers/misc/eeprom/Kconfig
+++ b/drivers/misc/eeprom/Kconfig
 <at>  <at>  -38,6 +38,17  <at>  <at>  config EEPROM_AT25
 	  This driver can also be built as a module.  If so, the module
 	  will be called at25.

+config FRAM_FM25
+	tristate "SPI Cypress FRAM"
+	depends on SPI && SYSFS
+	help
+	  Enable this driver to get read/write support to SPI FRAMs,
+	  after you configure the board init code to know about each fram
+	  on your target board.
(Continue reading)

Ezequiel Garcia | 13 Oct 18:44 2014
Picon

[RFC/PATCH] i2c: pxa: Use suspend() and resume() instead of the _noirq hooks

The _noirq were previously chosen to make sure all the users of the
adapter were suspended by the time the adapter itself enters the
suspended state.

The {suspend,resume}_noirq usage was converted from an earlier
implementation based on suspend_late and resume_early:

commit 57f4d4f1b72983f8c76e2f232e064730aeffe599
Author: Magnus Damm <damm@...>
Date:   Wed Jul 8 13:22:39 2009 +0200

    I2C: Rework i2c-pxa suspend_late()/resume_early()

However, all the I2C devices are probed as children of its I2C adapter,
and hence the device model guarantees they get suspended before its
parent and resumed after it.

In other words, there's no need to use the _noirq hooks to get a
suspend/resume device/adapter order.

This commit changes this by using the suspend/resume PM hooks in the I2C
adapter.

Signed-off-by: Ezequiel Garcia <ezequiel@...>
---
 drivers/i2c/busses/i2c-pxa.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index be671f7..3be19b36 100644
(Continue reading)


Gmane