Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-12 Thread Wolfram Sang
Why do you want DT to be involved at all? Imagine a device which supports both, slave or master mode. The driver needs to know in which mode it should operate. This cannot be hard coded, because on different boards, different modes can be used. Okay, it sounds weird to me that a

Re: [RFC 0/4] i2c: slave support framework for Linux devices

2014-09-12 Thread Wolfram Sang
- If I understand correctly you cannot register an i2c slave without also registering a master, right? I don't think this is troubling in practice, is it? For abstraction I would prefer to make these different concepts though. You need to register an adapter, yes. It does not need

Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-12 Thread Wolfram Sang
ok, take our embedded controller driver (in staging/nvec) as an example. It's basicly an MFD connecting keyboard, mouse, power, gpio, and some other stuff to the soc. The MFD operates in master mode while the SOC is the I2C slave. Theoretically, these roles could also switch (but that's

Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-12 Thread Wolfram Sang
DT pseudocode: i2c { compatible = nvidia, tegra-i2c; ec-slave@42 { compatible = nvidia, ax100-ec-slave; reg = 0x42; }; }; So distinguishing between drivers

Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-12 Thread Wolfram Sang
Am I missing something? Board properties can be encoded within the compatible entries (ax100-ec, ax200-ec...). I'd think this means mostly different protocols, though. well, ac100 is the name of the board and nvec is the name of the protocol. Yes, the driver could be named nvec, yet

Re: [PATCH 2/8] i2c: Add the ability to match device to compatible string without an of_node

2014-09-12 Thread Wolfram Sang
On Thu, Aug 28, 2014 at 03:35:32PM +0100, Lee Jones wrote: A great deal of I2C devices are currently matched via DT node name, and as such the compatible naming convention of 'vendor,device' has gone somewhat awry - some nodes don't supply one, some supply an arbitrary string and others the

Re: [PATCH RESEND 0/8] i2c: Relax mandatory I2C ID table passing

2014-09-12 Thread Wolfram Sang
On Thu, Aug 28, 2014 at 03:35:30PM +0100, Lee Jones wrote: Hi Wolfram, Placing this firmly back on your plate. I truly hope we don't miss another merge-window. This patch-set has the support of some pretty senior kernel maintainers, so I hope acceptance shouldn't be too difficult. As

Re: [PATCH 6/8] i2c: Provide a temporary .probe2() call-back type

2014-09-12 Thread Wolfram Sang
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 79b674d..c8240e5 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -125,7 +125,8 @@ extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client, * struct i2c_driver - represent an I2C device driver

Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-11 Thread Wolfram Sang
On Thu, Sep 11, 2014 at 02:17:16PM +0200, Marc Dietrich wrote: cc'ing: devicetree Thanks, I forgot that! -iic1 { +i2c1 { status = ok; - pinctrl-0 = iic1_pins; + pinctrl-0 = i2c1_pins; pinctrl-names = default; + + eeprom@64 { + compatible =

Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-11 Thread Wolfram Sang
b) could be seen as a configuration thing since the functionality backend could be changed at runtime even. Come to think of it, not only the functionality, also the address can be changed at runtime. This makes me think it should really not be in DT after all. People will probably find out

Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-11 Thread Wolfram Sang
On Thu, Sep 11, 2014 at 04:52:22PM +0200, Marc Dietrich wrote: Am Donnerstag, 11. September 2014, 16:40:04 schrieb Wolfram Sang: b) could be seen as a configuration thing since the functionality backend could be changed at runtime even. Come to think of it, not only the functionality

[RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

2014-09-09 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com Not for upstream! Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- arch/arm/boot/dts/r8a7790-lager.dts | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b

[RFC 0/4] i2c: slave support framework for Linux devices

2014-09-09 Thread Wolfram Sang
is good enough to discuss the steps taken here. The patches are based on top of 3.17-rc4, but will easily apply to renesas/devel. A git tree can be found here: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/slave-support Comments welcome! Thanks, Wolfram Wolfram Sang (4

[RFC 3/4] i2c: rcar: add slave support

2014-09-09 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- drivers/i2c/busses/i2c-rcar.c | 122 ++ 1 file changed, 113 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/busses/i2c-rcar.c b

[RFC 2/4] i2c: slave: add eeprom simulator driver

2014-09-09 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- drivers/i2c/Kconfig| 10 +++ drivers/i2c/Makefile | 1 + drivers/i2c/i2c-slave-eeprom.c | 152 + 3 files changed

Re: [RFC 2/4] i2c: slave: add eeprom simulator driver

2014-09-09 Thread Wolfram Sang
+config I2C_SLAVE_EEPROM + bool I2C eeprom slave driver This should be tristate. Fixed in my branch. signature.asc Description: Digital signature

[PULL REQUEST] i2c for 3.17

2014-09-05 Thread Wolfram Sang
Linus, here are I2C driver bugfixes for the 3.17 release. Details can be found in the commit messages, yet I think this is typical driver stuff. Please pull. Thanks, Wolfram The following changes since commit 69e273c0b0a3c337a521d083374c918dc52c666f: Linux 3.17-rc3 (2014-08-31 18:23:04

Re: [PATCH v2] Revert i2c: rcar: remove spinlock

2014-09-04 Thread Wolfram Sang
On Sun, Aug 24, 2014 at 12:44:09AM +0400, Sergei Shtylyov wrote: This reverts commit 150b8be3cda54412ad7b54f5392b513b25c0aaa7. The I2C core's per-adapter locks can't protect from IRQs, so the driver still needs a spinlock to protect the register accesses. Signed-off-by: Sergei Shtylyov

Re: [PATCH] i2c-rcar: fix MNR interrupt handling

2014-09-02 Thread Wolfram Sang
On Tue, Sep 02, 2014 at 01:15:26AM +0400, Sergei Shtylyov wrote: Sometimes the MNR and MST interrupts happen simultaneously (stop automatically follows NACK, according to the manuals) and in such case the ID_NACK flag isn't set since the MST interrupt handling precedes MNR and all

Re: [PATCH v2] i2c: mv64xxx: continue probe when clock-frequency is missing

2014-09-02 Thread Wolfram Sang
On Mon, Sep 01, 2014 at 10:28:13PM +0800, Chen-Yu Tsai wrote: The clock-frequency DT property is listed as optional, However, the current code stores the return value of of_property_read_u32 in the return code of mv64xxx_of_config, but then forgets to clear it after setting the default value

Re: [PATCH] i2c: imx: Add arbitration lost check

2014-09-02 Thread Wolfram Sang
--- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -268,6 +268,14 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy) while (1) { temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR); + + /** check for arbitration

Re: [PATCH v4] i2c: rk3x: fix bug that cause transfer fails in master receive mode

2014-09-02 Thread Wolfram Sang
On Sat, Aug 23, 2014 at 02:00:52AM +0800, Addy Ke wrote: In rk3x SOC, the I2C controller can receive/transmit up to 32 bytes data in one chunk, so the size of data to be write/read to/from TXDATAx/RXDATAx must be less than or equal 32 bytes at a time. Tested on rk3288-pinky board, elan

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-09-02 Thread Wolfram Sang
On Fri, Aug 15, 2014 at 10:18:15AM -0600, Stephen Warren wrote: On 08/15/2014 03:47 AM, Mikko Perttunen wrote: Currently the i2c-tegra bus driver prepares, enables and set_rates its clocks separately for each transfer. This causes locking problems when doing I2C transfers from clock

Re: [PATCH v2] Revert i2c: rcar: remove spinlock

2014-09-02 Thread Wolfram Sang
As I understood from your previous mail, a plain revert is less broken but still broken. Applying a correct fix is my preferred way. Actually, from the -stable kernel perspective, a single patch would complicate backporting. So could you please reconsider? I don't see why. If we have

Re: [PATCH v2] Revert i2c: rcar: remove spinlock

2014-09-02 Thread Wolfram Sang
I don't see why. If we have two patches, the state inbetween them is broken. Even so, it has always been broken, we don't make it more broken by reverting your change. Yes. Still, if I send something to *stable*, less broken is not an option for me, if I know there is a fix possible.

[PATCH 0/3] WIP: i2c slave support

2014-09-02 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com I am currently working on the long standing issue of slave support for the I2C framework. Here is a very rough first draft, so you can see what path I chose. Three big things are still missing: documentation, a driver supporting the hooks

[PATCH 1/3] WIP: i2c core changes for slave support

2014-09-02 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com Not for upstream yet. Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- drivers/i2c/i2c-core.c| 42 ++ include/linux/i2c-slave.h | 28 include/linux/i2c.h

[PATCH 2/3] WIP: sketch of an slave-eeprom simulator

2014-09-02 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com Not for upstream yet. Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- drivers/i2c/i2c-slave-eeprom.c | 140 + 1 file changed, 140 insertions(+) create mode 100644 drivers/i2c/i2c-slave

[PATCH 3/3] WIP: adapt dts for i2c slave use

2014-09-02 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com not for upstream yet. Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- arch/arm/boot/dts/r8a7790-lager.dts | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts

Re: [PATCH] i2c-designware: Add support for ACPI i2c device

2014-08-29 Thread Wolfram Sang
On Fri, Aug 29, 2014 at 11:09:12AM +0800, Carl Peng wrote: AMD platform i2c bus controllers are ACPI devices, this patch is to add a ACPI glue for Designware core, make it support i2c bus controller with ACPI interface. Signed-off-by: Carl Peng carlpeng...@gmail.com

Re: [PATCH RESEND 0/8] i2c: Relax mandatory I2C ID table passing

2014-08-29 Thread Wolfram Sang
Hi Lee, Placing this firmly back on your plate. I truly hope we don't miss another merge-window. Nope, we won't. I'll still need a week or so due to other duties. This patch-set has the support of some pretty senior kernel maintainers, so I hope acceptance shouldn't be too difficult.

Re: ARM: shmobile: i2cm vs. iicn DT nodes and pinmux

2014-08-29 Thread Wolfram Sang
On Wed, Aug 13, 2014 at 09:19:43AM +0200, Geert Uytterhoeven wrote: Hi Wolfram, On Tue, Aug 12, 2014 at 11:47 PM, Wolfram Sang w...@the-dreams.de wrote: On Tue, Aug 12, 2014 at 03:11:18PM +0200, Geert Uytterhoeven wrote: On r8a7790, DT device nodes and C/DT pinmux data for IICn are called

Re: [PATCH v2] Revert i2c: rcar: remove spinlock

2014-08-25 Thread Wolfram Sang
Ah, I misunderstood you. However, I don't quite understand why you want to combine revert and the mentioned updates... As I understood from your previous mail, a plain revert is less broken but still broken. Applying a correct fix is my preferred way. signature.asc Description: Digital

Re: [PATCH v2] Revert i2c: rcar: remove spinlock

2014-08-24 Thread Wolfram Sang
On Sun, Aug 24, 2014 at 12:44:09AM +0400, Sergei Shtylyov wrote: This reverts commit 150b8be3cda54412ad7b54f5392b513b25c0aaa7. The I2C core's per-adapter locks can't protect from IRQs, so the driver still needs a spinlock to protect the register accesses. Looks to me like a plain revert.

Re: [PATCH v2] Revert i2c: rcar: remove spinlock

2014-08-24 Thread Wolfram Sang
You told me to do 2 patches, one of them just revert. No no, I asked for one patch having both, see: ... feel free to send one patch with the revert and the updates you mentioned. for the follow up patch, I need to think a bit more, so all in a good time. OK, I'll wait for the proper

Re: Trickle charging for rtc-bq32k

2014-08-22 Thread Wolfram Sang
_But_ this should probably be enabled using device tree entry, right? Unfortunately, the driver is i2c driver, not platform one, so I don't see how to do that easily... Trickle charging is usually depending on the hardware setup, so devicetree is actually a good place to put it. We'd just

Re: [PATCH 08/11] i2c: rcar: remove spinlock

2014-08-22 Thread Wolfram Sang
The i2c core has per-adapter locks, so no need to protect again. The core's lock is unable to protect from the IRQs. So I'm proposing to revert this patch. It's a pity I hadn't noticed this issue when the patch was posted. Yes, you are right. I noticed a while ago, too, but then got

Re: [PATCH v3 0/7] i2c: Relax mandatory I2C ID table passing

2014-08-22 Thread Wolfram Sang
Sure thing, yet I won't make it for 3.17, sadly :( It has high priority for 3.18, though. Do you want me to re-send now the -rc1 had been released? I think this version will do for an initial review. Thanks, Wolfram signature.asc Description: Digital signature

Re: [PATCH] i2c: rk3x: fix bug that cause transfer fails in master receive mode

2014-08-21 Thread Wolfram Sang
On Thu, Aug 21, 2014 at 10:04:31PM +0400, Sergei Shtylyov wrote: Hello. On 08/21/2014 09:50 PM, Addy Ke wrote: In rk3x SOC, the I2C controller can receive/transmit up to 32 bytes data in one transaction, so the size of data to be write/read to/from TXDATAx/RXDATAx must be less than or

Re: [PATCH] i2c: rk3x: fix bug that cause transfer fails in master receive mode

2014-08-21 Thread Wolfram Sang
Actually, reads with 32 bytes of data are possible with the controller. The hw returns the data in 32 byte chunks. Our chunk handling code is just buggy. Understood. Then, I'd prefer 'chunk' in the commit message instead of 'transaction'. signature.asc Description: Digital signature

Re: [PATCH 1/2] I2C: EMMA Mobile I2C master driver

2014-08-21 Thread Wolfram Sang
I happen to have access to a kzm9d board meanwhile. Do you have the board enablement patches still somewhere? Ping. Did you get this one? signature.asc Description: Digital signature

Re: [PATCH] i2c: designware: deduce speed mode from device tree setting

2014-08-20 Thread Wolfram Sang
With the patch i2c designware add support of I2C standard mode I already proposed: - I2C standard mode is selected with 100kHz clock frequency. - I2C fast mode is selected with 400kHy clock frequency. - EINVAL error is returned if clock frequency is not 10 and not 40. You forgot to

Re: [PATCH] i2c: designware: deduce speed mode from device tree setting

2014-08-20 Thread Wolfram Sang
+ + ret = of_property_read_u32(pdev-dev.of_node, + clock-frequency, bus_rate); + if (!ret (bus_rate = 10)) + speed = DW_IC_CON_SPEED_STD; This looks a bit odd. If the device only supports two particular

[PULL REQUEST] i2c for 3.17

2014-08-20 Thread Wolfram Sang
I2C_ACPI Wolfram Sang (1): MAINTAINERS: add maintainer for ACPI parts of I2C MAINTAINERS | 7 +++ drivers/i2c/Kconfig | 15 ++- drivers/i2c/Makefile | 2 +- drivers/i2c/busses/i2c-i801.c | 2 ++ drivers/i2c/i2c-acpi.c| 2

Re: [PATCH V2] I2C: Rework kernel config I2C_ACPI

2014-08-19 Thread Wolfram Sang
On Fri, Aug 15, 2014 at 01:38:59PM +0800, Lan Tianyu wrote: Commit da3c6647(I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI config) adds a new kernel config I2C_ACPI and make I2C core built in when the config is selected. This is wrong because distributions etc generally compile I2C

Re: [PATCH] i2c: i801: Add PCI ID for Intel Braswell

2014-08-19 Thread Wolfram Sang
On Tue, Aug 19, 2014 at 05:37:28PM +0300, Mika Westerberg wrote: From: Alan Cox a...@linux.intel.com The SMBus host controller is the same as used in Baytrail so add the new PCI ID to the driver's list of supported IDs. Signed-off-by: Alan Cox a...@linux.intel.com Signed-off-by: Mika

Re: [PATCH] i2c: imx: double check IIF in case interrupt lost

2014-08-19 Thread Wolfram Sang
On Fri, Aug 15, 2014 at 09:18:14AM +0200, Uwe Kleine-König wrote: Hello, On Fri, Aug 15, 2014 at 02:14:15AM +, fugang.d...@freescale.com wrote: I am sorry to tell you I don't have the reproduced platform for the issue since the Issue was found at one platform of customer of

Re: [PATCH] I2C/ACPI: Fix possible ZERO_SIZE_PTR pointer dereferencing error.

2014-08-19 Thread Wolfram Sang
On Tue, Aug 12, 2014 at 10:33:38AM +0800, Xiubo Li wrote: Since we cannot make sure the 'data_len' will always be none zero here, and then if 'data_len' equals to zero, the kzalloc() will return ZERO_SIZE_PTR, which equals to ((void *)16). I assume the read request with length == 0 comes

[PATCH] MAINTAINERS: add maintainer for ACPI parts of I2C

2014-08-19 Thread Wolfram Sang
Mika has done great work in that field, so let people know. Signed-off-by: Wolfram Sang w...@the-dreams.de --- Mika: What do you think? Your help is very valuable and I'd like to make that official :) MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b

Re: [PATCH] MAINTAINERS: add maintainer for ACPI parts of I2C

2014-08-19 Thread Wolfram Sang
On Tue, Aug 19, 2014 at 06:31:14PM +0300, Mika Westerberg wrote: On Tue, Aug 19, 2014 at 10:16:21AM -0500, Wolfram Sang wrote: Mika has done great work in that field, so let people know. Signed-off-by: Wolfram Sang w...@the-dreams.de --- Mika: What do you think? Your help is very

Re: [PATCH] I2C/ACPI: Fix possible ZERO_SIZE_PTR pointer dereferencing error.

2014-08-19 Thread Wolfram Sang
On Tue, Aug 19, 2014 at 06:16:49PM +0300, Mika Westerberg wrote: On Tue, Aug 19, 2014 at 10:03:55AM -0500, Wolfram Sang wrote: On Tue, Aug 12, 2014 at 10:33:38AM +0800, Xiubo Li wrote: Since we cannot make sure the 'data_len' will always be none zero here, and then if 'data_len' equals

Re: [PATCH 1/2] regmap: Add eplicit dependencies to catch select misuse

2014-08-17 Thread Wolfram Sang
to find out which module did the offending select. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org Acked-by: Wolfram Sang w...@the-dreams.de signature.asc Description: Digital signature

Re: [PATCH V2] I2C: Rework kernel config I2C_ACPI

2014-08-15 Thread Wolfram Sang
On Fri, Aug 15, 2014 at 01:38:59PM +0800, Lan Tianyu wrote: Commit da3c6647(I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI config) adds a new kernel config I2C_ACPI and make I2C core built in when the config is selected. This is wrong because distributions etc generally compile I2C

Re: i2c access from kernel

2014-08-14 Thread Wolfram Sang
Hi, The first argument to i2c_transfer is pointer to struct i2c_adapter, which is very complex struct to fill !! You should never fill it yourself. This is the job of the i2c-core. If I know, for example, the exact bus number, is there some way I can get the i2c_adapter pointer to that bus

Re: [PATCH] I2C: Make I2C core able to be module when I2C_ACPI is selected.

2014-08-14 Thread Wolfram Sang
True, but only the I2C OpRegion parts needs to have I2C=y. Does it make sense to name ACPI_I2C to ACPI_I2C_OPREGION (or something like that) and only enable it when I2C=y? Then we would have ACPI I2C enumeration still in place. Yes, this makes sense to me. I will rewrite the patch.

Re: ARM: shmobile: i2cm vs. iicn DT nodes and pinmux

2014-08-12 Thread Wolfram Sang
On Tue, Aug 12, 2014 at 03:11:18PM +0200, Geert Uytterhoeven wrote: Hi, On r8a7790, DT device nodes and C/DT pinmux data for IICn are called iicn, with DT aliases from i2cm to the iicn DT nodes. On r8a7791, DT device nodes and C/DT pinmux data for IICn are called i2cm, with DT aliases from

Re: [PATCH] I2C: Make I2C core able to be module when I2C_ACPI is selected.

2014-08-12 Thread Wolfram Sang
On Tue, Aug 12, 2014 at 12:53:21PM +0300, Mika Westerberg wrote: On Mon, Aug 11, 2014 at 03:00:55PM +0800, Lan Tianyu wrote: Commit da3c6647(I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI config) adds a new kernel config I2C_ACPI and make I2C core built in when the config is

[PULL REQUEST] i2c for 3.17

2014-08-09 Thread Wolfram Sang
: always enable HSI2C Uwe Kleine-König (1): i2c: efm32: correct namespacing of location property Vincent Palatin (1): i2c: s3c2410: resume the I2C controller earlier Wolfram Sang (19): i2c: s6000: remove duplicate driver i2c: scx200: drop GPIO based i2c driver i2c: add

Re: i2c: removal of s6000 driver

2014-08-09 Thread Wolfram Sang
Hi Daniel, After exchanging some mails with Stretch (now Exar), it is still uncertain if the Linux port ever made it into a product. Thanks for keeping at it! The good news is that Exar doesn't mind me sharing the overlay. You can download it from this page: http://www.emlix.com/download/

Re: [PATCH] i2c: qup: disable clks and return instead of just returning error

2014-08-09 Thread Wolfram Sang
. So this patch adds a statement to jump to the fail lable to release the clocks. CC: Wolfram Sang w...@the-dreams.de CC: Grant Likely grant.lik...@linaro.org CC: Bjorn Andersson bjorn.anders...@sonymobile.com CC: Andy Gross agr...@codeaurora.org CC: Ivan T. Ivanov iiva...@mm-sol.com

Re: [PATCH] i2c: rk3x: fix interrupt handling issue

2014-08-08 Thread Wolfram Sang
On Fri, Aug 08, 2014 at 05:41:40PM +0800, Addy Ke wrote: If slave holds scl, I2C_IPD[7] will be set 1 by controller for debugging. Driver must ignore it. [5.752391] rk3x-i2c ff16.i2c: unexpected irq in WRITE: 0x80 [5.939027] rk3x-i2c ff16.i2c: timeout, ipd: 0x80, state: 4

Re: [PATCH 1/14] i2c: mpc: delete unneeded test before of_node_put

2014-08-08 Thread Wolfram Sang
On Fri, Aug 08, 2014 at 12:07:42PM +0200, Julia Lawall wrote: From: Julia Lawall julia.law...@lip6.fr Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows:

Re: [PATCH v6 1/2] i2c: imx: add DMA support for freescale i2c driver

2014-08-06 Thread Wolfram Sang
static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs) run checkpatch.pl on this patch... Sorry for my code style. I will match open parenthesis in this case. FYI, I am not strict on the open parenthesis thingie. signature.asc

Re: [PATCH] i2c: remove unnecessary 'else' after 'return' statement

2014-08-06 Thread Wolfram Sang
On Wed, Aug 06, 2014 at 12:36:05PM +0530, Kiran Padwal wrote: Fix the following warning reported by checkpatch.pl: WARNING: else is not generally useful after a break or return Signed-off-by: Kiran Padwal kiran.pad...@smartplayin.com Technically true, yet I think the original code is a tad

Re: [PATCHv2] i2c: i2c-imx: Fix format warning for dev_dbg

2014-08-06 Thread Wolfram Sang
On Wed, Aug 06, 2014 at 11:45:08AM +0800, Xiubo Li wrote: drivers/i2c/busses/i2c-imx.c: In function i2c_imx_probe() drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument of type unsigned int, but argument 4 has type resource_size_t [-Wformat=] dev_dbg(i2c_imx-adapter.dev,

Re: [PATCH 0/5] i2c: rcar: add renesas,i2c-rcar-gen1/gen2 in DT compatible

2014-08-06 Thread Wolfram Sang
generation level compatible for i2c ARM: shmobile: r8a7779: add generation level compatible for i2c ARM: shmobile: r8a7790: add generation level compatible for i2c ARM: shmobile: r8a7791: add generation level compatible for i2c All patches: Acked-by: Wolfram Sang wsa+rene...@sang

Re: [PATCH 1/1] i2c: Kconfig: Enable HSI2C for Exynos5 platform

2014-08-04 Thread Wolfram Sang
On Wed, Jun 25, 2014 at 03:32:03PM +0530, Sachin Kamat wrote: All Exynos5 platforms have HSI2C controllers and are needed by various IPs connected to the boards based on these SoCs. Thus select this by default for Exynos5 platforms. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com Cc:

Re: i2c,designware: add new bindings

2014-08-02 Thread Wolfram Sang
In PCI enumeration you have 808622C1, 808622C2, 808622C3 etc but if ACPI enumerated then 808622C1 #1, 808622C1 #2, 8086 22C1 #3 etc Hope that makes sense ? Yup, thanks! signature.asc Description: Digital signature

Re: i2c,designware: add new bindings

2014-08-02 Thread Wolfram Sang
On Wed, Jul 23, 2014 at 01:06:57PM +0100, Alan Cox wrote: 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 a...@linux.intel.com Applied to for-next, thanks!

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

2014-08-02 Thread Wolfram Sang
Hi, res = platform_get_resource(dev, IORESOURCE_MEM, 0); irq = platform_get_irq(dev, 0); - if (res == NULL || irq 0) { - ret = -ENODEV; - goto eclk; - } + if (res == NULL || irq 0) + return -ENODEV; No need to check for valid

Re: [PATCH/RFC V8 1/1] clk: Support for clock parents and rates assigned from device tree

2014-08-01 Thread Wolfram Sang
. Yes, Acks from SPI and I2C maintainers would be good. I might need to drop those parts of this patch if they don't come through :-( For the I2C part: Acked-by: Wolfram Sang w...@the-dreams.de signature.asc Description: Digital signature

Re: [PATCH 1/1] i2c: Kconfig: Enable HSI2C for Exynos5 platform

2014-08-01 Thread Wolfram Sang
On Fri, Jul 25, 2014 at 05:06:32PM +0530, Sachin Kamat wrote: On Wed, Jul 16, 2014 at 11:10 PM, Wolfram Sang w...@the-dreams.de wrote: On Wed, Jun 25, 2014 at 10:55:31AM -0700, Doug Anderson wrote: Sachin, On Wed, Jun 25, 2014 at 3:02 AM, Sachin Kamat sachin.ka...@samsung.com wrote

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

2014-08-01 Thread Wolfram Sang
On Wed, Jul 23, 2014 at 05:44:07PM +0200, Maxime COQUELIN wrote: 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

Re: i2c,designware: add new bindings

2014-08-01 Thread Wolfram Sang
Hi Alan, On Wed, Jul 23, 2014 at 01:06:57PM +0100, Alan Cox wrote: 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 a...@linux.intel.com ---

Re: [PATCH v2] i2c: pca954x: put the mux to disconnected state after resume

2014-08-01 Thread Wolfram Sang
On Fri, Jul 25, 2014 at 07:57:46PM +0800, Jisheng Zhang wrote: pca954x may be power lost during suspend, so after resume we also suffer the issue fixed by commit cd823db8b1161ef0d756514d280715a576d65cc3, pca954x power-on default is channel 0 connected. If multiple pca954x muxes are

Re: [PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3

2014-08-01 Thread Wolfram Sang
for this is overkill, yet I don't really mind. Acked-by: Wolfram Sang w...@the-dreams.de I assume this goes via MFD, let me know if I should take it. + /** * struct ec_i2c_device - Driver data for I2C tunnel * @@ -290,6 +292,7 @@ static int ec_i2c_probe(struct platform_device *pdev) bus

Re: [PATCH] i2c-gpio: Drop dead code in i2c_gpio_remove

2014-08-01 Thread Wolfram Sang
Cc: Violeta Menendez violeta.menen...@codethink.co.uk Cc: Ian Molton ian.mol...@codethink.co.uk Cc: Wolfram Sang w...@the-dreams.de Applied to for-next, thanks! signature.asc Description: Digital signature

Vacation

2014-07-24 Thread Wolfram Sang
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 -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message

[PATCH 1/2] drivers/i2c/busses: use correct type for dma_map/unmap

2014-07-21 Thread Wolfram Sang
dma_{un}map_* uses 'enum dma_data_direction' not 'enum dma_transfer_direction'. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-at91.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c

[PATCH 0/2] use correct type for dma_map/unmap

2014-07-21 Thread Wolfram Sang
I recently stumbled over the fact that the Atmel I2C driver used a wrong enum for mapping dma, so I wrote a hackish coccinelle script to check the rest of the kernel. Luckily, only those two were found. Wolfram Sang (2): drivers/i2c/busses: use correct type for dma_map/unmap drivers/tty

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

2014-07-21 Thread Wolfram Sang
Sorry for the late reply, but it took time to get the answer. No problem, thanks for keeping at it. Which also came from the HW guys? Please ask for details why 10%, too. This is a safety margin. I understood that. Still why 10%? Is it randomly guessed? Was 5% the first working value, so

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

2014-07-18 Thread Wolfram Sang
With this clarified, Wolfram, what is is that you do not understand? Dunno anymore, probably the confusion confused me :) signature.asc Description: Digital signature

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

2014-07-18 Thread Wolfram Sang
.) In that case, we must shorten the transfer so that it does not exceed the address space. Signed-off-by: Jean Delvare jdelv...@suse.de Cc: Guenter Roeck li...@roeck-us.net Cc: Wolfram Sang w...@the-dreams.de Applied to for-next, thanks! signature.asc Description: Digital signature

Re: I2C Slave monitor mode support

2014-07-18 Thread Wolfram Sang
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?

Re: [PATCH 1/2] I2C: EMMA Mobile I2C master driver

2014-07-18 Thread Wolfram Sang
On Tue, Jun 17, 2014 at 11:57:24AM +0200, Wolfram Sang wrote: On Tue, Feb 18, 2014 at 06:38:43PM +0100, Wolfram Sang wrote: On Tue, Sep 03, 2013 at 05:49:29PM +0100, Ian Molton wrote: Add a driver for the EMMA mobile I2C block. The driver supports low and high-speed interrupt driven

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

2014-07-17 Thread Wolfram Sang
One possibility is to switch to tabs and shift all columns (but the first) by 4 to the right. This rules out the addition of a column in the future, but otherwise fulfills your desire. I'd like that. Plus, I am not so strict with the 80 char limit. If there is another feature, then be it on

Re: [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment

2014-07-17 Thread Wolfram Sang
On Thu, Jun 26, 2014 at 10:44:58AM +0530, Naveen Krishna Chatradhi wrote: This patch does the following in exynos5_i2c_message_start() function 1. Fixes an assignment As, i2c_auto_conf is initialized to '0' at the beginning of the function and HSI2C_READ_WRITE is defined as (1u 16)

Re: [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register

2014-07-17 Thread Wolfram Sang
On Thu, Jun 26, 2014 at 10:44:57AM +0530, Naveen Krishna Chatradhi wrote: This patch removes an extra read of FIFO_STATUS register in the interrrupt service routine. Which is read again before the actual use. Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com Applied to for-next,

Re: [PATCH 1/5] i2c: Don't start transfers when suspended

2014-07-17 Thread Wolfram Sang
Hi Bastian, On Sat, Jul 12, 2014 at 01:49:27PM +0200, Bastian Hecht wrote: i2c transfer requests come in very uncontrolled, like from interrupt routines. We might be suspended when this happens. To avoid i2c timeouts caused by powered down busses we check for suspension. Signed-off-by:

Re: [PATCH v3 0/7] i2c: Relax mandatory I2C ID table passing

2014-07-17 Thread Wolfram Sang
On Thu, Jul 17, 2014 at 11:23:42AM +0100, Lee Jones wrote: Hi Wolfram, Are you going to take a lot at this set? Sure thing, yet I won't make it for 3.17, sadly :( It has high priority for 3.18, though. signature.asc Description: Digital signature

Re: [PATCH 1/5] i2c: Don't start transfers when suspended

2014-07-17 Thread Wolfram Sang
On Thu, Jul 17, 2014 at 03:00:48PM +0200, Wolfram Sang wrote: Hi Bastian, On Sat, Jul 12, 2014 at 01:49:27PM +0200, Bastian Hecht wrote: i2c transfer requests come in very uncontrolled, like from interrupt routines. We might be suspended when this happens. To avoid i2c timeouts caused

Re: [PATCH] i2c: i2c-st: Use %pa to print 'resource_size_t' type

2014-07-17 Thread Wolfram Sang
On Thu, Jul 10, 2014 at 08:23:25PM -0300, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com When building multi_v7_defconfig with CONFIG_ARM_LPAE=y the following warning is seen: drivers/i2c/busses/i2c-st.c:818:2: warning: format '%x' expects argument of type

Re: [PATCH v2] i2c: efm32: correct namespacing of location property

2014-07-17 Thread Wolfram Sang
On Fri, Jul 11, 2014 at 10:50:14AM +0200, Uwe Kleine-König wrote: Olof Johansson pointed out that usually the company name is picked as namespace prefix to specific properties. So expect energymicro,location but fall back to the previously introduced name efm32,location. Cc: Olof Johansson

Re: [PATCH v3] i2c: stub: Add support for SMBus block commands

2014-07-17 Thread Wolfram Sang
On Thu, Jul 17, 2014 at 09:56:03AM -0700, Guenter Roeck wrote: SMBus block commands are different to I2C block commands since the returned data is not normally accessible with byte or word commands on other command offsets. Add linked list of 'block' commands to support those commands.

Re: [PATCH 1/2] i2c-stub: Remember the number of emulated chips

2014-07-17 Thread Wolfram Sang
On Thu, Jul 10, 2014 at 12:45:11PM +0200, Jean Delvare wrote: This makes initialization, cleanup and look-up easier. Signed-off-by: Jean Delvare jdelv...@suse.de Cc: Guenter Roeck li...@roeck-us.net Applied to for-next, thanks! signature.asc Description: Digital signature

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

2014-07-17 Thread Wolfram Sang
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 jdelv...@suse.de Cc: Guenter Roeck li...@roeck-us.net Cc: Wolfram Sang w

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

2014-07-17 Thread Wolfram Sang
On Thu, Jul 17, 2014 at 03:04:41PM +0200, Jean Delvare wrote: Signed-off-by: Jean Delvare jdelv...@suse.de Cc: James Ralston james.d.rals...@intel.com Cc: Wolfram Sang w...@the-dreams.de Applied to for-next, thanks! signature.asc Description: Digital signature

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

2014-07-17 Thread Wolfram Sang
alignment. Signed-off-by: Jean Delvare jdelv...@suse.de Cc: James Ralston james.d.rals...@intel.com Cc: Wolfram Sang w...@the-dreams.de Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH] i2c: s6000: remove duplicate driver

2014-07-16 Thread Wolfram Sang
On Wed, Jul 09, 2014 at 04:25:23PM +0200, Wolfram Sang wrote: It turned out that the s6000 simply has a designware IP core and should use the designated driver for it which is way more maintained and feature complete. There are currently no users in tree, and not even a toolchain for s6000

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

2014-07-16 Thread Wolfram Sang
On Wed, Jul 09, 2014 at 04:27:09PM +0200, Wolfram Sang wrote: This driver is marked as deprecated since the pre-git era. Any user left(?) should really have switched to i2c-gpio meanwhile. Signed-off-by: Wolfram Sang w...@the-dreams.de Applied to for-next, thanks! signature.asc

<    9   10   11   12   13   14   15   16   17   18   >