[PATCH 0/4] platform: fix accidently erasing .owner

2014-10-20 Thread Wolfram Sang
in the kernel tree will come tomorrow as a seperate pull request. Wolfram Sang (4): core: platform: add warning if driver has no owner core: platform: let platform_driver_probe initialize module owner core: platform: let platform_create_bundle initialize module owner coccinelle: api: add spatch

[PATCH 2/4] core: platform: let platform_driver_probe initialize module owner

2014-10-20 Thread Wolfram Sang
init. Fix it by using a similar #define construct to obtain THIS_MODULE and pass it on later. Reported-by: Russell King rmk+ker...@arm.linux.org.uk Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/base/platform.c | 11 ++- include/linux/platform_device.h | 6 -- 2

[PATCH 3/4] core: platform: let platform_create_bundle initialize module owner

2014-10-20 Thread Wolfram Sang
core instead of the module init. Fix it by using a similar #define construct to obtain THIS_MODULE and pass it on later. Reported-by: Russell King rmk+ker...@arm.linux.org.uk Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/base/platform.c | 11 ++- include/linux

[PATCH 4/4] coccinelle: api: add spatch to prevent unnecessary .owner

2014-10-20 Thread Wolfram Sang
There are calls which silently set the owner of a module. This is the preferred way [1], so avoid setting it manually. Currently, we only care about platform drivers, but there might be more calls to be added later. [1] https://lkml.org/lkml/2014/10/12/87 Signed-off-by: Wolfram Sang w

[PULL REQUEST] remove .owner for most platform_drivers

2014-10-21 Thread Wolfram Sang
to 79cd1762933153237731585f0901eec368e54bae: ALSA: sparc: drop owner assignment from platform_drivers (2014-10-20 16:22:16 +0200) Wolfram Sang (299): ARM: common: drop owner assignment from platform_drivers ARM: mach

Re: [PATCH] treewide: Fix typo in Documentation/DocBook/device-drivers

2014-10-22 Thread Wolfram Sang
comments in source, so I have to fix comments in the source. Signed-off-by: Masanari Iida standby2...@gmail.com I can pick this up, I guess. But I'll copy the relevant subsystem maintainers just in case they would rather carry the changes themselves. For I2C: Acked-by: Wolfram Sang w

[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 v3] i2c documentation: rename variable register to reg

2014-08-27 Thread Wolfram Sang
identifier or '(' before '=' token __u8 register = 0x20; /* Device register to access */ ^ Rename the variable register to simply reg in the example code. Signed-off-by: Jose Alarcon Roldan jose.alarcon.rol...@gmail.com Acked-by: Wolfram Sang w...@the-dreams.de

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: [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: [PATCH] i2c: fix a potential kmemleak of adapter device

2014-10-07 Thread Wolfram Sang
On Mon, Dec 23, 2013 at 09:47:09AM +0800, Gu Zheng wrote: Hi Wolfram, On 12/21/2013 01:31 AM, Wolfram Sang wrote: On Wed, Dec 18, 2013 at 09:18:08AM +0800, Gu Zheng wrote: When running with the latest kernel, we get the following kmemleak message: unreferenced object 0x8800c2a36100

Re: [PATCH] i2c: fix a potential kmemleak of adapter device

2014-10-07 Thread Wolfram Sang
Okay, there was another thread about it with more details. Still, this patch addresses the problem on the wrong level. No driver should mess with driver core basics. signature.asc Description: Digital signature

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

2014-10-08 Thread Wolfram Sang
On Wed, Oct 08, 2014 at 06:30:14AM +, Yao Yuan wrote: -Original Message- From: Wolfram Sang [mailto:w...@the-dreams.de] Sent: Friday, October 03, 2014 3:55 PM To: Yuan Yao-B46683 Cc: ma...@denx.de; l...@karo-electronics.de; mark.rutl...@arm.com; Duan Fugang-B38611; shawn

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

2014-10-02 Thread Wolfram Sang
Reviewed-By: Max Schwarz max.schw...@online.de Tested-By: Max Schwarz max.schw...@online.de Checkpatch says: WARNING: 'Tested-by:' is the preferred signature form Same 'Reviewed-by:' signature.asc Description: Digital signature

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

2014-10-02 Thread Wolfram Sang
On Wed, Oct 01, 2014 at 10:40:41AM -0700, Alexandru M Stan wrote: 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

Re: [PATCH v2 0/3] i2c: designware: Add support for AMD I2C controller

2014-10-02 Thread Wolfram Sang
On Tue, Sep 30, 2014 at 01:04:52PM +0300, Mika Westerberg wrote: This is second iteration of the patch series. First version is here: http://patchwork.ozlabs.org/patch/390694/ http://patchwork.ozlabs.org/patch/390695/ In order to get source clock to the core driver we need some way of

Re: [PATCH v6 2/4] i2c: add support for Diolan DLN-2 USB-I2C adapter

2014-10-02 Thread Wolfram Sang
Hi, diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 2ac87fa..6afc17e 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -1021,4 +1021,14 @@ config SCx200_ACB This support is also available as a module. If so, the module

Re: [PATCH] i2c: qup: Fix order of runtime pm initialization

2014-10-02 Thread Wolfram Sang
On Mon, Sep 29, 2014 at 05:00:51PM -0500, Andy Gross wrote: The runtime pm calls need to be done before populating the children via the i2c_add_adapter call. If this is not done, a child can run into issues trying to do i2c read/writes due to the pm_runtime_sync failing. Signed-off-by: Andy

Re: [PATCH 1/2] i2c: exynos: add support for HSI2C module on Exynos7

2014-10-02 Thread Wolfram Sang
field in the variant struct to distinguish the hardware. 2. Updates the dt-new compatible in dt-binding documenation Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com Cc: Wolfram Sang w...@the-dreams.de Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH 2/2] i2c: exynos5: Add Kconfig dependencies

2014-10-02 Thread Wolfram Sang
On Tue, Sep 16, 2014 at 03:03:18PM +0530, Naveen Krishna Chatradhi wrote: The i2c-exynos5.c driver can be reused for the HSI2C controller on Exynos7 SoCs from Samsung. This patch adds the Kconfig dependency to choose i2c-exynos5.c for CONFIG_ARCH_EXYNOS7. Signed-off-by: Naveen Krishna

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

2014-10-03 Thread Wolfram Sang
Hi, thanks for this submission. Here is my review. On Thu, Sep 25, 2014 at 04:11:28PM +0800, Yuan Yao wrote: Add dma support for i2c. This function depend on DMA driver. You can turn on it by write both the dmas and dma-name properties in dts node. DMA is optional, even DMA request

Re: [PATCH v2] i2c: axxia: Add I2C driver for AXM55xx

2014-10-03 Thread Wolfram Sang
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 2ac87fa..8983474 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -77,6 +77,17 @@ config I2C_AMD8111 This driver can also be built as a module. If so, the module will be

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

2014-10-03 Thread Wolfram Sang
Ok, looks like there are two main differences in the two implementations. 1) The ACPI one uses a integer index and the DT one uses a string index to lookup the device. The problem with the index lookup is that the order is binding specific. So it might be different between e.g. the

Re: [PATCH v3] i2c: axxia: Add I2C driver for AXM55xx

2014-10-03 Thread Wolfram Sang
On Fri, Oct 03, 2014 at 01:08:02PM +0200, Anders Berg wrote: Add I2C bus driver for the controller found in the LSI Axxia family SoCs. The driver implements 10-bit addressing and SMBus transfer modes via emulation (including SMBus block data read). Signed-off-by: Anders Berg

Re: [PATCH v3] i2c: axxia: Add I2C driver for AXM55xx

2014-10-03 Thread Wolfram Sang
On Fri, Oct 03, 2014 at 01:50:48PM +0200, Wolfram Sang wrote: On Fri, Oct 03, 2014 at 01:08:02PM +0200, Anders Berg wrote: Add I2C bus driver for the controller found in the LSI Axxia family SoCs. The driver implements 10-bit addressing and SMBus transfer modes via emulation (including

[PULL REQUEST] i2c for 3.17

2014-10-03 Thread Wolfram Sang
Linus, here are two i2c driver bugfixes which would be nice to have in 3.17. Thanks, Wolfram The following changes since commit fe82dcec644244676d55a1384c958d5f67979adb: Linux 3.17-rc7 (2014-09-28 14:29:07 -0700) are available in the git repository at:

Re: [PATCH v2 0/3] i2c: designware: Add support for AMD I2C controller

2014-10-06 Thread Wolfram Sang
On Tue, Sep 30, 2014 at 01:04:52PM +0300, Mika Westerberg wrote: This is second iteration of the patch series. First version is here: http://patchwork.ozlabs.org/patch/390694/ http://patchwork.ozlabs.org/patch/390695/ In order to get source clock to the core driver we need some way of

Re: [PATCH] i2c: cros_ec: Remove EC_I2C_FLAG_10BIT

2014-09-30 Thread Wolfram Sang
On Mon, Jun 23, 2014 at 02:20:06PM -0700, Doug Anderson wrote: In https://lkml.org/lkml/2014/6/10/265 pointed out that the 10-bit flag in the cros_ec_tunnel was useless. It went into a 16-bit flags field but was defined at (1 16). Since we have no 10-bit i2c devices on the other side of

Re: [PATCH 0/4] Driver for talking to PLX PEX8xxx PCIe switch over I2C

2014-09-30 Thread Wolfram Sang
Since this is a driver for a PCIe switch, I currently put it under /driver/pci/. I'm very open to suggestions for moving this around (Does introducing drivers/pci/switch/ seem any better?). Especially I can see that the drivers/pci/Kconfig appears under Bus Options in the main menu

Re: [PATCH 0/4] Driver for talking to PLX PEX8xxx PCIe switch over I2C

2014-10-01 Thread Wolfram Sang
=== ...snip... +0. Why have an I2C interface to a PCIe switch? +~~ +Other than the regular PCI express interface, most modern PCIe switches (e.g. +from IDT and PLX) have an I2C based

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

2014-10-01 Thread Wolfram Sang
Maybe you can find an error code which with some level of confidence reflects lost mastership. Then you can implement whatever makes sense for your use case in your user space application(s). We have a documented fault code for ArbitrationLost and that is -EAGAIN (see

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

2014-10-01 Thread Wolfram Sang
On Wed, Oct 01, 2014 at 02:16:57PM -0700, Guenter Roeck wrote: On Wed, Oct 01, 2014 at 11:10:47PM +0200, Wolfram Sang wrote: Maybe you can find an error code which with some level of confidence reflects lost mastership. Then you can implement whatever makes sense for your use case

Re: [PATCH 0/4] Driver for talking to PLX PEX8xxx PCIe switch over I2C

2014-10-02 Thread Wolfram Sang
I understand and agree. In fact in the internal version of this driver (that I have not yet sent out for review), we do have APIs added similar to what you mention above. Currently I have APIs that: - Enable / Disable PCIe links. - Change the upstream port. - Enable / Disable

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-27 Thread Wolfram Sang
The i2c@e652 node is probed before the gpio@e6051000 node. The of_i2c_register_devices() function tries to register all children, including hdmi@39. It tries to parse and map the I2C client IRQ by calling irq_of_parse_and_map(), which returns 0 as the interrupt controller isn't probed

[PATCH RESEND 3/4] core: platform: let platform_create_bundle initialize module owner

2014-10-28 Thread Wolfram Sang
core instead of the module init. Fix it by using a similar #define construct to obtain THIS_MODULE and pass it on later. Reported-by: Russell King rmk+ker...@arm.linux.org.uk Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/base/platform.c | 11 ++- include/linux

[PATCH RESEND 1/4] core: platform: add warning if driver has no owner

2014-10-28 Thread Wolfram Sang
Commit 9447057eaff8 (platform_device: use a macro instead of platform_driver_register) introduced a codepath which could result into drivers having no owner. This went unnoticed for months, so add a warning in case this happens again somewhere else somewhen. Signed-off-by: Wolfram Sang w

[PATCH RESEND 0/4] platform: fix accidently erasing .owner

2014-10-28 Thread Wolfram Sang
patches. IMO this should go into v3.18 since it is a bugfix. Please apply. The cleanup series for removing .owner in the kernel tree will be resend later, too, as a seperate pull request. Wolfram Sang (4): core: platform: add warning if driver has no owner core: platform: let platform_driver_probe

[PATCH RESEND 4/4] coccinelle: api: add spatch to prevent unnecessary .owner

2014-10-28 Thread Wolfram Sang
There are calls which silently set the owner of a module. This is the preferred way [1], so avoid setting it manually. Currently, we only care about platform drivers, but there might be more calls to be added later. [1] https://lkml.org/lkml/2014/10/12/87 Signed-off-by: Wolfram Sang w

[PATCH RESEND 2/4] core: platform: let platform_driver_probe initialize module owner

2014-10-28 Thread Wolfram Sang
init. Fix it by using a similar #define construct to obtain THIS_MODULE and pass it on later. Reported-by: Russell King rmk+ker...@arm.linux.org.uk Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/base/platform.c | 11 ++- include/linux/platform_device.h | 6 -- 2

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Wolfram Sang
See: 9ec36cafe43b of/irq: do irq resolution in platform_get_irq I suspect a similar thing could be done for I2C. That could work. We would need to introduce a new i2c_get_irq() function though. Wolfram, would you be fine with that ? I'd think it will look pretty similar to

Re: [PATCH 3/3] I2C: mediatek: Add driver for MediaTek I2C controller

2014-10-30 Thread Wolfram Sang
+obj-$(CONFIG_I2C_MT65XX) += i2c-mt65xx.o As it works for mt65xx and mt81xx series, better rename it to i2c-mtk.c That is a bit too generic IMO. It is likely that we will see some totally different I2C core from MTK in the future. Plus, it is not uncommon that a driver initially for

Re: [PATCH 1/3] of/irq: Export of_irq_get()

2014-10-30 Thread Wolfram Sang
On Thu, Oct 30, 2014 at 03:59:36PM +0200, Laurent Pinchart wrote: The function will be used by the I2C core which can be compiled as a module. Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com I think it makes sense if I take this via I2C to get the dependencies for

Re: [PATCH 1/3] of/irq: Export of_irq_get()

2014-10-31 Thread Wolfram Sang
On Thu, Oct 30, 2014 at 04:17:19PM +0200, Laurent Pinchart wrote: On Thursday 30 October 2014 15:16:44 Wolfram Sang wrote: On Thu, Oct 30, 2014 at 03:59:36PM +0200, Laurent Pinchart wrote: The function will be used by the I2C core which can be compiled as a module. Signed-off

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

2014-09-19 Thread Wolfram Sang
On Thu, Jul 17, 2014 at 04:48:36PM +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. Several bus drivers handle this

Re: [PATCH 1/2] i2c: cadence: Remove .owner field for driver

2014-09-20 Thread Wolfram Sang
On Wed, Aug 13, 2014 at 01:56:51PM +0200, Michal Simek wrote: There is no need to init .owner field. Based on the patch from Peter Griffin peter.grif...@linaro.org mmc: remove .owner field for drivers using module_platform_driver This patch removes the superflous .owner field for drivers

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

2014-09-20 Thread Wolfram Sang
On Fri, Sep 05, 2014 at 12:28:18PM +0300, Mikko Perttunen wrote: From: Mikko Perttunen mperttu...@nvidia.com 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] i2c designware add support of I2C standard mode

2014-09-20 Thread Wolfram Sang
On Wed, Aug 20, 2014 at 04:29:08PM +0200, Romain Baeriswyl wrote: From: Romain Baeriswyl romain.baeris...@abilis.com Some legacy devices support ony I2C standard mode at 100kHz. This patch allows to select the standard mode through the DTS with the use of the existing clock-frequency

Re: [PATCH 1/1] i2c: designware: add support of platform data to set I2C mode

2014-09-20 Thread Wolfram Sang
On Wed, Sep 03, 2014 at 10:41:38AM +0800, Raymond Tan wrote: From: Tan, Raymond raymond@intel.com Use the platform data to set the clk_freq when there is no DT configuration available. The clk_freq in turn will determine the I2C speed mode. In Quark, there is currently no other

Re: [PATCH] i2c: axxia: Add I2C driver for AXM55xx

2014-09-20 Thread Wolfram Sang
Hi, thanks for the submission. On Mon, Aug 25, 2014 at 01:51:22PM +0200, Anders Berg wrote: Add I2C bus driver for the controller found in the LSI Axxia family SoCs. The driver implements 10-bit addressing and SMBus transfer modes via emulation (including SMBus block data read).

Re: [PATCH] i2c: rk3x: Remove unlikely() annotations

2014-09-20 Thread Wolfram Sang
On Fri, Aug 22, 2014 at 10:43:44AM -0700, Doug Anderson wrote: Having a transfer more than 32 bits is not all that unlikely. Remove the annotation. The unlikely in the IRQ handler can't gain us much. It's not in a loop, so at most it would save 1 instruction per IRQ, which isn't much. In

Re: [PATCH v2] i2c: rk3x: fix divisor calculation for SCL frequency

2014-09-20 Thread Wolfram Sang
On Mon, Sep 08, 2014 at 11:38:25AM +0800, Addy Ke wrote: I2C_CLKDIV register descripted in the previous version of RK3x chip manual is incorrect. Plus 1 is required. The correct formula: - T(SCL_HIGH) = T(PCLK) * (CLKDIVH + 1) * 8 - T(SCL_LOW) = T(PCLK) * (CLKDIVL + 1) * 8 - (SCL Divsor) =

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

2014-09-20 Thread Wolfram Sang
On Fri, Sep 05, 2014 at 04:02:19PM +0200, Jean-Michel Hautbois wrote: Some I2C devices have multiple addresses assigned, for example each address corresponding to a different internal register map page of the device. So far drivers which need support for this have handled this with a driver

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

2014-09-21 Thread Wolfram Sang
This raises the first question for me: Are the additional addresses configurable? Sadly, I can't find good documentation for the adv7604. Otherwise, if I know I have a adv7604 and know its addresses, this information should go into the driver and not the DT. They are. The current driver

Re: [PATCH] i2c: axxia: Add I2C driver for AXM55xx

2014-09-22 Thread Wolfram Sang
+ if (idev-msg_xfrd == 0 i2c_m_recv_len(msg)) { + /* + * Check length byte for SMBus block read + */ + if (c = 0) { + idev-msg_err = -EPROTO; +

Re: [PATCH] i2c: axxia: Add I2C driver for AXM55xx

2014-09-22 Thread Wolfram Sang
+ if (msg-len == 0 || msg-len 255) + return -EINVAL; Ouch, really? Maybe we should warn the user here. Yeah, the transfer length register limits the length to 255. I'll add a warning here. Please also add this information to the Kconfig description and

Re: [PATCH] i2c: axxia: Add I2C driver for AXM55xx

2014-09-22 Thread Wolfram Sang
On Mon, Sep 22, 2014 at 02:03:51PM +0100, Russell King - ARM Linux wrote: On Mon, Sep 22, 2014 at 11:59:39AM +0200, Wolfram Sang wrote: IRQ_NONE is this interrupt wasn't by me so for shared IRQs, the next handler can check. Err, no it isn't. IRQ_NONE has no such effect. All handlers

Re: [PATCH] i2c-rk3x: move setup to the earlier subsys initcall

2014-09-22 Thread Wolfram Sang
Hi, In general you are correct. You can get by with lots of probe deferrals. I don't personally know of any case where things are broken with the current code, but it's really nice to avoid the deferrals if possible. Yes, we all want proper dependencies and ordering, yet deferred probing

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

2014-09-22 Thread Wolfram Sang
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 jdelv...@suse.de Signed-off-by: Wolfram Sang w...@the-dreams.de Cc: Mika Westerberg

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

2014-09-22 Thread Wolfram Sang
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. No code was changed. Reported-by: Jean Delvare jdelv...@suse.de Signed-off-by: Wolfram Sang w...@the-dreams.de

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

2014-09-22 Thread Wolfram Sang
Sorry for later response due to sickness. I can't write this patch in time. Sorry again. I will test it soon. Oh, get well soon! Please say so next time, so I know. signature.asc Description: Digital signature

Re: [PATCH v11 0/3] i2c: imx: add DMA support for freescale i2c driver

2014-11-18 Thread Wolfram Sang
On Tue, Nov 18, 2014 at 06:31:04PM +0800, Yuan Yao wrote: Changed in v11: - Fix the bug for 'orig_jiffies' uninitialized. - Use wait_for_completion_timeout() instead of wait_for_completion_interruptible_timeout(). Applied to for-next, thanks! signature.asc Description: Digital

Re: [PATCH v3 2/3] i2c: add support for Amlogic Meson I2C controller

2014-11-18 Thread Wolfram Sang
On Thu, Nov 13, 2014 at 08:32:02PM +0100, Beniamino Galvani wrote: This is a driver for the I2C controller found in Amlogic Meson SoCs. Signed-off-by: Beniamino Galvani b.galv...@gmail.com Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH v3 1/3] i2c: meson: add device tree bindings documentation

2014-11-18 Thread Wolfram Sang
On Thu, Nov 13, 2014 at 08:32:01PM +0100, Beniamino Galvani wrote: This commit adds device tree bindings documentation for the I2C bus controller found on Amlogic Meson SoCs. Signed-off-by: Beniamino Galvani b.galv...@gmail.com Applied to for-next, thanks! signature.asc Description:

Re: [PATCH v3 3/3] ARM: dts: meson: add I2C controller nodes

2014-11-18 Thread Wolfram Sang
On Thu, Nov 13, 2014 at 08:32:03PM +0100, Beniamino Galvani wrote: Add nodes for I2C controllers A,B,AO, which are available in both Meson6 and Meson8. Signed-off-by: Beniamino Galvani b.galv...@gmail.com --- I usually don't take DTS patches. They should go via arm-soc. Please say so if

[PATCH 0/3] i2c: slave support framework for Linux devices

2014-11-18 Thread Wolfram Sang
. 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 (3): i2c: core changes for slave support i2c: slave-eeprom: add eeprom simulator driver i2c: rcar: add slave support drivers

[PATCH 2/3] i2c: slave-eeprom: add eeprom simulator driver

2014-11-18 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com The first user of the i2c-slave interface is an eeprom simulator. It is a shared memory which can be accessed by the remote master via I2C and locally via sysfs. Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- Changes since

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

2014-11-18 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com Finally(!), make Linux support being an I2C slave. Most of the existing infrastructure is reused. We mainly add i2c_slave_register/unregister() calls which tells i2c bus drivers to activate the slave mode. Then, they also get a callback

[PATCH 3/3] i2c: rcar: add slave support

2014-11-18 Thread Wolfram Sang
From: Wolfram Sang wsa+rene...@sang-engineering.com The first I2C slave provider using the new generic interface. Signed-off-by: Wolfram Sang wsa+rene...@sang-engineering.com --- Changes since RFC: * no runtime_pm for slaves * don't use NULL in i2c_slave_event drivers/i2c/busses/i2c-rcar.c

Re: [PATCH] i2c: img-scb: Allow building for MIPS

2014-11-19 Thread Wolfram Sang
On Wed, Nov 19, 2014 at 12:03:08AM +, James Hogan wrote: On Tue, Nov 18, 2014 at 03:58:33PM -0800, Andrew Bresticker wrote: The SCB is present on IMG SoCs other than the META-based TZ1090, such as the MIPS-based Pistachio SoC. Relax the Kconfig dependency so that it can be built on any

Re: [PATCH] i2c: designware: prevent early stop on TX FIFO empty

2014-11-19 Thread Wolfram Sang
On Fri, Nov 07, 2014 at 12:10:44PM +, Andrew Jackson wrote: If the Designware core is configured with IC_EMPTYFIFO_HOLD_MASTER_EN set to zero, allowing the TX FIFO to become empty causes a STOP condition to be generated on the I2C bus. If the transmit FIFO threshold is set too high, an

Re: [PATCH 1/2] DT: i2c: Add more devices handled by the rtc-rs5c372 driver

2014-11-19 Thread Wolfram Sang
On Fri, Nov 14, 2014 at 05:03:30PM +0100, Geert Uytterhoeven wrote: This allows checkpatch to validate more DTSes. Signed-off-by: Geert Uytterhoeven geert+rene...@glider.be Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH 2/2] DT: i2c: Add more devices handled by the adxl34x-i2c driver

2014-11-19 Thread Wolfram Sang
On Fri, Nov 14, 2014 at 05:03:31PM +0100, Geert Uytterhoeven wrote: This allows checkpatch to validate more DTSes. Signed-off-by: Geert Uytterhoeven geert+rene...@glider.be Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH] ACPI: Add _DEP(Operation Region Dependencies) support to fix battery issue on the Asus T100TA

2014-11-19 Thread Wolfram Sang
Tested-by: Adam Williamson ad...@happyassassin.net Tested-by: Michael Shigorin shigo...@gmail.com Signed-off-by: Lan Tianyu tianyu@intel.com As long as the I2C related changes are that minimal: Acked-by: Wolfram Sang w...@the-dreams.de for the I2C part signature.asc Description: Digital

[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

[RFC 1/4] i2c: core changes for 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/i2c-core.c | 44 include/linux/i2c.h| 22 ++ 2 files changed, 66 insertions(+) diff --git

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

Re: [PATCH] Input: atmel_mxt_ts: Add of node type to the i2c table

2014-09-11 Thread Wolfram Sang
Funny timing. I am just reviewing the series from Lee and also stumbled over modaliases, too... On Thu, Sep 11, 2014 at 10:19:54AM +0100, Nick Dyer wrote: On 11/09/14 09:38, Javier Martinez Canillas wrote: To expand on what Sjoerd already said and just to be sure everyone is on the same

Re: [PATCH] Input: atmel_mxt_ts: Add of node type to the i2c table

2014-09-11 Thread Wolfram Sang
This is a workaround. It would make sense, however, to add it because we want to support i2c_board_info structures. I think it really depends if an IP block can be used on non-DT platforms (which I think is true for this trackpad) but if a driver is for an IP block that can only be

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

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:at91: Fix a race condition during signal handling in at91_do_twi_xfer.

2014-09-02 Thread Wolfram Sang
On Tue, Aug 26, 2014 at 09:13:24PM +0200, Simon Lindgren wrote: There is a race condition in at91_do_twi_xfer when signals arrive. If a signal is recieved while waiting for a transfer to complete wait_for_completion_interruptible_timeout() will return -ERESTARTSYS. This is not handled

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: Trickle charging for rtc-bq32k

2014-09-02 Thread Wolfram Sang
Do you have example how to acces of_ from i2c driver? Platform drivers do: if (pdev-dev.of_node) { As I said, this is basically the same. Just use the node from the client's device. Nothing special here. signature.asc Description: Digital signature

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] Fixes: 1d7afc9 i2c: omap: ack IRQ in parts

2014-11-20 Thread Wolfram Sang
Tested on Beagleboard XM C. Signed-off-by: Alexander Kochetkov al.koc...@gmail.com Cc: sta...@vger.kernel.org # v3.7+ This is good, but subject is wrong. That fixes line should not be the subject, it should be here after Cc :-) I'll take this as an Ack unless you protest.

Re: [PATCH] i2c: omap: fix NACK and Arbitration Lost irq handling

2014-11-20 Thread Wolfram Sang
On Tue, Nov 18, 2014 at 09:00:58PM +0400, Alexander Kochetkov wrote: commit 1d7afc95946487945cc7f5019b41255b72224b70 (i2c: omap: ack IRQ in parts) changed the interrupt handler to complete transfers without clearing XRDY (AL case) and ARDY (NACK case) flags. XRDY or ARDY interrupts will be

Re: [PATCH] i2c: designware: prevent early stop on TX FIFO empty

2014-11-20 Thread Wolfram Sang
On Fri, Nov 07, 2014 at 12:10:44PM +, Andrew Jackson wrote: If the Designware core is configured with IC_EMPTYFIFO_HOLD_MASTER_EN set to zero, allowing the TX FIFO to become empty causes a STOP condition to be generated on the I2C bus. If the transmit FIFO threshold is set too high, an

Re: [Cocci] bugon.cocci: fix Options at the macro

2014-11-21 Thread Wolfram Sang
On Fri, Nov 07, 2014 at 06:51:05PM +0100, Wolfram Sang wrote: On Tue, Oct 28, 2014 at 03:18:24PM -0200, Mauro Carvalho Chehab wrote: The comma after --no-includes makes coccinelle to not run the script: /usr/bin/spatch -D report --very-quiet --no-show-diff --cocci-file ./scripts

<    4   5   6   7   8   9   10   11   12   13   >