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 <w...@the-dreams.de> 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 <akshay.b.

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

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> 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 <wsa+rene...@sang-engineering.com> --- arch/

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

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> If we want to use OF_DYNAMIC features outside the of framework, we need to access this lock. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/of/of_private.h | 1 - include/linux/of.h | 2 ++ 2 file

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

2016-01-06 Thread Wolfram Sang
, 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/r8a7790

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

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> 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: Pref

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

2016-01-06 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> 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: Pref

Re: [PATCH] i2c: rk3x: init module as subsys call

2016-01-05 Thread Wolfram Sang
> > Tomeu from Collabora is working on some better scheme to optimize device > > probing order but it looks like this may be a bit off still. ... > I don't just talk about touch screen driver, most i2c device driver such > as input sensor/camera/rtc/battery will suffer. So people will see

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

Re: [RESEND PATCH v2 0/9] eeprom: at24: at24cs series serial number read

2016-01-05 Thread Wolfram Sang
On Mon, Jan 04, 2016 at 03:01:54PM +0100, Bartosz Golaszewski wrote: > 2016-01-02 21:50 GMT+01:00 Wolfram Sang <w...@the-dreams.de>: > > On Fri, Dec 11, 2015 at 02:55:10PM +0100, Bartosz Golaszewski wrote: > >> 2015-12-11 13:08 GMT+01:00 Wolfram Sang <w...@the-dreams

Re: [PATCH 2/2] i2c: designware: Allow build Baytrail semaphore support when IOSF_MBI=m

2016-01-04 Thread Wolfram Sang
On Thu, Dec 10, 2015 at 03:56:27PM +0200, Jarkko Nikula wrote: > On 12/10/2015 02:59 PM, Andy Shevchenko wrote: > >On Thu, 2015-12-10 at 13:48 +0200, Jarkko Nikula wrote: > >>I believe i2c-designware-baytrail.c doesn't have strict dependency > >>that > >>Intel SoC IOSF Sideband support must be

Re: [PATCH] i2c: designware: retry transfer on transient failure

2016-01-04 Thread Wolfram Sang
> After that, introduce a new property 'linux,i2c-retry-count' to be used > as retries field in struct i2c_adapter. Hmm, to be honest, I always have difficulties with this "retries" parameter; to me "try x milliseconds" makes more sense than "try 5 times". It is there for ages, so we have to

Re: [PATCH v1 1/3] i2c: rk3x: add calc_divs ops for new version

2016-01-04 Thread Wolfram Sang
> >> +static int rk3x_i2c_v0_calc_divs(unsigned long clk_rate, unsigned long > >> scl_rate, > >> +unsigned long scl_rise_ns, > >> +unsigned long scl_fall_ns, > >> +unsigned long sda_fall_ns, > >

Re: [PATCH v2] i2c: imx: Remove unneeded comments

2016-01-04 Thread Wolfram Sang
On Mon, Jan 04, 2016 at 09:15:37AM -0200, Fabio Estevam wrote: > These multi-lines comments do not follow the standard kernel coding > style. In fact, they are not useful comments, so get rid of them. > > Signed-off-by: Fabio Estevam Applied to for-next, thanks!

Re: [PATCH] i2c: designware: Add support for AMD Seattle I2C

2016-01-04 Thread Wolfram Sang
On Tue, Dec 15, 2015 at 03:55:53PM -0600, Suravee Suthikulpanit wrote: > Add device HID AMDI0510 to match the I2C controlers on AMD Seattle platform > > Signed-off-by: Suravee Suthikulpanit Applied to for-next, thanks! signature.asc Description: Digital

Re: [Patch V1] imx: i2c: fix i2c resource leak with dma transfer

2016-01-04 Thread Wolfram Sang
On Wed, Dec 02, 2015 at 05:52:38PM +0800, Gao Pan wrote: > In i2c_imx_dma_xfer(), when dmaengine_prep_slave_single() returns > NULL, the context goto label err_desc and then return. However, > the memory allocated by dmaengine_prep_slave_single() has not been > freed yet, which leads to resource

Re: [PATCH 1/2] Document: i2c: Add a dt binding for mediatek MT2701 soc

2016-01-04 Thread Wolfram Sang
On Mon, Jan 04, 2016 at 02:15:37PM +0800, Liguo Zhang wrote: > Add a dt binding for the MT2701 soc. > > Signed-off-by: Liguo Zhang <liguo.zh...@mediatek.com> This should probably go with the other patch via arm-soc, or? In that case: Acked-by: Wolfram Sang <w...@the-dreams.de

Re: linux-next: build failure after merge of the i2c tree

2016-01-04 Thread Wolfram Sang
Stephen, > > After merging the i2c tree, today's linux-next build (powerpc > > ppc44x_defconfig) failed like this: Oops, yes. > > /* Bus timings (in ns) for bit-banging */ > > -static struct i2c_timings { > > +static struct ibm_i2c_timings { I changed it to ibm_iic_timings for consistency

Re: [PATCH v4] i2c: designware: Do not require clock when SSCN and FFCN are provided

2016-01-04 Thread Wolfram Sang
On Mon, Jan 04, 2016 at 09:17:35AM -0600, Suravee Suthikulpanit wrote: > The current driver uses input clock source frequency to calculate > values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not > currently have a good way to provide the frequency information. > Instead, we

Re: [Patch V10] i2c: imx: add runtime pm support to improve the performance

2016-01-03 Thread Wolfram Sang
On Fri, Dec 11, 2015 at 10:24:09AM +0800, Gao Pan wrote: > In our former i2c driver, i2c clk is enabled and disabled in > xfer function, which contributes to power saving. However, > the clk enable process brings a busy wait delay until the core > is stable. As a result, the performance is

Re: [Patch V1] i2c: imx: improve code readability

2016-01-03 Thread Wolfram Sang
On Mon, Nov 02, 2015 at 05:05:30PM +0800, Gao Pan wrote: > Replace of_get_named_gpio_flags with of_get_named_gpio because > the latter has less parameters, which improves code readability. > > Signed-off-by: Fugang Duan > Signed-off-by: Gao Pan

Re: [PATCH 1/2] i2c: imx: Improve message log when DMA is not used

2016-01-03 Thread Wolfram Sang
On Sun, Nov 01, 2015 at 02:22:51PM -0200, Fabio Estevam wrote: > From: Fabio Estevam > > When DMA cannot be used, it is better to state that the I2C controller > will operate in PIO mode. > > Signed-off-by: Fabio Estevam Applied to

Re: [PATCH v3] i2c: mediatek: fix i2c multi transfer issue in high speed mode

2016-01-03 Thread Wolfram Sang
On Tue, Dec 15, 2015 at 03:22:26PM +0800, Liguo Zhang wrote: > For mt8173 platform with auto restart support, when doing i2c multi > transfer in high speed, we should ignore the first restart irq after > the master code, otherwise the first transfer will be discarded. > > Signed-off-by: Liguo

Re: [PATCH] i2c: designware: Add support for AMD Seattle I2C

2016-01-03 Thread Wolfram Sang
On Wed, Dec 16, 2015 at 06:49:59PM -0600, Suravee Suthikulanit wrote: > Mika, > > On 12/16/2015 8:54 AM, Mika Westerberg wrote: > >On Wed, Dec 16, 2015 at 08:29:38AM -0600, Suravee Suthikulpanit wrote: > >>> > >>> > >>>On 12/16/2015 03:16 AM, Mika Westerberg wrote: > >On Tue, Dec 15, 2015 at

Re: [V1, 1/2] i2c: brcmstb: Adding support for CM and DSL SoCs

2016-01-03 Thread Wolfram Sang
On Wed, Dec 16, 2015 at 03:49:09PM -0500, Kamal Dasu wrote: > Broadcoms DSL, CM (cable modem)and STB I2C core implementation have > 8 data in/out registers that can transfer 8 bytes or 32 bytes max. > Cable and DSL "Peripheral" i2c cores use single byte per data > register and the STB can use 4

Re: [PATCH 04/10] i2c: st: use to_platform_device()

2016-01-03 Thread Wolfram Sang
On Sun, Dec 27, 2015 at 09:15:42PM +0800, Geliang Tang wrote: > Use to_platform_device() instead of open-coding it. > > Signed-off-by: Geliang Tang Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH 3/9] i2c: designware: use to_pci_dev()

2016-01-03 Thread Wolfram Sang
On Sun, Dec 27, 2015 at 06:45:59PM +0800, Geliang Tang wrote: > Use to_pci_dev() instead of open-coding it. > > Signed-off-by: Geliang Tang Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [RESEND PATCH v2 0/9] eeprom: at24: at24cs series serial number read

2016-01-02 Thread Wolfram Sang
On Fri, Dec 11, 2015 at 02:55:10PM +0100, Bartosz Golaszewski wrote: > 2015-12-11 13:08 GMT+01:00 Wolfram Sang <w...@the-dreams.de>: > > On Wed, Dec 02, 2015 at 11:25:17AM +0100, Bartosz Golaszewski wrote: > >> Chips from the at24cs EEPROM series have an additional rea

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.

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 > > --- >

Re: [PATCH v3 0/5] i2c: img-scb: enchancements to support i2c on pistachio

2016-01-02 Thread Wolfram Sang
On Thu, Nov 19, 2015 at 09:35:12AM +, Sifan Naeem wrote: > The following patches are required to enchance the existing driver to > support i2c on pistachio. > > This patch series depends on the series of fixes posted earlier[1]. > The features added in this series were tested with the earlier

Re: [PATCH 0/3] i2c: rcar: adapt PM usage to multi master case

2016-01-02 Thread Wolfram Sang
On Wed, Dec 23, 2015 at 05:56:31PM +0100, Wolfram Sang wrote: > If we are in a multi-master scenario, we need to block runtime PM so the > arbitration circuit stays awake. > > So, we define a new binding and adapt the i2c-rcar driver to have an example > implementation. Appl

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 > > --- > >

Re: i2c-core: One function call less in acpi_i2c_space_handler() after error detection

2015-12-26 Thread Wolfram Sang
On Sat, Dec 26, 2015 at 09:52:11AM +0100, SF Markus Elfring wrote: > >> The kfree() function was called in one case by the > >> acpi_i2c_space_handler() function during error handling > >> even if the passed variable "client" contained a null pointer. > > > > This is OK. kfree() is known to be

Re: [PATCH v2] i2c-core: One function call less in acpi_i2c_space_handler() after error detection

2015-12-25 Thread Wolfram Sang
> The kfree() function was called in one case by the > acpi_i2c_space_handler() function during error handling > even if the passed variable "client" contained a null pointer. This is OK. kfree() is known to be NULL-tolerant and we rely on it in various places to keep the code simpler.

Re: [PATCH 0/2] i2c: proper RuntimePM for the adapter device

2015-12-24 Thread Wolfram Sang
> I think the below drivers > > drivers/i2c/busses/i2c-at91.c > drivers/i2c/busses/i2c-designware-core.c > drivers/i2c/busses/i2c-designware-platdrv.c > drivers/i2c/busses/i2c-rcar.c > drivers/i2c/busses/i2c-sh_mobile.c > drivers/i2c/busses/i2c-hix5hd2.c > drivers/i2c/busses/i2c-nomadik.c >

Re: [PATCH 0/2] i2c: proper RuntimePM for the adapter device

2015-12-24 Thread Wolfram Sang
> > RuntimePM for the logical adapter device should be handled in a central > > place > > by the core, and not by drivers. This series does exactly that. > > This is good idea. Thanks! > Also maybe we can add a flag that the driver enables. > that way for a short period till the driver

[PATCH 2/3] i2c: rcar: remove macros dealing with flags

2015-12-23 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> These macros don't really hide complexity, but C idioms. Removing them makes the code easier to read IMO and make a planned extension easier. Acked-by: Geert Uytterhoeven <geert+rene...@glider.be> Signed-off-by: Wolfram Sang <w

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

2015-12-23 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> We need this binding because some I2C master drivers will need to adapt their PM settings for the arbitration circuitry. Acked-by: Geert Uytterhoeven <geert+rene...@glider.be> Acked-by: Rob Herring <r...@kernel.org> Sign

[PATCH 0/3] i2c: rcar: adapt PM usage to multi master case

2015-12-23 Thread Wolfram Sang
instead of of_get_property (thanks Sergei) * way more testing Wolfram Sang (3): i2c: document binding for multi-master case i2c: rcar: remove macros dealing with flags i2c: rcar: disable PM in multi-master mode Documentation/devicetree/bindings/i2c/i2c.txt | 5 drivers/i2c/busses/i2c

[PATCH 3/3] i2c: rcar: disable PM in multi-master mode

2015-12-23 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> In multi master mode, the IP core needs to be always active for arbitration reasons. Get the config from DT and set up PM depending on the config. Acked-by: Geert Uytterhoeven <geert+rene...@glider.be> Signed-off-by: Wolfram Sa

[PATCH 1/2] i2c: always enable RuntimePM for the adapter device

2015-12-23 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> The adapter device is a logical device. Because of that, it already uses pm_runtime_no_callbacks() in the core. To ensure proper propagation from the children (i2c devices) to the parent of the adapter (the HW device), make sure Run

[PATCH 0/2] i2c: proper RuntimePM for the adapter device

2015-12-23 Thread Wolfram Sang
RuntimePM for the logical adapter device should be handled in a central place by the core, and not by drivers. This series does exactly that. This is the first step of harmonizing RuntimePM handling in I2C. Wolfram Sang (2): i2c: always enable RuntimePM for the adapter device i2c: s3c2410

[PATCH 2/2] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-23 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> RuntimePM of the adapter device is now taken care of by the core. So, we can remove these calls. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/i2c/busses/i2c-s3c2410.c | 6 -- 1 file changed,

Re: [PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-19 Thread Wolfram Sang
> > Asking linux-pm for help here: If we want to support RuntimePM for I2C > > clients, do we need to enable RuntimePM on the logical I2C adapter > > device (the bus master) which is already marked using > > pm_runtime_no_callbacks? > > In theory you don't need to. But there are some advantages

[PULL REQUEST] i2c for 4.4

2015-12-19 Thread Wolfram Sang
kko Nikula (1): i2c: designware: Keep pm_runtime_enable/_disable calls in sync Wolfram Sang (2): i2c: rk3x: populate correct variable for sda_falling_time i2c: rcar: disable runtime PM correctly in slave mode Xiangliang Yu (1): i2c: designware: fix IO timeout issue for AMD

Re: [PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-19 Thread Wolfram Sang
Hi, > > Since commit 6ada5c1e1b077a ("i2c: Mark adapter devices with > > pm_runtime_no_callbacks"), runtime PM on adapters turned into a no-op. > > So, we can remove these calls. > > Won't this break i2c client devices that use runtime PM? Not sure > if any cases of such client exist now, I'll

Re: [PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-19 Thread Wolfram Sang
On Thu, Dec 17, 2015 at 09:46:55AM +, Charles Keepax wrote: > On Wed, Dec 16, 2015 at 02:53:07PM +0100, Sylwester Nawrocki wrote: > > On 15/12/15 19:14, Wolfram Sang wrote: > > > Since commit 6ada5c1e1b077a ("i2c: Mark adapter devices with > > > pm_ru

Re: [PATCH] i2c: allow building emev2 without slave mode again

2015-12-17 Thread Wolfram Sang
> > My conclusion for now is: > > > > There needs something to be done surely, but currently I don't have the > > bandwidth to do it or even play around with it. I am not fully happy > > with your patches as well because __maybe_unused has some kind of "last > > resort" feeling to me. > > I

Re: [PATCH] i2c: allow building emev2 without slave mode again

2015-12-17 Thread Wolfram Sang
On Mon, Dec 14, 2015 at 11:27:22PM +0100, Arnd Bergmann wrote: > On Monday 14 December 2015 14:52:06 Wolfram Sang wrote: > > > > What about not ifdeffing the inline function and keep the build error > > > > whenever someone uses it without I2C_SLAVE being selected? >

[PATCH] i2c: emev: select I2C slave support

2015-12-17 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Until we have proper support to make I2C slave support fully optional, select it to prevent build errors on randconfigs. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/i2c/busses/Kconfig | 1 + 1 fil

[PATCH] i2c: make i2c_parse_fw_timings() always visible

2015-12-17 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> This function used to be DT only, so it lived inside a CONFIG_OF block. Now it uses device attributes and must be moved outside of it. No further code changes. Reported-by: Jim Davis <jim.ep...@gmail.com> Signed-off-by: Wolfram Sa

Re: randconfig build error with next-20151216, in drivers/i2c/busses

2015-12-17 Thread Wolfram Sang
On Wed, Dec 16, 2015 at 09:44:00AM -0700, Jim Davis wrote: > Building with the attached random configuration file, > > ERROR: "i2c_parse_fw_timings" [drivers/i2c/busses/i2c-rcar.ko] undefined! Thanks! I just sent a patch to fix it. signature.asc Description: Digital signature

Re: [PATCH v2] i2c: rcar: disable runtime PM correctly in slave mode

2015-12-17 Thread Wolfram Sang
On Wed, Dec 16, 2015 at 08:05:18PM +0100, Wolfram Sang wrote: > From: Wolfram Sang <wsa+rene...@sang-engineering.com> > > When we also are I2C slave, we need to disable runtime PM because the > address detection mechanism needs to be active all the time. However, we > can ree

Re: [PATCH] i2c: emev: select I2C slave support

2015-12-17 Thread Wolfram Sang
On Thu, Dec 17, 2015 at 01:09:32PM +0100, Wolfram Sang wrote: > From: Wolfram Sang <wsa+rene...@sang-engineering.com> > > Until we have proper support to make I2C slave support fully optional, > select it to prevent build errors on randconfigs. > > Signed-off-by: Wolfra

Re: [PATCH] i2c: make i2c_parse_fw_timings() always visible

2015-12-17 Thread Wolfram Sang
On Thu, Dec 17, 2015 at 01:32:36PM +0100, Wolfram Sang wrote: > From: Wolfram Sang <wsa+rene...@sang-engineering.com> > > This function used to be DT only, so it lived inside a CONFIG_OF block. > Now it uses device attributes and must be moved outside of it. No >

Re: linux-next: Tree for Dec 16 (i2c/busses/i2c-emev2)

2015-12-16 Thread Wolfram Sang
On Wed, Dec 16, 2015 at 01:05:20PM -0800, Randy Dunlap wrote: > On 12/15/15 21:43, Stephen Rothwell wrote: > > Hi all, > > > > Changes since 20151215: > > > > The drm-misc tree gained a conflict against Linus' tree. > > > > The i2c tree gained a build failure for which I applied a patch. > > >

[RFC 0/3] i2c: rcar: adapt PM usage to multi master case

2015-12-16 Thread Wolfram Sang
works fine here on my Lager board. Wolfram Sang (3): i2c: document binding for multi-master case i2c: rcar: remove macros dealing with flags i2c: rcar: disable PM in multi-master mode Documentation/devicetree/bindings/i2c/i2c.txt | 5 drivers/i2c/busses/i2c-rcar.c | 39

[RFC 2/3] i2c: rcar: remove macros dealing with flags

2015-12-16 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> These macros don't really hide complexity, but C idioms. Removing them makes the code easier to read IMO and make a planned extension easier. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/i2c/busse

[RFC 3/3] i2c: rcar: disable PM in multi-master mode

2015-12-16 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> In multi master mode, the IP core needs to be always active for arbitration reasons. Get the config from DT and set up PM depending on the config. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/i2

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

2015-12-16 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> 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: Wolfra

[PATCH v2] i2c: rcar: disable runtime PM correctly in slave mode

2015-12-16 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> When we also are I2C slave, we need to disable runtime PM because the address detection mechanism needs to be active all the time. However, we can reenable runtime PM once the slave instance was unregistered. So, use pm_runtime_get_sy

[PATCH] i2c: rcar: disable runtime PM correctly in slave mode

2015-12-16 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> When we also are I2C slave, we need to disable runtime PM because the address detection mechanism needs to be active all the time. However, we can reenable runtime PM once the slave instance was unregistered. So, use pm_runtime_disable/

Re: [PATCH v2 1/2] i2c: xlr: fix extra read/write at end of rx transfer

2015-12-16 Thread Wolfram Sang
On Tue, Dec 15, 2015 at 11:15:05PM +, Mans Rullgard wrote: > The BYTECNT register holds the transfer size minus one. Setting it to > the correct value removes the need for a dummy read/write at the end of > each transfer. As zero-length transfers are not supported, do not > advertise

Re: [PATCH] i2c: rcar: disable runtime PM correctly in slave mode

2015-12-16 Thread Wolfram Sang
On Wed, Dec 16, 2015 at 04:55:28PM +0100, Geert Uytterhoeven wrote: > Hi Wolfram, > > On Wed, Dec 16, 2015 at 4:43 PM, Wolfram Sang <w...@the-dreams.de> wrote: > > I have another case, may I ask your advice about this, too? When an I2C > > bus is marked in DT as multi-

Re: [PATCH] i2c: rcar: disable runtime PM correctly in slave mode

2015-12-16 Thread Wolfram Sang
hieve this, since it has proper > > refcounting. pm_runtime_allow/forbid is like a global switch which is > > unsuitable here. > > > > Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> > > --- > > > > I'd be grateful to get an ACK

[PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-15 Thread Wolfram Sang
Since commit 6ada5c1e1b077a ("i2c: Mark adapter devices with pm_runtime_no_callbacks"), runtime PM on adapters turned into a no-op. So, we can remove these calls. Signed-off-by: Wolfram Sang <w...@the-dreams.de> --- drivers/i2c/busses/i2c-s3c2410.c | 6 -- 1 file chan

Re: [PATCH 2/3] i2c: xlr: fix extra read/write at end of rx transfer

2015-12-15 Thread Wolfram Sang
On Mon, Nov 02, 2015 at 02:03:37AM +, Mans Rullgard wrote: > The BYTECNT register holds the transfer size minus one. Setting it > to the correct value requires a dummy read/write only for zero-length > transfers as it is impossible to request one from the hardware. If a > zero-length

Re: [PATCH 1/3] i2c: xlr: add support for Sigma Designs controller variant

2015-12-15 Thread Wolfram Sang
On Mon, Nov 02, 2015 at 02:03:36AM +, Mans Rullgard wrote: > Sigma Designs chips use a variant of this controller with the following > differences: > > - The BUSY bit in the STATUS register is inverted > - Bit 8 of the CONFIG register must be set > - The controller can generate interrupts >

Re: [PATCH 3/3] i2c: xlr: add interrupt support for Sigma Designs chips

2015-12-15 Thread Wolfram Sang
On Mon, Nov 02, 2015 at 02:03:38AM +, Mans Rullgard wrote: > The Sigma Designs variant of this controller has the ability to generate > interrupts. This is controlled using two additional registers, oddly > enough overlapping with the defined but unused HDSTATIM. > > This patch adds support

Re: [PATCH 0/4] i2c: uniphier: add minor sanity checks to i2c-uniphier/i2c-uniphier-f

2015-12-14 Thread Wolfram Sang
On Mon, Nov 30, 2015 at 06:53:32PM +0900, Masahiro Yamada wrote: > > > > Masahiro Yamada (4): > i2c: uniphier: error out if clock rate is zero > i2c: uniphier: error out if bus speed is zero > i2c: uniphier_f: error out if clock rate is zero > i2c: uniphier_f: error out if bus speed is

Re: [PATCH 1/2] i2c: designware: Keep pm_runtime_enable/_disable calls in sync

2015-12-12 Thread Wolfram Sang
On Thu, Dec 10, 2015 at 01:48:43PM +0200, Jarkko Nikula wrote: > On an hardware shared I2C bus (certain Intel Baytrail SoC platforms) the > runtime PM disable depth keeps increasing over repeated modprobe/rmmod > cycle because pm_runtime_disable() is called without checking should it > be disabled

Re: [PATCH v2] I2C: designware: fix IO timeout issue for AMD controller

2015-12-12 Thread Wolfram Sang
On Fri, Dec 11, 2015 at 08:02:53PM +0800, Xiangliang Yu wrote: > Because of some hardware limitation, AMD I2C controller can't > trigger pending interrupt if interrupt status has been changed > after clearing interrupt status bits. Then, I2C will lost > interrupt and IO timeout. > > According to

Re: touchscreen: edt-ft5x06: Prevent DMA driver from mapping an area on stack

2015-12-12 Thread Wolfram Sang
> Frankly speaking I do not know where the fix should actually be. I2C IMX > driver somehow taking care of this or the users of I2C, touchscreen drivers > in this case. In my opinion, the fix should be with the touchscreen driver > however I did like to have feedback or hear opinions on what is

Re: [RESEND PATCH v2 0/9] eeprom: at24: at24cs series serial number read

2015-12-11 Thread Wolfram Sang
On Wed, Dec 02, 2015 at 11:25:17AM +0100, Bartosz Golaszewski wrote: > Chips from the at24cs EEPROM series have an additional read-only memory area > containing a factory pre-programmed serial number. In order to access it, a > dummy write must be executed before reading the serial number bytes.

Re: [PATCH v6] at24: Support SMBus read/write of 16-bit devices

2015-12-11 Thread Wolfram Sang
On Mon, Nov 16, 2015 at 06:02:19PM -0600, Aaron Sierra wrote: > Previously, the at24 driver would bail out in the case of a 16-bit > addressable EEPROM attached to an SMBus controller. This is because > SMBus block reads and writes don't map to I2C multi-byte reads and > writes when the offset

Re: [PATCH] i2c: allow building emev2 without slave mode again

2015-12-10 Thread Wolfram Sang
On Thu, Dec 10, 2015 at 02:14:49PM +0100, Arnd Bergmann wrote: > The emev2 driver stopped compiling in today's linux-next kernel: > > drivers/i2c/busses/i2c-emev2.c: In function 'em_i2c_slave_irq': > drivers/i2c/busses/i2c-emev2.c:233:23: error: storage size of 'event' isn't > known >

Re: [Patch V1] i2c: imx: init bus recovery info before adding i2c adapter

2015-12-09 Thread Wolfram Sang
> I have sent out an i2c runtime patch which was acked by Uwe Kleine. I > thought it would be accepted, so I sent out this one based on that one. Ah, I see. That is okay to assume. However, this patch is 4.4 material, while the other patch is 4.5 material, so I needed that rebase.

[PATCH v2 2/9] i2c: add generic routine to parse DT for timing information

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Inspired from the i2c-rk3x driver (thanks guys!) but refactored and extended. See built-in docs for further information. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/i2c/i2c

[PATCH v2 3/9] i2c: rcar: refactor probe function a little

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> The probe function is a little bit messy, something here, something there. Rework it so that there is some order: first init the private structure, then the adapter, then do HW init. This also allows us to remove the device ar

[PATCH v2 0/9] i2c: add generic support for timing parameters in DT

2015-12-08 Thread Wolfram Sang
above the "status" property Wolfram Sang (9): i2c: document generic DT bindings for timing parameters i2c: add generic routine to parse DT for timing information i2c: rcar: refactor probe function a little i2c: rcar: switch to i2c generic dt parsing i2c: rcar: honor additional i

[PATCH v2 8/9] ARM: shmobile: r8a7794: dtsi: add internal delay for i2c IPs

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- arch/arm/boot/dts/r8a7794.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi index 6f

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

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> 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 an

[PATCH v2 4/9] i2c: rcar: switch to i2c generic dt parsing

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Switch to the new generic functions. Plain convert, no functionality added yet. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/i2c/busses/i2c-rcar.c | 16 +--- 1 file changed, 9 inse

[PATCH v2 9/9] arm64: renesas: r8a7795: add internal delay for i2c IPs

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot

[PATCH v2 6/9] ARM: shmobile: r8a7790: dtsi: add internal delay for i2c IPs

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- arch/arm/boot/dts/r8a7790.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 6c

[PATCH v2 7/9] ARM: shmobile: r8a7791: dtsi: add internal delay for i2c IPs

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- arch/arm/boot/dts/r8a7791.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 76

[PATCH v2 5/9] i2c: rcar: honor additional i2c timings from DT

2015-12-08 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 4 drivers/i2c/busses/i2c-rcar.c | 21 - 2 files changed, 1

Re: [PATCH v2 2/9] i2c: add generic routine to parse DT for timing information

2015-12-08 Thread Wolfram Sang
> I wonder if it makes sense to add "i2c-sda-hold-time-ns" (taken from the > designware driver DT binding) to the timings structure? It is tHD;DAT > parameter in the I2C bus specification. It totally makes sense. I just didn't need it for the RCar driver and didn't want to implement something

Re: [PATCH v2 2/9] i2c: add generic routine to parse DT for timing information

2015-12-08 Thread Wolfram Sang
> Too many && use_defaults. What about > > memset(t, 0, sizeof(*t)); > > device_property_read_u32(dev, "i2c-scl-internal-delay-ns", > >scl_int_delay_ns); > > if (!use_defaults) >  return; I like this! Thanks for the input. signature.asc Description: Digital signature

Re: [PATCH v2 2/9] i2c: add generic routine to parse DT for timing information

2015-12-08 Thread Wolfram Sang
On Tue, Dec 08, 2015 at 02:03:23PM +0100, Wolfram Sang wrote: > > > Too many && use_defaults. What about > > > > memset(t, 0, sizeof(*t)); > > > > device_property_read_u32(dev, "i2c-scl-internal-delay-ns", > > >scl_int_del

Re: Question on device tree bindings for I2C

2015-12-07 Thread Wolfram Sang
> Do you have any recommendation for that purpose ? I prefer i2c-.txt. Happy hacking, Wolfram signature.asc Description: Digital signature

Re: [PATCH v2] emev2: add slave support

2015-12-05 Thread Wolfram Sang
> - Updated email to contain +renesas This mail address did not work a second ago. signature.asc Description: Digital signature

Re: [Patch V1] i2c: imx: init bus recovery info before adding i2c adapter

2015-12-05 Thread Wolfram Sang
On Fri, Dec 04, 2015 at 05:33:14PM +0800, Gao Pan wrote: > During driver probe, i2c_imx_init_recovery_info() must come before > i2c_add_numbered_adapter(), because the get/set_scl() functions > are assigned in i2c_register_adapter() under the conditon that bus > recover_info are initialized.

Re: [PATCH v5 5/5] iio: humidity: si7020: add No Hold read mode

2015-12-05 Thread Wolfram Sang
> If Wolfram doesn't pick this up, please ping me after the next merge window. I tried to pick it a second ago, but it could not be applied (my branch is based on 4.4-rc3). So, I really think it's better you pick it and handle the conflicts. signature.asc Description: Digital signature

Re: [PATCH v2] i2c: emev2: add slave support

2015-12-05 Thread Wolfram Sang
On Sat, Dec 05, 2015 at 06:51:31PM +0100, Niklas Söderlund wrote: > Add I2C slave provider using the generic slave interface. > > Signed-off-by: Niklas Söderlund Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH 2/9] i2c: add generic routine to parse DT for timing information

2015-12-04 Thread Wolfram Sang
> > +void of_i2c_parse_timings(struct device_node *node, struct i2c_timings *t, > > bool use_defaults) > > +{ > > + memset(t, 0, sizeof(*t)); > > + > > + if (of_property_read_u32(node, "clock-frequency", >bus_freq_hz) && > > use_defaults) > > + t->bus_freq_hz = 10; > > Why not

Re: [RFC 5/9] i2c: rcar: honor additional i2c timings from DT

2015-12-03 Thread Wolfram Sang
Hi Geert, > > - round = (ick + 50) / 100 * 285; > > + sum = t->scl_fall_ns + t->scl_rise_ns + t->scl_int_delay_ns; > > + round = (ick + 50) / 100 * sum; > > If you're sure it cannot overflow, doing the "* sum" before the division > improves accuracy. Thanks for

[PATCH 3/9] i2c: rcar: refactor probe function a little

2015-12-03 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> The probe function is a little bit messy, something here, something there. Rework it so that there is some order: first init the private structure, then the adapter, then do HW init. This also allows us to remove the device ar

[PATCH 2/9] i2c: add generic routine to parse DT for timing information

2015-12-03 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Inspired from the i2c-rk3x driver (thanks guys!) but refactored and extended. See built-in docs for further information. Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- drivers/i2c/i2c

[PATCH 9/9] arm64: renesas: r8a7795: add internal delay for i2c IPs

2015-12-03 Thread Wolfram Sang
From: Wolfram Sang <wsa+rene...@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot

  1   2   3   4   5   6   7   8   9   10   >