[RFC v2 2/4] dt-bindings: i2c: mux: demux-pinctrl: add bindings

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang These bindings allow an I2C bus to switch between multiple masters. This is not hot-swichting because connected I2C slaves will be re-instantiated. It is meant to select the best I2C core at runtime once the task is known. Example: Prefer i2c-gpio over another I2C core because

[RFC v2 0/4] i2c/of: switch I2C IP cores at runtime via OF_DYNAMIC

2016-01-06 Thread Wolfram Sang
hanks, Wolfram Wolfram Sang (4): of: make of_mutex public dt-bindings: i2c: mux: demux-pinctrl: add bindings i2c: mux: demux-pinctrl: add driver ARM: shmobile: r8a7790: rework dts to use i2c demuxer .../devicetree/bindings/i2c/i2c-demux-pinctrl.txt | 155 arch/arm/boot/dts/r8

[RFC v2 4/4] ARM: shmobile: r8a7790: rework dts to use i2c demuxer

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang Create a seperate bus for HDMI related I2C slaves and assign it to a i2c-gpio master. It can be switched to the i2c-rcar or i2c-sh_mobile core at runtime. Signed-off-by: Wolfram Sang --- arch/arm/boot/dts/r8a7790-lager.dts | 141 ++-- 1 file

[RFC v2 1/4] of: make of_mutex public

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang If we want to use OF_DYNAMIC features outside the of framework, we need to access this lock. Signed-off-by: Wolfram Sang --- drivers/of/of_private.h | 1 - include/linux/of.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/of/of_private.h

[RFC v2 3/4] i2c: mux: demux-pinctrl: add driver

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang This driver allows an I2C bus to switch between multiple masters. This is not hot-swichting because connected I2C slaves will be re-instantiated. It is meant to select the best I2C core at runtime once the task is known. Example: Prefer i2c-gpio over another I2C core because

Re: [PATCH] DT: i2c: Update vendor prefix for 24c00

2016-01-06 Thread Wolfram Sang
On Mon, Jan 04, 2016 at 08:22:33PM +0200, Andy Shevchenko wrote: > On Sat, Jan 2, 2016 at 11:21 PM, Wolfram Sang wrote: > > On Sun, Dec 27, 2015 at 04:57:48PM +0200, Andy Shevchenko wrote: > >> On Wed, Dec 23, 2015 at 9:18 PM, Akshay Bhat > >> wrote: > >>

Re: [PATCH v2 0/8] i2c mux cleanup and locking update

2016-01-05 Thread Wolfram Sang
Peter, > PS. needs a bunch of testing, I do not have access to all the involved hw First of all, thanks for diving into this topic and the huge effort you apparently have put into it. It is obviously a quite intrusive series, so it needs careful review. TBH, I can't really tell when I have the b

[PATCH v2] of/unittest: Show broken behaviour in the platform bus

2016-01-04 Thread Wolfram Sang
t need to be an explicit text because the kernel will oops when it is wrong. Cc: Pantelis Antoniou Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Ricardo Ribalda Delgado Signed-off-by: Grant Likely [wsa: added the comment provided by Grant, rebased, and tested] Signed-off-by: Wolfram Sang --- driver

Re: [PATCH] DT: i2c: Update vendor prefix for 24c00

2016-01-02 Thread Wolfram Sang
On Sun, Dec 27, 2015 at 04:57:48PM +0200, Andy Shevchenko wrote: > On Wed, Dec 23, 2015 at 9:18 PM, Akshay Bhat wrote: > > "at" is not a valid vendor prefix, correcting the same to "atmel" > > > > I'm afraid you can't just do this change alone as it's used in some > DTS. Though you may deprecated

Re: [PATCH] DT: i2c: Add Epson RX8010 to list of trivial devices

2016-01-02 Thread Wolfram Sang
On Sun, Dec 27, 2015 at 05:02:48PM +0200, Andy Shevchenko wrote: > On Wed, Dec 23, 2015 at 8:38 PM, Akshay Bhat wrote: > > This adds devicetree documentation for the bindings of rtc-rx8010 > > driver. > > > > Signed-off-by: Akshay Bhat > > --- > > Documentation/devicetree/bindings/i2c/trivial-de

Re: [PATCH] DT: i2c: Add Freescale MPL3115 to trivial devices list

2015-12-29 Thread Wolfram Sang
On Tue, Dec 29, 2015 at 12:35:16PM -0600, Rob Herring wrote: > On Wed, Dec 23, 2015 at 01:59:07PM -0500, Akshay Bhat wrote: > > This adds devicetree documentation for the bindings of mpl3115 driver. > > > > Signed-off-by: Akshay Bhat > > --- > > Documentation/devicetree/bindings/i2c/trivial-devi

Re: I2C eeprom compatibles? (was Re: [PATCH/RFC 03/19] ARM: shmobile: gose: add i2c2 bus to device tree)

2015-12-18 Thread Wolfram Sang
On Fri, Dec 18, 2015 at 10:06:48AM +0100, Arnd Bergmann wrote: > On Friday 18 December 2015 08:35:32 Wolfram Sang wrote: > > > > > > It seems to me that we have some consensus around: > > > > > > compatible = "renesas,r1ex24002", &qu

I2C eeprom compatibles? (was Re: [PATCH/RFC 03/19] ARM: shmobile: gose: add i2c2 bus to device tree)

2015-12-17 Thread Wolfram Sang
On Fri, Dec 18, 2015 at 12:02:39PM +0900, Simon Horman wrote: > On Mon, Dec 14, 2015 at 10:39:47AM +0100, Geert Uytterhoeven wrote: > > On Mon, Dec 14, 2015 at 8:11 AM, Wolfram Sang wrote: > > >> > >+ eeprom@50 { > > >> > >+ compatible = &quo

[RFC 1/3] i2c: document binding for multi-master case

2015-12-16 Thread Wolfram Sang
From: Wolfram Sang We need this binding because some I2C master drivers will need to adapt their PM settings for the arbitration circuitry. I skipped the "i2c-" prefix because I can imagine to be useful outside of i2c. Signed-off-by: Wolfram Sang Cc: devicetree@vger.

Re: [PATCH v2 3/4] ARM: at91/dt: sama5d4: update i2c compatible string

2015-12-03 Thread Wolfram Sang
On Thu, Dec 03, 2015 at 11:33:24AM +0100, Nicolas Ferre wrote: > Le 03/12/2015 10:53, Ludovic Desroches a écrit : > > A new compatible string has been introduced: atmel,sama5d4-i2c. It > > allows to use the i2c-sda-hold-time-ns property if needed. > > > > Signed-off-by: Ludovic Desroches > > Wol

[PATCH 1/9] i2c: document generic DT bindings for timing parameters

2015-12-03 Thread Wolfram Sang
From: Wolfram Sang Also, sort the properties alphabetically and make indentation consistent. Wording largely taken from i2c-rk3x.txt, thanks guys! Only "i2c-scl-internal-delay-ns" is new, the rest is used by two drivers already and was documented in their driver binding documentatio

Re: [PATCH 4/9] i2c: brcmstb: enable ACK condition

2015-11-30 Thread Wolfram Sang
On Wed, Oct 21, 2015 at 11:36:56AM +0900, Jaedon Shin wrote: > Removes the condition of a message with under 32 bytes in length. The > messages that do not require an ACK are I2C_M_IGNORE_NAK flag. Makes me wonder why it worked before? Kamal? > > Signed-off-by: Jaedon Shin > --- > drivers/i2c/

Re: [PATCH 5/9] i2c: brcmstb: fix start and stop conditions

2015-11-30 Thread Wolfram Sang
On Wed, Oct 21, 2015 at 11:36:57AM +0900, Jaedon Shin wrote: > Fixes conditions for RESTART, NOSTART and NOSTOP. The masks of start and > stop is already in brcmstb_set_i2c_start_stop(). Therefore, the caller > does not need a mask value. Hmm, and what if that changes for some reason in the future

Re: [PATCH 3/9] i2c: brcmstb: add missing parenthesis

2015-11-30 Thread Wolfram Sang
On Wed, Oct 21, 2015 at 06:56:44PM -0700, Florian Fainelli wrote: > Le 20/10/2015 19:36, Jaedon Shin a écrit : > > Add the necessary parenthesis for NOACK condition. > > > > Signed-off-by: Jaedon Shin > > Acked-by: Florian Fainelli I wouldn't call them necessary? > > > --- > > drivers/i2c/b

Re: [PATCH 1/3] i2c: at91: add setting HOLD field of TWIHS_CWGR via DT

2015-11-30 Thread Wolfram Sang
On Tue, Nov 24, 2015 at 02:47:40PM +0100, Ludovic Desroches wrote: > From: Wenyou Yang > > Add the HOLD field management. Some i2c devices need a longer data hold > time than the one given in the i2c bus specification. Since this value > depends on the i2c device connected to the bus, add a DT pr

Re: [PATCH 3/3] PCI: pcie-rcar: Add support for R-Car H3.

2015-11-07 Thread Wolfram Sang
On Mon, Nov 02, 2015 at 04:36:15PM +, Phil Edworthy wrote: > From: Harunobu Kurokawa > > R-Car H3 device is r8a7795 > > Signed-off-by: Harunobu Kurokawa Acked-by: Wolfram Sang Tested-by: Wolfram Sang signature.asc Description: Digital signature

Re: [PATCH v2 0/2] i2c: uniphier: add two I2C controller drivers for UniPhier SoC platform

2015-10-26 Thread Wolfram Sang
On Mon, Oct 26, 2015 at 09:31:15AM +0100, Geert Uytterhoeven wrote: > On Mon, Oct 26, 2015 at 9:27 AM, Masahiro Yamada > wrote: > > 2015-10-26 17:17 GMT+09:00 Lee Jones : > >>> This series adds two I2C controller drivers. > >>> (they are completely different IPs.) > >>> > >>> The first one is a ve

Re: [PATCH-v5 RESEND 3/5] i2c: pxa: Add support for pxa910/988 & new configuration features

2015-10-25 Thread Wolfram Sang
> And the i2c binding documentation, which says, > for platforms using REGS_PXA2XX, they need to provide additional node > "mrvl,pxa-i2c". Which is confusing :) Yes, the description of the compatible entry is pretty bogus. Could you fix that? signature.asc Description: Digital signature

Re: [PATCH-v5 RESEND 4/5] Documentation: binding: add sclk adjustment properties to i2c-pxa

2015-10-25 Thread Wolfram Sang
On Mon, Aug 24, 2015 at 11:29:37AM +0530, Vaibhav Hiremath wrote: > With addition of PXA910 family of devices, the TWSI module supports > new feature which allows us to adjust SCLK. i2c-pxa driver takes input > configuration in nsec and converts it to respective bit-fields, > > - i2c-sclk-low-tim

Re: [PATCH-v5 RESEND 3/5] i2c: pxa: Add support for pxa910/988 & new configuration features

2015-10-25 Thread Wolfram Sang
On Mon, Aug 24, 2015 at 11:29:36AM +0530, Vaibhav Hiremath wrote: > TWSI_ILCR & TWSI_IWCR registers are used to adjust clock rate > of standard & fast mode in pxa910/988; so this patch adds these two new > entries to "struct pxa_reg_layout" and "struct pxa_i2c". > > As discussed in the previous pa

Re: [PATCH-v5 RESEND 2/5] i2c: pxa: enable/disable i2c module across msg xfer

2015-10-25 Thread Wolfram Sang
> >>Enable i2c module/unit before transmission and disable when it > >>finishes. > > >Can't you use Runtime PM for that? > > > > I haven't tried it though, I can give a try and check. It should work. Other I2C drivers are doing exactly that. signature.asc Description: Digital signature

Re: [PATCH v2 2/2] i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver

2015-10-23 Thread Wolfram Sang
On Fri, Oct 23, 2015 at 07:52:00PM +0900, Masahiro Yamada wrote: > Add support for on-chip I2C controller used on newer UniPhier SoCs > such as PH1-Pro4, PH1-Pro5, etc. This adapter is equipped with > 8-depth TX/RX FIFOs. > > Signed-off-by: Masahiro Yamada Applied to for-next, thanks! signat

Re: [PATCH v2 1/2] i2c: uniphier: add UniPhier FIFO-less I2C driver

2015-10-23 Thread Wolfram Sang
On Fri, Oct 23, 2015 at 07:51:59PM +0900, Masahiro Yamada wrote: > Add support for on-chip I2C controller used on old UniPhier SoCs > such as PH1-LD4, PH1-sLD8, etc. This adapter is so simple that > it has no FIFO in it. > > Signed-off-by: Masahiro Yamada Applied to for-next, thanks! signatu

Re: [PATCH 3/3] i2c: uniphier: add bindings for UniPhier I2C controllers

2015-10-22 Thread Wolfram Sang
On Thu, Jul 30, 2015 at 05:12:22PM +0900, Masahiro Yamada wrote: > Device Tree bindings for two I2C controllers embedded in > UniPhier SoCs. > > Signed-off-by: Masahiro Yamada Please split this into two files with filenames matching those of the drivers. I know they will be very similar but I'd

Re: [PATCH v2] i2c: davinci: Optimize clock generation on Keystone SoC

2015-10-20 Thread Wolfram Sang
On Mon, Sep 14, 2015 at 11:03:50AM +0200, Alexander Sverdlin wrote: > According to "KeyStone Architecture Inter-IC Control Bus User Guide", fixed > additive part of frequency divisors (referred as "d" in the code and > datasheet) > always equals to 6, independent of module clock prescaler. > >

Re: [PATCH v2] dts: keystone: Use new "ti,keystone-i2c" compatible

2015-10-20 Thread Wolfram Sang
On Mon, Sep 14, 2015 at 11:07:02AM +0200, Alexander Sverdlin wrote: > Now as "i2c-davinci" driver has special handling for Keystone it's time to > switch > the device tree to use new "compatible" property. Old one is left for > backwards- > compatibility. > > Signed-off-by: Alexander Sverdlin

Re: [PATCH v4 11/22] i2c: core: Probe i2c adapters and devices on demand

2015-10-20 Thread Wolfram Sang
ed to probe, and can introduce > very big delays in when a critical device is probed. > > Signed-off-by: Tomeu Vizoso If the I2C part stays that simple and the core part of the series is accepted, then: Acked-by: Wolfram Sang Thanks, Wolfram signature.asc Description: Digital signature

Re: [PATCH-v5 RESEND 3/5] i2c: pxa: Add support for pxa910/988 & new configuration features

2015-09-11 Thread Wolfram Sang
On Mon, Aug 24, 2015 at 11:29:36AM +0530, Vaibhav Hiremath wrote: > TWSI_ILCR & TWSI_IWCR registers are used to adjust clock rate > of standard & fast mode in pxa910/988; so this patch adds these two new > entries to "struct pxa_reg_layout" and "struct pxa_i2c". > > As discussed in the previous pa

Re: [PATCH-v5 RESEND 2/5] i2c: pxa: enable/disable i2c module across msg xfer

2015-09-11 Thread Wolfram Sang
On Mon, Aug 24, 2015 at 11:29:35AM +0530, Vaibhav Hiremath wrote: > From: Yi Zhang > > Enable i2c module/unit before transmission and disable when it > finishes. > > why? > It's because the i2c bus may be disturbed if the slave device, > typically a touch, powers on. I am not convinced, "may di

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-09-08 Thread Wolfram Sang
> Sorry for the long delay. I tried to analyze the issue. Attached patch works > on AC100 (Misha Komarovsky helped me with testing). > > Wolfram could you please try the patch with your environment? No change, sadly. I don't get slave interrupts. > Init function is called multuple times. If I2C

Re: [PATCH] of/irq: export of_get_irq_byname()

2015-08-26 Thread Wolfram Sang
On Tue, Aug 25, 2015 at 05:04:02PM -0700, Dmitry Torokhov wrote: > Similarly to of_get_irq(), let's export of_irq_get_byname(), so if a bus core > can be compiled as a module (such as I2C) it can have access to the symbol. > > Reported-by: Stephen Rothwell > Reported-by: kbuild test robot > Sign

Re: [PATCH] of/irq: export of_get_irq_byname()

2015-08-26 Thread Wolfram Sang
On Wed, Aug 26, 2015 at 10:24:25AM +1000, Stephen Rothwell wrote: > Hi Dmitry, > > On Tue, 25 Aug 2015 17:04:02 -0700 Dmitry Torokhov > wrote: > > > > Similarly to of_get_irq(), let's export of_irq_get_byname(), so if a bus > > core > > can be compiled as a module (such as I2C) it can have acce

Re: [PATCH v2] i2c: allow specifying separate wakeup interrupt in device tree

2015-08-24 Thread Wolfram Sang
On Mon, Aug 17, 2015 at 11:52:51PM -0700, Dmitry Torokhov wrote: > Instead of having each i2c driver individually parse device tree data in > case it or platform supports separate wakeup interrupt, and handle > enabling and disabling wakeup interrupts in their power management > routines, let's hav

Re: [PATCH v2 0/2] I2C support for NXP LPC18xx family

2015-08-19 Thread Wolfram Sang
urce allocation, device tree and > generally cleaned up. Driver was originally written to support the > LPC2xxx platforms. > > Patches based on i2c/for-next and tested on Embedded Artists' LPC4357 > Dev Kit and Hitex LPC4350 Eval board with several I2C devices. > > This v

Re: [PATCH 1/2] i2c: add i2c-lpc2k driver

2015-08-15 Thread Wolfram Sang
On Mon, Jul 13, 2015 at 12:47:21AM +0200, Joachim Eastwood wrote: > Add support for the I2C controller found on several NXP devices > including LPC2xxx, LPC178x/7x and LPC18xx/43xx. The controller > is implemented as a state machine and the driver act upon the > state changes when the bus is access

Re: [PATCH v2 13/22] i2c: core: Probe i2c master devices on demand

2015-08-09 Thread Wolfram Sang
On Tue, Jul 28, 2015 at 03:19:44PM +0200, Tomeu Vizoso wrote: > When looking up an i2c master through its firmware node, probe it if it > hasn't already. > > The goal is to reduce deferred probes to a minimum, as it makes it very > cumbersome to find out why a device failed to probe, and can intro

Re: [PATCH-v5 1/5] Documentation: binding: add new property 'disable_after_xfer' to i2c-pxa

2015-08-05 Thread Wolfram Sang
> Yeah, we could start i2c.txt, probably better to have separate new > patch all together. I will start such a file today as part of the i2c slave framework update which introduces flags to the reg property. Will post to the i2c list this week. signature.asc Description: Digital signature

Re: [PATCH v2] i2c: removed work arounds in i2c driver for Zynq Ultrascale+ MPSoC

2015-07-31 Thread Wolfram Sang
On Fri, Jul 10, 2015 at 08:10:14PM +0530, Anurag Kumar Vulisha wrote: > Cadence 1.0 version has bugs which have been fixed in the cadence 1.4 version. > This patch removes the quirks present in the driver for cadence 1.4 version. > > Signed-off-by: Anurag Kumar Vulisha Applied to for-next, thank

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-07-24 Thread Wolfram Sang
> At the begin of my work on this patchset I even denied clock disable call if > slave is registered (to minimize code that can affect transfer). I hacked something like this, but it seems it was not enough. > If only slave mode is used, then this logic is not needed. This is not sufficent. We

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-07-24 Thread Wolfram Sang
Hi Andrey, On Mon, Jul 20, 2015 at 11:35:43PM +0300, Andrey Danin wrote: > Initialization code is based on NVEC driver. > > There is a HW bug in AP20 that was also mentioned in kernel sources > for Toshiba AC100. > > Signed-off-by: Andrey Danin Still doesn't work for me and I think I understan

Re: [PATCH v3 4/4] dt: paz00: define nvec as child of i2c bus

2015-07-21 Thread Wolfram Sang
> It's up to you. I think if the NV guys are ok with the tegra i2c change, > Wolfram can merge it right away for 4.3. I asked him to resend, because I *want* to merge it for 4.3 :) Only the slave-mode enablement for i2c, of course. The other patches need to go via some other tree (when they are

Re: [PATCH v2 1/4] i2c: tegra: implement slave mode

2015-07-20 Thread Wolfram Sang
On Fri, Apr 03, 2015 at 09:46:26PM +0200, Wolfram Sang wrote: > > +static void tegra_i2c_slave_write(struct tegra_i2c_dev *i2c_dev, u32 val) > > +{ > > + i2c_writel(i2c_dev, val, I2C_SL_RCVD); > > + > > + /* > > +* TODO: A correct fix needs to be foun

Re: How to encode being an I2C slave in DT?

2015-07-16 Thread Wolfram Sang
> Did you have enough time to check this ? > (sorry for the noise, if I missed patch(es) in the ml) Nice coincidence, scheduled for tomorrow... signature.asc Description: Digital signature

Re: [PATCH-v4 06/11] i2c:pxa: Use devm_ variants in probe function

2015-07-14 Thread Wolfram Sang
> So this additional error message would print one of, -EINVAL, -EBUSY > or -ENOMEM. The driver core can report this; dunno from head if it is verbose output or not. signature.asc Description: Digital signature

Re: [PATCH-v4 06/11] i2c:pxa: Use devm_ variants in probe function

2015-07-14 Thread Wolfram Sang
> + i2c->reg_base = devm_ioremap_resource(&dev->dev, res); > + if (IS_ERR(i2c->reg_base)) { > + dev_err(&dev->dev, "failed to map resource: %ld\n", > + PTR_ERR(i2c->reg_base)); > + return PTR_ERR(i2c->reg_base); > + } One change I did when ap

Re: [PATCH-v4 00/11] i2c: pxa: Fixes, cleanup and support for pxa910 family

2015-07-14 Thread Wolfram Sang
On Tue, Jul 14, 2015 at 01:06:39PM +0530, Vaibhav Hiremath wrote: > This patch series fixes bugs/warnings, cleans up the code and adds > support for PXA910 family of devices to PXA I2C bus driver. > > There has been one attempt made sometime back in 2012 to upstream > some of the patches from belo

Re: [PATCH-v3 02/11] i2c: pxa: No need to set slave addr for i2c master mode reset

2015-07-10 Thread Wolfram Sang
On Fri, Jul 10, 2015 at 07:55:31PM +0530, Vaibhav Hiremath wrote: > > > On Friday 10 July 2015 07:44 PM, Wolfram Sang wrote: > >On Fri, Jul 10, 2015 at 06:08:43PM +0530, Vaibhav Hiremath wrote: > >> > >> > >>On Friday 10 July 2015 01:41 PM, Wolfram Sang

Re: [PATCH-v3 02/11] i2c: pxa: No need to set slave addr for i2c master mode reset

2015-07-10 Thread Wolfram Sang
On Fri, Jul 10, 2015 at 06:08:43PM +0530, Vaibhav Hiremath wrote: > > > On Friday 10 July 2015 01:41 PM, Wolfram Sang wrote: > >On Tue, Jul 07, 2015 at 12:54:46AM +0530, Vaibhav Hiremath wrote: > >>Normally i2c controller works as master, so slave addr is not needed, or

Re: [PATCH-v3 07/11] i2c: pxa: enable/disable i2c module across msg xfer

2015-07-10 Thread Wolfram Sang
On Tue, Jul 07, 2015 at 12:54:51AM +0530, Vaibhav Hiremath wrote: > From: Yi Zhang > > Enable i2c module/unit before transmission and disable when it finishes. > > why? > It's because the i2c bus may be distrubed if the slave device, > typically a touch, powers on. > > As we do not want to brea

Re: [PATCH-v3 06/11] i2c:pxa: Use devm_ variants in probe function

2015-07-10 Thread Wolfram Sang
> - i2c = kzalloc(sizeof(struct pxa_i2c), GFP_KERNEL); > + i2c = devm_kzalloc(&dev->dev, sizeof(struct pxa_i2c), GFP_KERNEL); > if (!i2c) { > - ret = -ENOMEM; > - goto emalloc; > + dev_err(&dev->dev, "memory allocation failed\n"); No message here,

Re: [PATCH-v3 04/11] i2c: pxa: Remove compile warnning in 64bit mode

2015-07-10 Thread Wolfram Sang
> > Signed-off-by: Yipeng Yao > [vaibhav.hirem...@linaro.org: Updated Changelog] > Signed-off-by: Vaibhav Hiremath > Cc: Wolfram Sang > Acked-by: Robert Jarzmik Huh? Why long? Shouldn't that be casted to enum pxa_i2c_types? > --- > drivers/i2c/busses/i2c-pxa.c | 4 +++-

Re: [PATCH-v3 02/11] i2c: pxa: No need to set slave addr for i2c master mode reset

2015-07-10 Thread Wolfram Sang
On Tue, Jul 07, 2015 at 12:54:46AM +0530, Vaibhav Hiremath wrote: > Normally i2c controller works as master, so slave addr is not needed, or it > will impact some slave device (eg. ST NFC chip) i2c accesses, because it has > the same i2c address with controller. Just to make sure: Does it? As I re

Re: [PATCH] i2c: Mark instantiated device nodes with OF_POPULATE

2015-07-09 Thread Wolfram Sang
On Wed, May 06, 2015 at 08:37:33PM +0200, Wolfram Sang wrote: > On Wed, May 06, 2015 at 10:51:07AM -0700, Kevin Hilman wrote: > > On Wed, Apr 22, 2015 at 12:40 AM, Wolfram Sang wrote: > > > On Sat, Jan 24, 2015 at 09:16:29AM +0200, Pantelis Antoniou wrote: > > >>

Re: [PATCH] i2c: removed work arounds in i2c driver for Zynq Ultrascale+ MPSoC

2015-07-09 Thread Wolfram Sang
Hi, thanks for the submission! > +#define CDNS_I2C_BROKEN_HOLD_BIT 0x0001 BIT(0) maybe? > +static const struct cdns_platform_data r1p10_i2c_def = { > + .quirks = CDNS_I2C_BROKEN_HOLD_BIT, }; Closing '}' should be on seperate line. And what Mark said. Other

Re: [PATCH v2 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2015-07-07 Thread Wolfram Sang
On Tue, Jul 07, 2015 at 03:48:52PM +0200, Uwe Kleine-König wrote: > Hello, > > On Tue, Jul 07, 2015 at 03:37:49PM +0200, Jan Lübbe wrote: > > On Mi, 2014-11-26 at 19:05 +0200, Grygorii Strashko wrote: > > > On 11/26/2014 06:04 PM, Uwe Kleine-König wrote: > > > > On Wed, Nov 26, 2014 at 03:59:53PM

Re: [PATCH v2 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2015-07-07 Thread Wolfram Sang
> I only stumbled across this after it was merged, with the additional > ti,has-pfunc property instead of using the compatible string (which > would be better for a soc-dependent feature). Can we still fix this? Makes sense to me. signature.asc Description: Digital signature

Re: [RFC 1/3] of: make of_mutex public

2015-07-03 Thread Wolfram Sang
> What is it that we’re trying to do here? What is the use case? http://www.spinics.net/lists/devicetree/msg85462.html I'll bounce the mails to you as well. Thanks, Wolfram signature.asc Description: Digital signature

Re: [RFC 3/3] ARM: shmobile: r8a7790: rework dts to use i2c demuxer

2015-07-01 Thread Wolfram Sang
On Wed, Jul 01, 2015 at 09:10:23AM +0200, Geert Uytterhoeven wrote: > On Tue, Jun 30, 2015 at 11:44 PM, Wolfram Sang wrote: > > --- a/arch/arm/boot/dts/r8a7790-lager.dts > > +++ b/arch/arm/boot/dts/r8a7790-lager.dts > > @@ -49,6 +49,8 @@ > > aliases { > >

Re: [RFC 2/3] i2c: mux: demux-pinctrl: add driver

2015-07-01 Thread Wolfram Sang
> > +Changing I2C controllers: > > + > > +The created mux-device will have a file "cur_master" in its sysfs-entry. > > Write > > +0 there for the first master listed in the "i2c-parent" property, 1 for the > > +second etc. Reading the file will give you a list with the active master > > +marked. >

[RFC 1/3] of: make of_mutex public

2015-06-30 Thread Wolfram Sang
From: Wolfram Sang If we want to use OF_DYNAMIC features outside the of framework, we need to access this lock. If OF maintainers don't like exporting, we can maybe create accessor functions that we can use? Signed-off-by: Wolfram Sang --- drivers/of/of_private.h | 1 - include/linux

[RFC 3/3] ARM: shmobile: r8a7790: rework dts to use i2c demuxer

2015-06-30 Thread Wolfram Sang
From: Wolfram Sang Create a seperate bus for HDMI related I2C slaves and assign it to a i2c-gpio master. It can be switched to the i2c-rcar or i2c-sh_mobile core at runtime. Signed-off-by: Wolfram Sang --- arch/arm/boot/dts/r8a7790-lager.dts | 141 ++-- 1 file

[RFC 0/3] switch I2C IP cores at runtime

2015-06-30 Thread Wolfram Sang
s to the public with these obvious points left open :) PS: Since these patches depend on two others, I pushed out a branch here: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/ip-core-switch-v2-on-4.1-experimental Wolfram Sang (3): of: make of_mutex public i2c: mux: demux

[RFC 2/3] i2c: mux: demux-pinctrl: add driver

2015-06-30 Thread Wolfram Sang
From: Wolfram Sang This driver allows an I2C bus to switch between multiple masters. This is not hot-switching because connected I2C slaves will be re-instantiated. It is meant to select the best I2C core at runtime once the task is known. Example: Prefer i2c-gpio over another I2C core because

Re: [PATCH 2/2] drivercore: Fix unregistration path of platform devices

2015-06-15 Thread Wolfram Sang
late() should be registering > it's resources, and they argument has some merit. However, there are > quite a few platforms that end up broken if we try to do that due to > overlapping resources in the device tree. Until that is fixed, we need > to solve the immediate pr

Re: [PATCH 1/2] of/unittest: Show broken behaviour in the platform bus

2015-06-15 Thread Wolfram Sang
t platform > device unittests, it can live here. It doesn't need to be an explicit > text because the kernel will oops when it is wrong. > > Cc: Pantelis Antoniou > Cc: Wolfram Sang > Cc: Rob Herring > Cc: Greg Kroah-Hartman > Cc: Ricardo Ribalda Delgado > Signed-off-b

Re: [PATCH 2/2] drivercore: Fix unregistration path of platform devices

2015-06-10 Thread Wolfram Sang
> >> This patch from Grant needs to be applied: > >> > >> [PATCH 2/2] drivercore: Fix unregistration path of platform devices > > > > I need some acks before I apply anything else as this is a total mess. > > Yes please. Rob, Pantelis, Wolfram. Can you test my patch and provides acks? Ah, this is

Re: [PATCH] i2c: Mark instantiated device nodes with OF_POPULATE

2015-06-10 Thread Wolfram Sang
> > IIRC it is the one which adds OF_POPULATED. If so, why is this not > > scheduled for 4.1 as this bugfix depends on it? > > No idea. This is an obvious bugfix. Dunno if you did but mentioning after the commit message where you think it should be applied is very helpful for maintainers. > I wo

Re: [PATCH v6 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-10 Thread Wolfram Sang
> After fixing the version string in patch 5 as mentioned there, and added > the acks from Ludovic for the previous version. > > Applied to for-next, thanks! And unrelated to your series, just in case you feel like it, my code checkers say: drivers/i2c/busses/i2c-at91.c:213: style: Checking if u

Re: [PATCH v6 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-10 Thread Wolfram Sang
On Tue, Jun 09, 2015 at 06:22:13PM +0200, Cyrille Pitchen wrote: > ChangeLog > > v6: > - replace "at91sama5d2" by "sama5d2". > > v5: > - print I2C controller version in an already existing dev_info() instead of > adding a new one. > > v4: > - replace 0x%x by %#x when printing I2C controller ve

Re: [PATCH] i2c: Mark instantiated device nodes with OF_POPULATE

2015-06-10 Thread Wolfram Sang
On Wed, Jun 10, 2015 at 07:42:59AM -0500, Rob Herring wrote: > On Wed, Jun 10, 2015 at 12:40 AM, Wolfram Sang wrote: > > > >> >>>> Mark (and unmark) device nodes with the POPULATE flag as appropriate. > >> >>>> This is required to avoid multi p

Re: [PATCH v6 5/6] i2c: at91: print hardware version

2015-06-10 Thread Wolfram Sang
> >>>- dev_info(dev->dev, "AT91 i2c bus driver.\n"); > >>>+ dev_info(dev->dev, "AT91 i2c bus driver (version: %#x).\n", > > >>It looks as if you rather print the driver's version. :-) > > > From my point of view, having a version number for a Linux driver would > >be strange > >Not eve

Re: [PATCH] i2c: Mark instantiated device nodes with OF_POPULATE

2015-06-09 Thread Wolfram Sang
> Mark (and unmark) device nodes with the POPULATE flag as appropriate. > This is required to avoid multi probing when using I2C and device > overlays containing a mux. > This patch is also more careful with the release of the adapter device > which caused a deadlock with

Re: [PATCH v5 4/6] i2c: at91: add support for new alternative command mode

2015-06-09 Thread Wolfram Sang
Nicolas, > > +static struct at91_twi_pdata at91sama5d2_config = { > > No, please name it: > > "sama5d2_config" Thanks for your input, but please don't quote the whole mail for those tiny comments. Only the relevant parts, please. Otherwise it is too easy to miss things. Thanks, Wolfram

Re: [PATCH v4 5/6] i2c: at91: print hardware version

2015-06-03 Thread Wolfram Sang
On Wed, Jun 03, 2015 at 11:04:26AM +0200, Cyrille Pitchen wrote: > The probe() function now prints the hardware version of the I2C > controller. > > Signed-off-by: Cyrille Pitchen Kernel has already very much printout, so I don't see the gain in adding another one. At least, combine it with the

Re: [PATCH v3 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-02 Thread Wolfram Sang
> I was thinking the same so I have tried to cherry-pick the patch on a 3.10.79 > and it didn't cause any conflicts so I thought it could be sent to stable as > is. OK, so reducing context seems to help. Thanks for checking! signature.asc Description: Digital signature

Re: [PATCH v3 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-02 Thread Wolfram Sang
> If you send a new version, could you add stable in Cc to patch 3/6: No need to send a new version just because of an additional ack. I can apply that. However... > Cc: sta...@vger.kernel.org #3.10 and later > If not, Wolfram could you do it please? The problem with 3/6 is that it seems to dep

Re: [PATCH v9 0/3] ARM: mediatek: Add driver for Mediatek I2C

2015-05-31 Thread Wolfram Sang
On Thu, May 21, 2015 at 04:53:27PM +0800, Eddie Huang wrote: > This series is for Mediatek SoCs I2C controller common bus driver. > > Earlier MTK SoC (for example, MT6589, MT8135) I2C HW has some limitations. > New generation SoC like MT8173 fix following limitations: > > 1. Only support one i2c_

Re: [PATCH v9 0/3] ARM: mediatek: Add driver for Mediatek I2C

2015-05-24 Thread Wolfram Sang
> This series already reviewed in public more than six months. In the > early version, 8173 CCF and Pinctrl not be accepted yet, so we don't put > device node with this series. Now both CCF and pinctrl have been > accepted, maybe it's time to add device node.I am glad that if this I2C > version ca

Re: [PATCH RESEND V4 0/4] i2c: busses: xgene: I2C proxy driver for X-Gene

2015-05-12 Thread Wolfram Sang
> - Fix previous comments. Next time, please specify what exactly you changed. This speeds up reviewing *a lot*, because otherwise I have to do this myself. signature.asc Description: Digital signature

Re: [PATCH] of: Move OF flags to be visible even when !CONFIG_OF

2015-04-26 Thread Wolfram Sang
On Fri, Apr 24, 2015 at 12:41:56PM +0300, Pantelis Antoniou wrote: > We need those to be visible even when compiling with CONFIG_OF > disabled, since even the empty of_node_*_flag() method use the > flag. > > Signed-off-by: Pantelis Antoniou Acked-by: Wolfram Sang You should

Re: [PATCH] TESTCASE: of: OOPS when disabling node via OF_DYNAMIC

2015-04-23 Thread Wolfram Sang
> This patch has been posted before but up to now, no-one had a test case that > triggered > the bug, At your service... ;) signature.asc Description: Digital signature

Re: [PATCH] TESTCASE: of: OOPS when disabling node via OF_DYNAMIC

2015-04-23 Thread Wolfram Sang
> Sorry for the non-prompt reply; but just for kicks, can you try the attached > patch? > > I have a hunch this might be the problem. Yeah, this even makes my more complex driver work \o/ I will post it once -rc1 is out. Thanks a lot for your help, much appreciated! signature.asc Description

Re: [PATCH] i2c: Mark instantiated device nodes with OF_POPULATE

2015-04-22 Thread Wolfram Sang
On Sat, Jan 24, 2015 at 09:16:29AM +0200, Pantelis Antoniou wrote: > Mark (and unmark) device nodes with the POPULATE flag as appropriate. > This is required to avoid multi probing when using I2C and device > overlays containing a mux. > This patch is also more careful with the release of the adapt

Re: [PATCH] TESTCASE: of: OOPS when disabling node via OF_DYNAMIC

2015-04-14 Thread Wolfram Sang
Hi Pantelis, thanks for your prompt reply. Unfortunately, I had to wait until I could access the test system again. > > + struct property status_chg = { .name = "status", .length = 9, .value = > > "disabled" }; > > + int ret; > > + > > ^ The status_chg property is on the stack. You can’t do

Re: [PATCH v2 0/4] arm: tegra: implement NVEC driver using tegrai2c.

2015-04-10 Thread Wolfram Sang
> One thing where we need your help as a I2C maintainer is how to represent an > i2c slave device using device-tree. You may remember our discussion in the > past from here [1] where you suggested to just make a slave client by its > compatible name. Stephen Warren from NVIDIA raised some conce

Re: [PATCH v2 2/4] staging/nvec: reimplement on top of tegra i2c driver

2015-04-03 Thread Wolfram Sang
> +/** > + * nvec_slave_cb - I2C slave callback > + * > + * This callback fills our RX buffers and empties our TX > + * buffers. This uses a finite state machine. > + */ > +static int nvec_slave_cb(struct i2c_client *client, > + enum i2c_slave_event event, u8 *val) > +{ > + struct n

Re: [PATCH v2 0/4] arm: tegra: implement NVEC driver using tegra i2c.

2015-04-03 Thread Wolfram Sang
On Mon, Mar 30, 2015 at 11:00:11PM +0300, Andrey Danin wrote: > NVEC driver contains code to manage tegra i2c controller in slave mode. > I2C slave support was implemented in linux kernel. The goal of this > patch serie is to implement I2C slave mode in tegra drived and rework > NVEC driver to use

Re: [PATCH v2 1/4] i2c: tegra: implement slave mode

2015-04-03 Thread Wolfram Sang
> +static void tegra_i2c_slave_write(struct tegra_i2c_dev *i2c_dev, u32 val) > +{ > + i2c_writel(i2c_dev, val, I2C_SL_RCVD); > + > + /* > + * TODO: A correct fix needs to be found for this. > + * > + * We experience less incomplete messages with this delay than without > +

Re: [PATCH_V3 0/2] i2c: jz4780: Add Ingenic JZ4780 i2c driver

2015-04-03 Thread Wolfram Sang
On Tue, Mar 31, 2015 at 02:03:54PM +0100, Zubair Lutfullah Kakakhel wrote: > Hi, > > Here we have two patches that add support for the i2c > controller present in the Ingenic JZ4780. > > Driver tested on the MIPS Creator CI20. > > V2 - > V3 > Fixes based on feedbac

Re: [PATCH V2 1/3] i2c: busses: add SLIMpro I2C device driver on APM X-Gene platform

2015-04-03 Thread Wolfram Sang
> >> + paddr = dma_map_single(ctx->dev, ctx->dma_buffer, readlen, > >> +DMA_FROM_DEVICE); > > > > The device should be the device of the dma channel. > > The device is not visible on linux, DMA is done by the helper processor. > Perhaps you cah give me some idea how

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-04-03 Thread Wolfram Sang
> While thinking about it (and I still think of it as a 'big issue' > compared to the intention of the initial patch) I came to the > conclusion that I should maybe just go for a board-specific > i2c-mux-pinctrl node instead of adding it to the SoC dtsi. That will > also avoid doubled i2c busses o

[PATCH] TESTCASE: of: OOPS when disabling node via OF_DYNAMIC

2015-03-31 Thread Wolfram Sang
From: Wolfram Sang I wanted to disable a node via OF_DYNAMIC by setting its status to disabled. This code is the minimal testcase, the same happens in a more complex scenario. There is something wrong with freeing resources. Is my module wrong? Or is it a bug? Crashlog without CONFIG_I2C_CHARDEV

Re: [PATCH_V2 2/2] i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780

2015-03-27 Thread Wolfram Sang
Hi, mostly looking good. checkpatch.pl --strict has some whitespaces and continuation issues, please fix them. And sparse rightfully says: drivers/i2c/busses/i2c-jz4780.c:510:51: warning: cast truncates bits from constant value (100 becomes 0) > diff --git a/drivers/i2c/busses/Kconfig b/driver

Re: [PATCH V2 1/3] i2c: busses: add SLIMpro I2C device driver on APM X-Gene platform

2015-03-23 Thread Wolfram Sang
On Wed, Feb 18, 2015 at 11:34:01AM -0800, Feng Kan wrote: > Add SLIMpro I2C device driver on APM X-Gene platform. This I2C > device driver use the SLIMpro Mailbox driver to tunnel message to > the SLIMpro coprocessor to do the work of accessing I2C components. > > Signed-off-by: Feng Kan > Signed

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-23 Thread Wolfram Sang
> If modifying i2c-mux-pinctrl to respect the sub-bus status property is > such a big issue, I'd rather leave the driver as is and expose all > sub-busses to userspace. Well, dunno what 'big issue' is in your book :) What definately needs to be done is: * handle "status" at mux-core level, not m

  1   2   3   4   >