[PATCH 1/4] i2c: uniphier: error out if clock rate is zero

2015-11-30 Thread Masahiro Yamada
This input clock is used to generate the sampling clock for I2C bus. If the clock rate is zero, there is something wrong with the clock driver. Bail out with the appropriate error message in such a case. It would make it easier to find the root cause of failure. Signed-off-by: Masahiro Yamada

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

2015-11-30 Thread Masahiro Yamada
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 zero drivers/i2c/busses/i2c-uniphier-f.c | 11 ++-

[PATCH 2/4] i2c: uniphier: error out if bus speed is zero

2015-11-30 Thread Masahiro Yamada
There is code to divide by "bus_speed" some lines below. To eliminate the possibility of division by zero, bail out if "clock-frequency" is specified as zero. Signed-off-by: Masahiro Yamada --- drivers/i2c/busses/i2c-uniphier.c | 5 + 1 file changed, 5

[PATCH 3/4] i2c: uniphier_f: error out if clock rate is zero

2015-11-30 Thread Masahiro Yamada
This input clock is used to generate the sampling clock for I2C bus. If the clock rate is zero, there is something wrong with the clock driver. Bail out with the appropriate error message in such a case. It would make it easier to find the root cause of failure. Signed-off-by: Masahiro Yamada

[PATCH 4/4] i2c: uniphier_f: error out if bus speed is zero

2015-11-30 Thread Masahiro Yamada
There is code to divide by "bus_speed" some lines below. To eliminate the possibility of division by zero, bail out if "clock-frequency" is specified as zero. Signed-off-by: Masahiro Yamada --- drivers/i2c/busses/i2c-uniphier-f.c | 5 + 1 file changed, 5

[PATCH 15/28] i2c: eg20t: set i2c_adapter->dev.of_node

2015-11-30 Thread Paul Burton
Set the I2C adapter devices of_node to that of the PCI device, such that I2C clients may be instantiated via device tree. Signed-off-by: Paul Burton --- drivers/i2c/busses/i2c-eg20t.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-eg20t.c

[PATCH 14/28] i2c: eg20t: allow build on MIPS platforms

2015-11-30 Thread Paul Burton
Allow the eg20t I2C driver to be built for MIPS platforms, in preparation for use on the MIPS Boston board. Signed-off-by: Paul Burton --- drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/Kconfig

Re: [PATCH v2 3/5] i2c: add I2C_AQ_NO_CLK_STRETCH to i2c-bcm2835.c

2015-11-30 Thread Wolfram Sang
On Thu, Oct 29, 2015 at 12:34:25PM +0100, Nicola Corna wrote: > As reported here > http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html > and confirmed here > https://www.raspberrypi.org/forums/viewtopic.php?p=146272 > the BCM2835 has a hardware bug in its i2c module which prevents a

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

2015-11-30 Thread Wolfram Sang
On Sat, Oct 31, 2015 at 10:21:56AM +, Jonathan Cameron wrote: > On 29/10/15 11:34, Nicola Corna wrote: > > The Si7013/20/21 modules support 2 read modes: > > * Hold mode (blocking), where the device stretches the clock until the end > > of the measurement > > * No Hold mode (non-blocking),

Re: [PATCH v2 1/5] i2c: add i2c quirk flag for unsupported clock stretching

2015-11-30 Thread Wolfram Sang
On Thu, Oct 29, 2015 at 12:34:23PM +0100, Nicola Corna wrote: > Add I2C_AQ_NO_CLK_STRETCH quirk flag, to be used when clock stretching is > not supported. > > Signed-off-by: Nicola Corna Applied to for-next, thanks! signature.asc Description: Digital signature

Re: [PATCH 4/5] i2c: add i2c_check_quirks helper function

2015-11-30 Thread Wolfram Sang
> I don't know about everyone else, but I'm finding this particular style > of email thread very difficult to follow. Same here. > Perhaps either: > * Start a new thread for each new series version. +1 > * label the whole series with a rolling version number rather than doing it > on a per

Re: [PATCH v2 2/5] i2c: add I2C_AQ_NO_CLK_STRETCH to i2c-algo-bit.c

2015-11-30 Thread Wolfram Sang
On Thu, Oct 29, 2015 at 12:34:24PM +0100, Nicola Corna wrote: > Add I2C_AQ_NO_CLK_STRETCH to drivers/i2c/algos/i2c-algo-bit.c when getscl > is not available. > > Signed-off-by: Nicola Corna Applied to for-next, thanks! Please check git-log next time to see how the subsystem

Re: [PATCH 4/5] i2c: add i2c_check_quirks helper function

2015-11-30 Thread Wolfram Sang
On Thu, Oct 29, 2015 at 12:34:26PM +0100, Nicola Corna wrote: > This patch adds a i2c_check_quirks helper function to check the quirk flags > of an i2c adapter, in a similar way to i2c_check_functionality. > > Signed-off-by: Nicola Corna Applied to for-next, thanks!

[PATCH v2 12/16] mfd: core: propagate device properties to sub devices drivers

2015-11-30 Thread Andy Shevchenko
In the similar way like we do for the platform data we propagate the device properties. For example, in case of Intel LPSS drivers we may provide a specific property to tell the actual device driver an additional information such as platform name. Signed-off-by: Andy Shevchenko

[PATCH v2 10/16] driver core: platform: Add support for built-in device properties

2015-11-30 Thread Andy Shevchenko
From: Mika Westerberg Make it possible to pass built-in device properties to platform device drivers. This is useful if the system does not have any firmware interface like Device Tree or ACPI which provides these. Properties associated with the platform device

[PATCH v2 03/16] device property: refactor built-in properties support

2015-11-30 Thread Andy Shevchenko
Instead of using the type and nval fields we will use length (in bytes) of the value. The sanity check is done in the accessors. The built-in property accessors are split in the same way such as device tree. Signed-off-by: Andy Shevchenko ---

[PATCH v2 00/16] intel-lpss: support non-ACPI platforms

2015-11-30 Thread Andy Shevchenko
This series includes few logical sets that bring a support of non-ACPI platforms for Intel Skylake. First part is a refactoring of built-in device properties support: - keep single value inside the structure - provide helper macros to define built-in properties - fall back to secondary fwnode if

[PATCH v2 04/16] device property: keep single value inplace

2015-11-30 Thread Andy Shevchenko
We may save a lot of lines of code and space by keeping single values inside the struct property_entry. Refactor the implementation to do so. Signed-off-by: Andy Shevchenko --- drivers/base/property.c | 33 ++---

[PATCH v2 06/16] device property: improve readability of macros

2015-11-30 Thread Andy Shevchenko
There is no functional change. Signed-off-by: Andy Shevchenko --- drivers/base/property.c | 28 ++-- include/linux/property.h | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/base/property.c

[PATCH v2 05/16] device property: helper macros for property entry creation

2015-11-30 Thread Andy Shevchenko
From: Heikki Krogerus Marcos for easier creation of build-in property entries. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko --- include/linux/property.h | 55

[PATCH v2 15/16] mfd: intel-lpss: Pass HSUART configuration via properties

2015-11-30 Thread Andy Shevchenko
The HS-UART host controller driver needs to know certain properties like width of the register set if it cannot get that information from ACPI or DT. In order to support non-ACPI systems we pass this information to the driver via device properties. Signed-off-by: Mika Westerberg

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

2015-11-30 Thread Ludovic Desroches
On Mon, Nov 30, 2015 at 04:13:20PM +0100, Wolfram Sang wrote: > 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

Re: [PATCH] i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs

2015-11-30 Thread Wolfram Sang
On Mon, Nov 30, 2015 at 02:51:41PM +0100, Wolfram Sang wrote: > On Sun, Sep 27, 2015 at 04:57:08PM +0200, Hans de Goede wrote: > > According to the datasheets to n factor for dividing the tclk is > > 2 to the power n on Allwinner SoCs, not 2 to the power n + 1 as it is > > on other mv64xxx

[PATCH v2 01/16] device property: always check for fwnode type

2015-11-30 Thread Andy Shevchenko
Currently the property accessors unconditionally fall back to built-in property set as a last resort. Make this strict and return an error in case the type of fwnode is unknown. This is actually a follow up to the commit 4fa7508e9f1c (device property: Return -ENXIO if there is no suitable FW

[PATCH v2 14/16] mfd: intel-lpss: Pass SDA hold time to I2C host controller driver

2015-11-30 Thread Andy Shevchenko
From: Mika Westerberg Intel Skylake the LPSS I2C pad circuit has internal delays that require programming non-zero SDA hold time for the I2C host controller. If this is not done communication to slave devices may fail with arbitration lost errors like the one

Re: [PATCH v2] i2c: davinci: Increase module clock frequency

2015-11-30 Thread Wolfram Sang
On Mon, Nov 30, 2015 at 03:51:00PM +0100, Alexander Sverdlin wrote: > I2C controller used in Keystone SoC has an undocumented peculiarity which > results in SDA-SCL margins being dependent on module clock. Driving high > capacity bus near its limits can result in STOP condition sometimes being >

[PATCH v2 09/16] device property: Take a copy of the property set

2015-11-30 Thread Andy Shevchenko
From: Mika Westerberg It is convenient if the property set associated with the device secondary firmware node is a copy of the original. This allows passing property set from a stack for example for devices created dynamically. This also ties the property set

[PATCH v2 13/16] mfd: intel-lpss: Add support for passing device properties

2015-11-30 Thread Andy Shevchenko
From: Mika Westerberg If the boot firmware does not support ACPI we need a way to pass device configuration information to the drivers. The unified device properties API already supports passing platform data via properties so let's take advantage of that and

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

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

Re: [PATCH v2] i2c: davinci: Increase module clock frequency

2015-11-30 Thread Wolfram Sang
On Mon, Nov 30, 2015 at 03:51:00PM +0100, Alexander Sverdlin wrote: > I2C controller used in Keystone SoC has an undocumented peculiarity which > results in SDA-SCL margins being dependent on module clock. Driving high > capacity bus near its limits can result in STOP condition sometimes being >

Re: [PATCHv3 1/2] i2c: cadence: Move to sensible power management

2015-11-30 Thread Wolfram Sang
On Tue, Nov 24, 2015 at 01:01:56PM +0530, Shubhrajyoti Datta wrote: > Currently the clocks are enabled at probe and disabled at remove. > Which keeps the clocks enabled even if no transaction is going on. > This patch enables the clocks at the start of transfer and disables > after it. > > Also

Re: [PATCH v2 16/16] i2c: designware: Convert to use unified device property API

2015-11-30 Thread Wolfram Sang
On Mon, Nov 30, 2015 at 05:11:44PM +0200, Andy Shevchenko wrote: > From: Mika Westerberg > > With ACPI _DSD (introduced in ACPI v5.1) it is now possible to pass device > configuration information from ACPI in addition to DT. In order to support > this, convert

Re: [PATCHv3 2/2] i2c: cadence: Remove the suspended flag

2015-11-30 Thread Wolfram Sang
On Tue, Nov 24, 2015 at 01:01:57PM +0530, Shubhrajyoti Datta wrote: > The suspended flag is a flag holding the device's PM status. > The runtime framework does that for us. > Use pm_runtime_suspended call instead. > > Signed-off-by: Shubhrajyoti Datta Applied to for-next,

[PATCH v3 2/2] ACPI / gpio: Add irq_type when a gpio is used as an interrupt

2015-11-30 Thread Christophe Ricard
When a gpio is used as an interrupt, the irq_type was not available for device driver. It is not align with devicetree probing. Signed-off-by: Christophe Ricard --- drivers/gpio/gpiolib-acpi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v3 0/2] ACPI: Add irq_type to gpio interrupt

2015-11-30 Thread Christophe Ricard
Hi, This serie only move from RFC to final. I am also adding gpio folks for potential feedback. ACPI probing method does not retrieve irq_type from a gpio interrupt declared with GpioInt as it is done with devicetree probing. In other terms, irq_get_trigger_type will always send back 0. Those

Re: [PATCH v3 0/2] ACPI: Add irq_type to gpio interrupt

2015-11-30 Thread Wolfram Sang
> This serie only move from RFC to final. I am also adding gpio folks for > potential > feedback. Why is this relevant for I2C? signature.asc Description: Digital signature

Re: Issues with touchpad / touchscreen on yoga 900

2015-11-30 Thread Mika Westerberg
On Tue, Dec 01, 2015 at 01:35:54AM +0100, Wolfram Sang wrote: > I didn't find any patch coming out of this? Mika, did I miss something? The fix is included in the "intel-lpss: support for non-ACPI platforms" series by Andy [1]. You and Kevin are both Cc'd. https://lkml.org/lkml/2015/11/30/441

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

2015-11-30 Thread Uwe Kleine-König
Hello, On Mon, Nov 30, 2015 at 03:42:15AM +, Gao Pandy wrote: > Ping... The things I pointed out were fixed. I didn't test it, but the patch looks reasonable. I'd say it's ready to cook in next until the merge window opens next time. If you want to interpret this as an Ack, feel free to do

[PATCH] i2c: piix4: remove unneeded assignments

2015-11-30 Thread Wolfram Sang
smatch rightfully says: drivers/i2c/busses/i2c-piix4.c:504 piix4_access warn: unused return: i = inb_p() drivers/i2c/busses/i2c-piix4.c:537 piix4_access warn: unused return: i = inb_p() Signed-off-by: Wolfram Sang --- Christian, can you please check on HW? I could only

Re: [PATCH] i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs

2015-11-30 Thread Wolfram Sang
On Sun, Sep 27, 2015 at 04:57:08PM +0200, Hans de Goede wrote: > According to the datasheets to n factor for dividing the tclk is > 2 to the power n on Allwinner SoCs, not 2 to the power n + 1 as it is > on other mv64xxx implementations. > > I've contacted Allwinner about this and they have

Re: [PATCH] i2c: davinci: Increase module clock frequency

2015-11-30 Thread Wolfram Sang
> /* get minimum of 7 MHz clock, but max of 12 MHz */ > - psc = (input_clock / 700) - 1; > + psc = (input_clock / 1200) - 1; Doesn't make this the above comment invalid? signature.asc Description: Digital signature

Re: [PATCH v4] i2c: taos-evm: replace simple_strtoul by kstrtou8

2015-11-30 Thread Wolfram Sang
On Tue, Nov 24, 2015 at 08:43:27AM +0100, LABBE Corentin wrote: > The simple_strtoul function is marked as obsolete. > This patch replace it by kstrtou8. > > Reviewed-by: Jean Delvare > Tested-by: Jean Delvare > Signed-off-by: LABBE Corentin

Re: [PATCH] i2c: davinci: Increase module clock frequency

2015-11-30 Thread Alexander Sverdlin
Hi! On 30.11.2015 14:55, EXT Wolfram Sang wrote: >> /* get minimum of 7 MHz clock, but max of 12 MHz */ >> > - psc = (input_clock / 700) - 1; >> > + psc = (input_clock / 1200) - 1; > Doesn't make this the above comment invalid? The comment refers to datasheet, not really to the

Re: [PATCH] i2c: davinci: Increase module clock frequency

2015-11-30 Thread Wolfram Sang
> The comment refers to datasheet, not really to the code. And eventual changes > to the datasheet > that's what can make it invalid (though I don't know TI's plans on it). > Nevertheless, yes, I > think, it's better to drop the comment. Should I re-spin the patch with > comment removal in it?

Re: [PATCH v5 0/3] Support multiplexed main SMBus interface on SB800

2015-11-30 Thread Wolfram Sang
On Thu, Nov 19, 2015 at 08:13:46PM +0100, Christian Fetzer wrote: > This is an attempt to upstream the patches created by Thomas Brandon and > Eddi De Pieri to support the multiplexed main SMBus interface on the SB800 > chipset. >

Re: [PATCH v2] i2c: imx: make bus recovery through pinctrl optional

2015-11-30 Thread Linus Walleij
On Fri, Nov 20, 2015 at 10:45 PM, Li Yang wrote: > - if (IS_ERR(i2c_imx->pinctrl)) { > + /* bailout on -ENOMEM or -EPROBE_DEFER, continue for other errors */ > + if (PTR_ERR(i2c_imx->pinctrl) == -ENOMEM || > + PTR_ERR(i2c_imx->pinctrl)

Re: [PATCH v3 00/11] i2c: rcar: tackle race conditions in the driver

2015-11-30 Thread Wolfram Sang
On Thu, Nov 19, 2015 at 04:56:40PM +0100, Wolfram Sang wrote: > Hello RCar Fans! > > So, here is V3 of this series. After a debugging session with Laurent, we > finally fixed his issue for good. It was not board dependent as we thought, > but > toolchain dependent! Hidden by a macro, the driver

Re: [PATCH] i2c: rk3x: populate correct variable for sda_falling_time

2015-11-30 Thread Wolfram Sang
On Wed, Nov 25, 2015 at 04:58:18PM +0100, Wolfram Sang wrote: > Signed-off-by: Wolfram Sang Applied to for-current, thanks! signature.asc Description: Digital signature

[PATCH v2] i2c: davinci: Increase module clock frequency

2015-11-30 Thread Alexander Sverdlin
I2C controller used in Keystone SoC has an undocumented peculiarity which results in SDA-SCL margins being dependent on module clock. Driving high capacity bus near its limits can result in STOP condition sometimes being understood as REPEATED-START by slaves (or NACK instead of ACK, etc...).