Danielle Costantino | 1 Oct 20:34 2014
Picon

[Proposal] PM sleep children of inactive I2C bus segments off Masters in multi-master systems

Currently I2C mux devices that support multiple master arbitration are
the i2c-mux-pca9541 and i2c-arb-gpio-challenge drivers. I propose to
add the ability to configure an interrupt pin from the Master Selector
device to indicate that bus ownership has been lost. Once the device
loses ownership, all of its children should enter a pm sleep mode (as
you can't talk to them at this point) until master-ship has been
reacquired.

This has come up as an issue when the master loses control over a bus
the return code of all transactions to its lave devices is EIO (not
very helpful).

Any comments would be appreciated, I am just looking if there is
interest in this.

Thanks,

--

-- 
- Danielle Costantino
Alexandru M Stan | 1 Oct 19:40 2014

[PATCH] i2c: rk3x: fix 0 length write transfers

i2cdetect -q was broken (everything was a false positive, and no transfers were
actually being sent over i2c). The way it works is by sending a 0 length write
request and checking for NACK. This patch fixes the 0 length writes and actually
sends them.

Reported-by: Doug Anderson <dianders@...>
Signed-off-by: Alexandru M Stan <amstan@...>
---
 drivers/i2c/busses/i2c-rk3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index b41d979..f486d0e 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
 <at>  <at>  -238,7 +238,7  <at>  <at>  static void rk3x_i2c_fill_transmit_buf(struct rk3x_i2c *i2c)
 	for (i = 0; i < 8; ++i) {
 		val = 0;
 		for (j = 0; j < 4; ++j) {
-			if (i2c->processed == i2c->msg->len)
+			if ((i2c->processed == i2c->msg->len) && (cnt != 0))
 				break;

 			if (i2c->processed == 0 && cnt == 0)
--

-- 
2.1.0.rc2.206.gedb03e5

Rajat Jain | 30 Sep 19:00 2014
Picon

Re: [PATCH 4/4] Documentation: Add documentation for the PCI switch PEX8xxx I2C driver

Thanks Danielle,

Yes, I can add this support (for PEX89xx devices) to this driver
subsequently. I'd however first wait for review comments on the
current code (with the devices it currently supports).

Thanks & Best Regards,

Rajat

On Tue, Sep 30, 2014 at 2:46 AM, Danielle Costantino
<danielle.costantino@...> wrote:
> I have also been working on a driver (userspace) for the plx89xx devices, If
> any of this code is useful in the development of the plx driver, feel free
> to include it.
>
> #define PLX_CMD_LEN 4
> #define PLX_CMD_I2C_READ 0x04
> #define PLX_CMD_I2C_WRITE 0x03
> #define PLX_CMD2_MASK 0x0f
> #define PLX_PORT_SEL_B1(port) (port >> 1)
> #define PLX_PORT_SEL_B0(port) ((port & 1) << 7)
> #define PLX_CMD3_EN_ALL_BYTES 0x3c
> #define PLX_REG_MASK 0xffc
> #define PLX_REGISTER_ADDR(addr) ((uint16_t)((addr & PLX_REG_MASK) >> 2))
> #define PLX_REGISTER_ADDR_CMD3(addr) ((uint8_t)((PLX_REGISTER_ADDR(addr) >>
> 8) & 0x3))
> #define PLX_REGISTER_ADDR_CMD4(addr) ((uint8_t)(PLX_REGISTER_ADDR(addr) &
> 0xff))
>
(Continue reading)

Zhangfei Gao | 30 Sep 14:20 2014

[PATCH v3 0/3] i2c: hix5hd2: add i2c controller driver

v3:
Add COMPILE_TEST as dependence to enable compile test
Remove specific mach info in dts binding to solve the confusion.

v2: 
Modify according to Wolfram's comments 
including change vector name, coding style, return value etc.

Wei Yan (2):
  i2c: hix5hd2: add devicetree documentation
  i2c: hix5hd2: add i2c controller driver

Zhangfei Gao (1):
  ARM: dts: hix5hd2: add i2c node

 .../devicetree/bindings/i2c/i2c-hix5hd2.txt        |   25 +
 arch/arm/boot/dts/hisi-x5hd2.dtsi                  |   60 +++
 drivers/i2c/busses/Kconfig                         |   10 +
 drivers/i2c/busses/Makefile                        |    1 +
 drivers/i2c/busses/i2c-hix5hd2.c                   |  554 ++++++++++++++++++++
 5 files changed, 650 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hix5hd2.txt
 create mode 100644 drivers/i2c/busses/i2c-hix5hd2.c

--

-- 
1.7.9.5

Soroka A, Anna | 30 Sep 03:55 2014
Picon

Microsoft


Your-email-won-£1,000.000.00.From-Microsoft/Yahoo-Email-lottery-SEND-NAME,ADDRESS,TEL-NO:.To-barr.jenniferbrown@...
Zhangfei Gao | 28 Sep 06:22 2014

[PATCH v2 0/3] i2c: hix5hd2: add i2c controller driver

v2: 
Modify according to Wolfram's comments 
including change vector name, coding style, return value etc.

Wei Yan (2):
  i2c: hix5hd2: add devicetree documentation
  i2c: hix5hd2: add i2c controller driver

Zhangfei Gao (1):
  ARM: dts: hix5hd2: add i2c node

 .../devicetree/bindings/i2c/i2c-hix5hd2.txt        |   31 ++
 arch/arm/boot/dts/hisi-x5hd2.dtsi                  |   60 +++
 drivers/i2c/busses/Kconfig                         |   10 +
 drivers/i2c/busses/Makefile                        |    1 +
 drivers/i2c/busses/i2c-hix5hd2.c                   |  555 ++++++++++++++++++++
 5 files changed, 657 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hix5hd2.txt
 create mode 100644 drivers/i2c/busses/i2c-hix5hd2.c

--

-- 
1.7.9.5

Addy Ke | 27 Sep 09:11 2014

[PATCH v2] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

From: Addy <addy.ke@...>

As show in I2C specification:
- Standard-mode: the minimum HIGH period of the scl clock is 4.0us
                 the minimum LOW period of the scl clock is 4.7us
- Fast-mode: the minimum HIGH period of the scl clock is 0.6us
             the minimum LOW period of the scl clock is 1.3us

I have measured i2c SCL waveforms in fast-mode by oscilloscope
on rk3288-pinky board. the LOW period of the scl clock is 1.3us.
It is so critical that we must adjust LOW division to increase
the LOW period of the scl clock.

After put this patch, we can find that min_low_ns is about
5.4us in Standard-mode and 1.6us in Fast-mode.

Thanks Doug for the suggestion about division formulas.

Signed-off-by: Addy <addy.ke@...>
---
Changes in v2:
- remove Fast-mode plus and HS-mode
- use new formulas suggested by Doug

 drivers/i2c/busses/i2c-rk3x.c | 104 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 97 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index e637c32..81672a8 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
(Continue reading)

Wolfram Sang | 25 Sep 20:41 2014
Picon

[PULL REQUEST] i2c for 3.17

Linus,

this is probably not the kind of pull request you want to see that late
in the cycle. Yet, the ACPI refactorization was problematic again and
caused another two issues which need fixing. My holidays with limited
internet (plus travelling) and the developer's illness didn't help
either :(

The details:

- ACPI code was refactored out into a seperate file and as a
  side-effect, the i2c-core module got renamed. Jean Delvare rightfully
  complained about the rename being problematic for distributions. So,
  Mika and I thought the least problematic way to deal with it is to move
  all the code back into the main i2c core source file. This is mainly a
  huge code move with some #ifdeffery applied. No functional code changes.
  Our personal tests and the testbots did not find problems. (I was
  thinking about reverting, too, yet that would also have ~800 lines
  changed)

- The new ACPI code also had a NULL pointer exception, thanks to Peter
  for finding and fixing it.

- Mikko fixed a locking problem by decoupling clock_prepare and
  clock_enable.

- Addy learnt that the datasheet was wrong and reimplemented the
  frequency setup according to the new algorithm.

- Fan fixed an off-by-one error when copying data
(Continue reading)

Yuan Yao | 25 Sep 10:11 2014

[PATCH v8 0/2] i2c: imx: add DMA support for freescale i2c driver


Changed in v8:
- some minor fixes for coding style.
- unsetting I2CR_DMAEN immediatelly when failed in DMA mode.

Changed in v7:
- when  waiting for transfer complete use schedule() instead of udelay().

Changed in v6:
- changed the inappropriate print message.
- rebase to the latest code.

Changed in v5:
- add "*chan_dev = dma->chan_using->device->dev" for code cleanup.
- add the test logs.

Changed in v4:
- cancelled  "i2c_imx->use_dma".
- changed "Dma" to "DMA".
- add Timeout handling  for Transfer complete.

Changed in v3:
- fix a bug when request the dma faild.
- some minor fixes for coding style.
- other minor fixes.

Changed in v2:
- remove has_dma_support property
- unify i2c_imx_dma_rx and i2c_imx_dma_tx
- unify i2c_imx_dma_read and i2c_imx_pio_read
(Continue reading)

Muthu Mani | 25 Sep 07:51 2014

[PATCH v2 3/3] gpio: add support for Cypress CYUSBS234 USB-GPIO adapter

Adds support for USB-GPIO interface of Cypress Semiconductor
CYUSBS234 USB-Serial Bridge controller.

The GPIO get/set can be done through vendor command on control endpoint.

Details about the device can be found at:
http://www.cypress.com/?rID=84126

Signed-off-by: Muthu Mani <muth@...>
Signed-off-by: Rajaram Regupathy <rera@...>
---
 drivers/gpio/Kconfig          |  13 +++
 drivers/gpio/Makefile         |   1 +
 drivers/gpio/gpio-cyusbs23x.c | 182 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 196 insertions(+)
 create mode 100644 drivers/gpio/gpio-cyusbs23x.c

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 9de1515..932e07c 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
 <at>  <at>  -886,6 +886,19  <at>  <at>  config GPIO_BCM_KONA

 comment "USB GPIO expanders:"

+config GPIO_CYUSBS23X
+	tristate "CYUSBS23x GPIO support"
+	depends on MFD_CYUSBS23X && USB
+	help
+	  Say yes here to access the GPIO signals of Cypress
(Continue reading)

Wolfram Sang | 24 Sep 23:36 2014
Picon

[PATCH v2] i2c: move acpi code back into the core

Commit 5d98e61d337c ("I2C/ACPI: Add i2c ACPI operation region support")
renamed the i2c-core module. This may cause regressions for
distributions, so put the ACPI code back into the core.

Reported-by: Jean Delvare <jdelvare@...>
Signed-off-by: Wolfram Sang <wsa@...>
Cc: Mika Westerberg <mika.westerberg@...>
Cc: Lan Tianyu <tianyu.lan@...>
Cc: Jean Delvare <jdelvare@...>
---

v2: - make all acpi functions static
    - annotate #endif
    - remove declarations in i2c.h
    - add dummy functions to i2c-core.c
    - make two seperate #ifdef blocks instead of two nested ones
      (otherwise build errors due to no external decl. anymore)

Mika, Lan, Jean: please test/review. I am still waiting for some testbot
results, yet your audit is very wanted.

 MAINTAINERS            |   1 -
 drivers/i2c/Makefile   |   5 +-
 drivers/i2c/i2c-acpi.c | 364 -------------------------------------------------
 drivers/i2c/i2c-core.c | 354 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/i2c.h    |  16 ---
 5 files changed, 355 insertions(+), 385 deletions(-)
 delete mode 100644 drivers/i2c/i2c-acpi.c

diff --git a/MAINTAINERS b/MAINTAINERS
(Continue reading)


Gmane