Rudolf Marek | 18 May 2013 00:46
Picon

[PATCH] i2c-piix4 - Add support for secondary SMBus on AMD SB800 and AMD FCH chipsets

Hello all,

Attached patch adds support for secondary SMBus of AMD SB800 and new AMD FCH 
chipsets. The base address of secondary SMBus is different from SB700 and it is 
stored on similar place as SB800 primary SMBus.

More verbose info:

Probing function was just modified to read the SMBus base from address 0x28 or 
from original 0x2c. The secondary bus does not provide IRQ information.

I think the SB700 has same secondary controller, so revision/IRQ information 
should not be printed too. This can be fixed in some other patch.

Chipset datasheet can be found here: 
http://support.amd.com/us/Embedded_TechDocs/45482.pdf

Tested on SB800 and FCH boards.

Tested-by: Paul Menzel <paulepanter@...>
ASRock E350M1 with SB800

Signed-off-by: Rudolf Marek <r.marek@...>

Thanks
Rudolf
Attachment (i2c-piix4.patch): text/x-diff, 2945 bytes
Alexander Sverdlin | 17 May 2013 14:56

[PATCH] i2c: suppress lockdep warning on delete_device

i2c: suppress lockdep warning on delete_device

Since commit 846f99749ab68bbc7f75c74fec305de675b1a1bf the following lockdep
warning is thrown in case i2c device is removed (via delete_device sysfs
attribute) which contains subdevices (e.g. i2c multiplexer):

=============================================
[ INFO: possible recursive locking detected ]
3.8.7-0-sampleversion-fct #8 Tainted: G           O
---------------------------------------------
bash/3743 is trying to acquire lock:
  (s_active#110){++++.+}, at: [<ffffffff802b3048>] sysfs_hash_and_remove+0x58/0xc8

but task is already holding lock:
  (s_active#110){++++.+}, at: [<ffffffff802b3cb8>] sysfs_write_file+0xc8/0x208

other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(s_active#110);
   lock(s_active#110);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

4 locks held by bash/3743:
  #0:  (&buffer->mutex){+.+.+.}, at: [<ffffffff802b3c3c>] sysfs_write_file+0x4c/0x208
(Continue reading)

Dirk Reske | 16 May 2013 23:13
Picon

i2c beginner question

Hallo,

I have to collect data from multiple external i2c devices.
My question is, what is the correct way?

1: Open i2-device-file, set slave address, read data, close i2c device 
file and go on with the next one
2: keep the i2c device file open all the time, and change slave address 
before every access to device
3: ???

greets
Dirk
Russell King | 15 May 2013 16:33
Picon

[PATCH] I2C-mv64xxx.c: work around signals causing I2C transactions to be aborted

Do not use interruptible waits in an I2C driver; if a process uses
signals (eg, Xorg uses SIGALRM and SIGPIPE) then these signals can
cause the I2C driver to abort a transaction in progress by another
driver, which can cause that driver to fail.  I2C drivers are not
expected to abort transactions on signals.

Cc: <stable@...>
Signed-off-by: Russell King <rmk+kernel@...>
Tested-by: Russell King <rmk+kernel@...>
---
Mark Greer seems to be unreachable now; the address in this driver no
longer works, and there is no maintainer entry.  This patch has been
run on my Cubox (Marvell Dove) for quite a number of months without
ill effect.

 drivers/i2c/busses/i2c-mv64xxx.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 2e9d567..44d8045 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
 <at>  <at>  -252,7 +252,7  <at>  <at>  mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data)
 		writel(drv_data->cntl_bits,
 			drv_data->reg_base + MV64XXX_I2C_REG_CONTROL);
 		drv_data->block = 0;
-		wake_up_interruptible(&drv_data->waitq);
+		wake_up(&drv_data->waitq);
 		break;

(Continue reading)

Jean Delvare | 15 May 2013 14:44
Gravatar

[PATCH] i2c-i801: Document feature bits in modinfo

Duplicate the feature bits documentation in modinfo, as not every user
will read the driver's source code or documentation file.

Signed-off-by: Jean Delvare <khali@...>
---
 drivers/i2c/busses/i2c-i801.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- linux-3.10-rc1.orig/drivers/i2c/busses/i2c-i801.c	2013-04-29 02:36:01.000000000 +0200
+++ linux-3.10-rc1/drivers/i2c/busses/i2c-i801.c	2013-05-15 12:42:11.573297161 +0200
 <at>  <at>  -231,7 +231,11  <at>  <at>  static const char *i801_feature_names[]

 static unsigned int disable_features;
 module_param(disable_features, uint, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(disable_features, "Disable selected driver features");
+MODULE_PARM_DESC(disable_features, "Disable selected driver features:\n"
+	"\t\t  0x01  disable SMBus PEC\n"
+	"\t\t  0x02  disable the block buffer\n"
+	"\t\t  0x08  disable the I2C block read functionality\n"
+	"\t\t  0x10  don't use interrupts ");

 /* Make sure the SMBus host is ready to start transmitting.
    Return 0 if it is, -EBUSY if it is not. */

--

-- 
Jean Delvare
Mika Westerberg | 14 May 2013 13:07
Picon

Re: [PATCH v7] i2c-designware: make SDA hold time configurable

On Tue, Apr 09, 2013 at 12:59:54PM +0200, Christian Ruppert wrote:
> This patch makes the SDA hold time configurable through device tree.
> 
> Signed-off-by: Christian Ruppert <christian.ruppert@...>
> Signed-off-by: Pierrick Hascoet <pierrick.hascoet@...>

Hi Wolfram,

What happened to this patch? I don't see it merged for 3.10.

The reason I'm asking is that I would like to add ACPI support for the SDA
hold time parameter analogous to the DT version.

Thanks.

> ---
>  .../devicetree/bindings/i2c/i2c-designware.txt     |   14 ++++++++++++++
>  drivers/i2c/busses/i2c-designware-core.c           |    5 +++++
>  drivers/i2c/busses/i2c-designware-core.h           |    1 +
>  drivers/i2c/busses/i2c-designware-platdrv.c        |    9 +++++++++
>  4 files changed, 29 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> index e42a2ee..21fabe7 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
>  <at>  <at>  -10,6 +10,9  <at>  <at>  Recommended properties :
>  
>   - clock-frequency : desired I2C bus clock frequency in Hz.
>  
(Continue reading)

Linus Walleij | 13 May 2013 22:18
Favicon

[PATCH v2] i2c: core: make it possible to match a pure device tree driver

This tries to address an issue found when writing an MFD driver
for the Nomadik STw481x PMICs: as the platform is using device
tree exclusively I want to specify the driver matching like
this:

static const struct of_device_id stw481x_match[] = {
	{ .compatible = "st,stw4810", },
	{ .compatible = "st,stw4811", },
	{},
};

static struct i2c_driver stw481x_driver = {
	.driver = {
		.name	= "stw481x",
		.of_match_table = stw481x_match,
	},
	.probe		= stw481x_probe,
	.remove		= stw481x_remove,
};

However that turns out not to be possible: the I2C probe code
is written so that the probe() call is always passed a match
from i2c_match_id() using non-devicetree matches.

This is probably why most devices using device tree for I2C
clients currently will pass no .of_match_table *at all* but
instead just use .id_table from struct i2c_driver to match
the device. As you realize that means that the whole idea with
compatible strings is discarded, and that is why we find strange
device tree I2C device compatible strings like "product" instead
(Continue reading)

Mika Westerberg | 13 May 2013 12:54
Picon

[PATCH 1/2] i2c-designware: always clear interrupts before enabling them

If the I2C bus is put to a low power state by an ACPI method it might pull
the SDA line low (as its power is removed). Once the bus is put to full
power state again, the SDA line is pulled back to high. This transition
looks like a STOP condition from the controller point-of-view which sets
STOP detected bit in its status register causing the driver to fail
subsequent transfers.

Fix this by always clearing all interrupts before we start a transfer.

Signed-off-by: Mika Westerberg <mika.westerberg@...>
---
 drivers/i2c/busses/i2c-designware-core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
index 21fbb34..7a89ca5 100644
--- a/drivers/i2c/busses/i2c-designware-core.c
+++ b/drivers/i2c/busses/i2c-designware-core.c
 <at>  <at>  -383,7 +383,8  <at>  <at>  static void i2c_dw_xfer_init(struct dw_i2c_dev *dev)
 	/* Enable the adapter */
 	__i2c_dw_enable(dev, true);

-	/* Enable interrupts */
+	/* Clear and enable interrupts */
+	i2c_dw_clear_int(dev);
 	dw_writel(dev, DW_IC_INTR_DEFAULT_MASK, DW_IC_INTR_MASK);
 }

--

-- 
1.7.10.4
(Continue reading)

Linus Walleij | 13 May 2013 00:26
Favicon

[PATCH] i2c: core: make it possible to match a pure device tree driver

This tries to address an issue found when writing an MFD driver
for the Nomadik STw481x PMICs: as the platform is using device
tree exclusively I want to specify the driver matching like
this:

static const struct of_device_id stw481x_match[] = {
	{ .compatible = "st,stw4810", },
	{ .compatible = "st,stw4811", },
	{},
};

static struct i2c_driver stw481x_driver = {
	.driver = {
		.name	= "stw481x",
		.of_match_table = stw481x_match,
	},
	.probe		= stw481x_probe,
	.remove		= stw481x_remove,
};

However that turns out not to be possible: the I2C probe code
is written so that the probe() call is always passed a match
from i2c_match_id() using non-devicetree matches.

This is probably why most devices using device tree for I2C
clients currently will pass no .of_match_table *at all* but
instead just use .id_table from struct i2c_driver to match
the device. As you realize that means that the whole idea with
compatible strings is discarded, and that is why we find strange
device tree I2C device compatible strings like "product" instead
(Continue reading)

Tony Prisk | 12 May 2013 11:23
Picon

[PATCH] i2c: vt8500: Add support for I2C bus on Wondermedia SoCs

This patch adds support for the I2C bus controllers found on Wondermedia
8xxx-series SoCs. Only master-mode is supported.

Signed-off-by: Tony Prisk <linux@...>
---
 .../devicetree/bindings/i2c/i2c-vt8500.txt         |   24 +
 MAINTAINERS                                        |    1 +
 drivers/i2c/busses/Kconfig                         |   10 +
 drivers/i2c/busses/Makefile                        |    1 +
 drivers/i2c/busses/i2c-wmt.c                       |  488 ++++++++++++++++++++
 5 files changed, 524 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-vt8500.txt
 create mode 100644 drivers/i2c/busses/i2c-wmt.c

diff --git a/Documentation/devicetree/bindings/i2c/i2c-vt8500.txt b/Documentation/devicetree/bindings/i2c/i2c-vt8500.txt
new file mode 100644
index 0000000..94a425e
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-vt8500.txt
 <at>  <at>  -0,0 +1,24  <at>  <at> 
+* Wondermedia I2C Controller
+
+Required properties :
+
+ - compatible : should be "wm,wm8505-i2c"
+ - reg : Offset and length of the register set for the device
+ - interrupts : <IRQ> where IRQ is the interrupt number
+ - clocks : phandle to the I2C clock source
+
+Optional properties :
(Continue reading)

oksana87739 | 12 May 2013 10:49
Picon

презент устроен поражать

   Заходите по ссылке: http://snurl.com/270kbc4 Всякий отпрыск
будет счастлив унаследовать этакой дар. 

 

Gmane