Re: [PATCH] i2c: omap: fix OOPS in omap_i2c_unidle() during probe

2010-03-31 Thread Jarkko Nikula
Walmsley p...@pwsan.com BTW, Tony had the same fix buried in an another thread: http://marc.info/?l=linux-omapm=126826012627677w=2 You could add my tested by as well to which one goes in but the fix should go for 2.6.34 as the mainline doesn't boot otherwise on OMAP. Tested-by: Jarkko Nikula jhnik

Re: [PATCH] i2c: omap: fix OOPS in omap_i2c_unidle() during probe

2010-05-11 Thread Jarkko Nikula
On Tue, 11 May 2010 10:01:22 +0300 Mika Westerberg ext-mika.1.westerb...@nokia.com wrote: I believe this is already in mainline: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c6bd2010fced38444c9fd658f4c6ce61bd185bf Ah, yeah. I was using the sound-2.6.git tree

[PATCH] i2c: Fix modalias for ACPI enumerated I2C devices

2013-10-10 Thread Jarkko Nikula
. Currently this is not problem as matching can happen also with acpi:INTABCD modalias. Fix this by using ACPI hardware ID. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com Cc: Mika Westerberg mika.westerb...@linux.intel.com --- Generated on top of v3.12-rc4-29-g0e7a3ed. --- drivers/i2c

Re: [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices

2013-10-14 Thread Jarkko Nikula
On 10/12/2013 08:04 AM, Mika Westerberg wrote: On Sat, Oct 12, 2013 at 12:16:02AM +0200, Rafael J. Wysocki wrote: I think that this is intentional. We don't want that the i2c modalias matches with the ACPI device (like with the i2c:INTABCD). Instead use ACPI IDs that are added to the driver to

Re: [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices

2013-10-14 Thread Jarkko Nikula
On 10/12/2013 07:18 PM, Mika Westerberg wrote: If we have two ACPI enumerated devices, they have following modalias: i2c-device0: i2c:INTABCD:00 acpi:INTABCD i2c-device1: i2c:INTABCD:01 acpi:INTABCD Likelihood that some random I2C driver has INTABCD:00 or

Re: [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices

2013-10-14 Thread Jarkko Nikula
On 10/14/2013 12:23 PM, Zhang Rui wrote: Hi, On Thu, 2013-10-10 at 17:17 +0300, Jarkko Nikula wrote: There is a minor fault about ACPI enumerated I2C devices with their modalias attribute. Now modalias is set by device instance not by hardware ID. For example i2c:INTABCD:00, i2c:INTABCD:01 etc

Re: [PATCH 1/3] ACPI: add module autoloading support for ACPI enumerated devices

2013-10-14 Thread Jarkko Nikula
all. Will add it in next version. You could have my pre- Tested-by: Jarkko Nikula jarkko.nik...@linux.intel.com. With your set I see bunch of failing modprobe calls from udev for i2c:INTABCD:xy and platform:INTDCBA:xy modaliases gone. -- Jarkko -- To unsubscribe from this list: send the line

Re: [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices

2013-10-16 Thread Jarkko Nikula
On 10/16/2013 03:04 AM, Grant Likely wrote: On Wed, Oct 16, 2013 at 12:47 AM, Rafael J. Wysockir...@sisk.pl wrote: On Tuesday, October 15, 2013 04:31:43 PM Greg Kroah-Hartman wrote: On Tue, Oct 15, 2013 at 11:24:01PM +0200, Rafael J. Wysocki wrote: On Tuesday, October 15, 2013 01:48:29 PM

[RFC 1/2] i2c: Use stable dev_name for ACPI enumerated I2C slaves

2013-10-25 Thread Jarkko Nikula
, probe order, add-on cards or just because of BIOS settings. This patch addresses the problem by using the ACPI device name with i2c- prefix for ACPI enumerated I2C slaves. For them device name x-00yz becomes i2c-INTABCD:ij after this patch. Signed-off-by: Jarkko Nikula jarkko.nik

[RFC 0/2] I2C and SPI dev_name change for ACPI enumerated slaves

2013-10-25 Thread Jarkko Nikula
each other and can go through their own subsystems. Jarkko Nikula (2): i2c: Use stable dev_name for ACPI enumerated I2C slaves spi: Use stable dev_name for ACPI enumerated SPI slaves drivers/i2c/i2c-core.c | 24 drivers/spi/spi.c | 21 ++--- 2 files

[RFC 2/2] spi: Use stable dev_name for ACPI enumerated SPI slaves

2013-10-25 Thread Jarkko Nikula
. This patch addresses the problem by using the ACPI device name with spi- prefix for ACPI enumerated SPI slave. For them device name spix.y becomes spi-INTABCD:ij. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- may not be and This can be problem since I don't know how likely is to have

Re: [RFC 1/2] i2c: Use stable dev_name for ACPI enumerated I2C slaves

2013-10-25 Thread Jarkko Nikula
Hi On 10/25/2013 03:52 PM, Rafael J. Wysocki wrote: +static void i2c_dev_set_name(struct i2c_adapter *adap, +struct i2c_client *client) +{ +#if IS_ENABLED(CONFIG_ACPI) + if (ACPI_HANDLE(client-dev)) { ACPI_HANDLE() already contains an is CONFIG_ACPI enabled?

Re: [RFC 1/2] i2c: Use stable dev_name for ACPI enumerated I2C slaves

2013-10-25 Thread Jarkko Nikula
On 10/25/2013 04:18 PM, Rafael J. Wysocki wrote: On Friday, October 25, 2013 03:55:29 PM Jarkko Nikula wrote: Well, acpi_bus_get_device() is not available for non-ACPI builds and at least the gcc I used for test build didn't optimize that block away. Well, it should. ACPI_HANDLE() translates

Re: [RFC 1/2] i2c: Use stable dev_name for ACPI enumerated I2C slaves

2013-10-28 Thread Jarkko Nikula
Hi Rafael On 10/25/2013 05:08 PM, Rafael J. Wysocki wrote: On Friday, October 25, 2013 04:30:23 PM Jarkko Nikula wrote: Hmm, not only. Referencing to dev field in struct acpi_device by dev_name(adev-dev) here will fail too. Well, something is not quite right here. One of the *reasons

[PATCHv2 1/3] ACPI: Expose struct acpi_device and acpi_bus_get_device() to non-ACPI builds

2013-11-01 Thread Jarkko Nikula
stubs must be available. This patch moves CONFIG_ACPI test so that struct acpi_device definition is available for all builds that include acpi_bus.h and provides a stub for acpi_bus_get_device(). Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- include/acpi/acpi_bus.h | 9

[PATCHv2 3/3] spi: Use stable dev_name for ACPI enumerated SPI slaves

2013-11-01 Thread Jarkko Nikula
. This patch addresses the problem by using the ACPI device name with spi- prefix for ACPI enumerated SPI slave. For them device name spix.y becomes spi-INTABCD:ij. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/spi/spi.c | 20 +--- 1 file changed, 17 insertions

[PATCHv2 2/3] i2c: Use stable dev_name for ACPI enumerated I2C slaves

2013-11-01 Thread Jarkko Nikula
, probe order, add-on cards or just because of BIOS settings. This patch addresses the problem by using the ACPI device name with i2c- prefix for ACPI enumerated I2C slaves. For them device name x-00yz becomes i2c-INTABCD:ij after this patch. Signed-off-by: Jarkko Nikula jarkko.nik

[PATCHv2 0/3] I2C and SPI dev_name change for ACPI enumerated slaves

2013-11-01 Thread Jarkko Nikula
Jarkko Nikula (3): ACPI: Expose struct acpi_device and acpi_bus_get_device() to non-ACPI builds i2c: Use stable dev_name for ACPI enumerated I2C slaves spi: Use stable dev_name for ACPI enumerated SPI slaves drivers/i2c/i2c-core.c | 24 drivers/spi/spi.c | 20

Re: [PATCHv2 0/3] I2C and SPI dev_name change for ACPI enumerated slaves

2013-11-01 Thread Jarkko Nikula
On 11/01/2013 03:20 PM, Wolfram Sang wrote: On Fri, Nov 01, 2013 at 02:18:06PM +0100, Rafael J. Wysocki wrote: Looks good to me. If there are no objections, I can merge these through my tree. Which is basically fine with me. Do you want to have it in 3.13 already? I mean renaming the

Re: [PATCHv2 1/3] ACPI: Expose struct acpi_device and acpi_bus_get_device() to non-ACPI builds

2013-11-04 Thread Jarkko Nikula
On Mon, Nov 04, 2013 at 02:00:45AM +0100, Rafael J. Wysocki wrote: On Saturday, November 02, 2013 11:18:31 PM Rafael J. Wysocki wrote: This turns out the cause build problems to happen on some architectures. I guess it's sufficient to simply define a stub struct acpi_device as struct

[PATCHv3 3/3] spi: Use stable dev_name for ACPI enumerated SPI slaves

2013-11-14 Thread Jarkko Nikula
. This patch addresses the problem by using the ACPI device name with spi- prefix for ACPI enumerated SPI slave. For them device name spix.y becomes spi-INTABCD:ij. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/spi/spi.c | 17 ++--- 1 file changed, 14 insertions(+), 3

[PATCHv3 1/3] ACPI: Provide struct acpi_device stub for !CONFIG_ACPI builds

2013-11-14 Thread Jarkko Nikula
section sizes if code is protected by ACPI_COMPANION() runtime checks as those will be optimized out by later compiler stages in case CONFIG_ACPI is not set. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- Rafael, instead of this we could also have an accessor but adev-dev looked

[PATCHv3 0/3] I2C and SPI dev_name change for ACPI enumerated slaves

2013-11-14 Thread Jarkko Nikula
goes in first and I queue 2-3/3 later to i2c and spi trees. Jarkko Nikula (3): ACPI: Provide struct acpi_device stub for !CONFIG_ACPI builds i2c: Use stable dev_name for ACPI enumerated I2C slaves spi: Use stable dev_name for ACPI enumerated SPI slaves drivers/i2c/i2c-core.c | 21

[PATCHv3 2/3] i2c: Use stable dev_name for ACPI enumerated I2C slaves

2013-11-14 Thread Jarkko Nikula
, probe order, add-on cards or just because of BIOS settings. This patch addresses the problem by using the ACPI device name with i2c- prefix for ACPI enumerated I2C slaves. For them device name x-00yz becomes i2c-INTABCD:ij after this patch. Signed-off-by: Jarkko Nikula jarkko.nik

Re: [alsa-devel] [PATCHv3 1/3] ACPI: Provide struct acpi_device stub for !CONFIG_ACPI builds

2013-11-14 Thread Jarkko Nikula
On 11/14/2013 12:03 PM, Takashi Iwai wrote: At Thu, 14 Nov 2013 11:00:59 +0200, Jarkko Nikula wrote: We have a few cases where we want to access struct device dev field in struct acpi_device from generic code that is build also without CONFIG_ACPI. Provide here a minimal struct acpi_device

[PATCHv4 0/3] I2C and SPI dev_name change for ACPI enumerated slaves

2013-11-14 Thread Jarkko Nikula
/linux-pm Set goes on top of linux-pm/linux-next due dependency to 1/3. As we are now in merge-window I'm fine if 1/3 goes in first and I queue 2-3/3 later to i2c and spi trees. Jarkko Nikula (3): ACPI: Provide acpi_dev_name accessor for struct acpi_device device name i2c: Use stable dev_name

[PATCHv4 2/3] i2c: Use stable dev_name for ACPI enumerated I2C slaves

2013-11-14 Thread Jarkko Nikula
, probe order, add-on cards or just because of BIOS settings. This patch addresses the problem by using the ACPI device name with i2c- prefix for ACPI enumerated I2C slaves. For them device name x-00yz becomes i2c-INTABCD:ij after this patch. Signed-off-by: Jarkko Nikula jarkko.nik

[PATCHv4 1/3] ACPI: Provide acpi_dev_name accessor for struct acpi_device device name

2013-11-14 Thread Jarkko Nikula
dev in struct acpi_device or NULL depending on CONFIG_ACPI setting. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- include/linux/acpi.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 0da49ed..844e7ff 100644

[PATCHv4 3/3] spi: Use stable dev_name for ACPI enumerated SPI slaves

2013-11-14 Thread Jarkko Nikula
. This patch addresses the problem by using the ACPI device name with spi- prefix for ACPI enumerated SPI slave. For them device name spix.y becomes spi-INTABCD:ij. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com Acked-by: Mark Brown broo...@linaro.org --- Mark's ack added as diff between v3

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Jarkko Nikula
On 01/16/2014 09:46 PM, Mark Brown wrote: On Thu, Jan 16, 2014 at 09:05:09PM +0800, Zhang Rui wrote: On Thu, 2014-01-16 at 13:27 +0100, Wolfram Sang wrote: This seems a gap to me but I'm not 100% sure. I saw Grant Likely introduced the OF style MODALIAS to platform bus, and OF style

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-19 Thread Jarkko Nikula
On 01/17/2014 05:57 PM, Mark Brown wrote: On Fri, Jan 17, 2014 at 09:37:56AM +0200, Jarkko Nikula wrote: Sidenote: actually this modalias/module loading issue is different and not related to stable ACPI i2c/spi slave device names. Oh, I'd been under the impression that it was the rewrite

Re: [PATCH V3 1/2] i2c-designware: Add i2c bus locking support

2014-12-04 Thread Jarkko Nikula
Hi On 12/02/2014 02:09 AM, David E. Box wrote: Adds support for acquiring and releasing a hardware bus lock in the i2c designware core transfer function. This is needed for i2c bus controllers that are shared with but not controlled by the kernel. Signed-off-by: David E. Box

[PATCH 1/2] i2c: i801: Remove i801_driver forward declaration

2015-02-06 Thread Jarkko Nikula
struct pci_driver i801_driver forward declaration is needed only for accessing the name field. Remove it and use dev_driver_string() instead. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-i801.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH 2/2] i2c: i801: Use managed devm_* memory and irq allocation

2015-02-06 Thread Jarkko Nikula
This simplifies the error and remove paths. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-i801.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index

Re: [PATCH 2/2] i2c: i801: Use managed devm_* memory and irq allocation

2015-02-06 Thread Jarkko Nikula
On 02/06/2015 04:51 PM, Jean Delvare wrote: Hi Jarkko, On Fri, 6 Feb 2015 15:56:53 +0200, Jarkko Nikula wrote: This simplifies the error and remove paths. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- Looks good, but what about also converting pci_request_region

Re: [PATCHv2 4/5] i2c: i801: Remove pci_enable_device() call from i801_resume()

2015-02-13 Thread Jarkko Nikula
Hi On 02/13/2015 12:33 PM, Jean Delvare wrote: Hi Jarkko, On Wed, 11 Feb 2015 14:32:07 +0200, Jarkko Nikula wrote: Since pci_disable_device() is not called from i801_suspend() and power state is set already it means that subsequent pci_enable_device() calls do practically nothing

[PATCH] i2c: designware: Do not calculate SCL timing parameters needlessly

2015-01-23 Thread Jarkko Nikula
Do SCL timing parameter calculation conditionally depending are custom parameters provided since calculated values will get instantly overwritten by provided parameters. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-designware-core.c | 45

Re: [PATCH v1 3/3] i2c: designware-pci: no need to provide clk_khz

2015-01-23 Thread Jarkko Nikula
values. Reviewed-by: Jarkko Nikula jarkko.nik...@linux.intel.com -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] i2c-designware: fixup of wait_for_completion_timeout return handling

2015-02-09 Thread Jarkko Nikula
Hi On 02/09/2015 06:35 PM, Nicholas Mc Guire wrote: return type of wait_for_completion_timeout is unsigned long not int. An appropriate return variable is introduced and assignment fixed up. Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Patch was compile tested with x86_64_defconfig +

Re: [PATCH v2] i2c: designware: fixup return handling of wait_for_completion_timeout

2015-02-10 Thread Jarkko Nikula
Mc Guire hof...@osadl.org --- v2: Aside from the newly added variable having the wrong type (...) the preferred solution is to simply wrap wait_for_completion_timeout into the condition as the remaining jiffies is actually not used - suggested be Jarkko Nikula jarkko.nik

[PATCHv3 5/5] i2c: i801: Use managed pcim_* PCI device initialization and reservation

2015-02-13 Thread Jarkko Nikula
] i2c-i801.c: don't pci_disable_device() after it was just enabled) and http://marc.info/?l=linux-kernelm=115160053309535w=2 Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- Changes from v2: - over 80 characters long pcim_iomap_regions line splitted - gotos and error labels removed

[PATCHv3 4/5] i2c: i801: Remove pci_enable_device() call from i801_resume()

2015-02-13 Thread Jarkko Nikula
Since pci_disable_device() is not called from i801_suspend() and power state is set already it means that subsequent pci_enable_device() calls do practically nothing but monotonically increase struct pci_dev enable_cnt. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c

[PATCHv3 3/5] i2c: i801: Use managed devm_* memory and irq allocation

2015-02-13 Thread Jarkko Nikula
This simplifies the error and remove paths. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com Reviewed-by: Jean Delvare jdelv...@suse.de --- drivers/i2c/busses/i2c-i801.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/i2c/busses/i2c-i801.c

[PATCHv3 1/5] i2c: i801: Don't break user-visible strings

2015-02-13 Thread Jarkko Nikula
It makes more difficult to grep these error prints from sources if they are split to multiple source lines. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com Reviewed-by: Jean Delvare jdelv...@suse.de --- drivers/i2c/busses/i2c-i801.c | 9 + 1 file changed, 5 insertions(+), 4

[PATCHv3 2/5] i2c: i801: Remove i801_driver forward declaration

2015-02-13 Thread Jarkko Nikula
struct pci_driver i801_driver forward declaration is needed only for accessing the name field. Remove it and use dev_driver_string() instead. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com Reviewed-by: Jean Delvare jdelv...@suse.de --- drivers/i2c/busses/i2c-i801.c | 6 ++ 1 file

[PATCHv2 0/5] i2c: i801: Few cleanups

2015-02-11 Thread Jarkko Nikula
Hi Jean Patches 2-3/5 are otherwise the same I sent last week but now on top of 1/5. Jarkko Nikula (5): i2c: i801: Don't break user-visible strings i2c: i801: Remove i801_driver forward declaration i2c: i801: Use managed devm_* memory and irq allocation i2c: i801: Remove

[PATCHv2 3/5] i2c: i801: Use managed devm_* memory and irq allocation

2015-02-11 Thread Jarkko Nikula
This simplifies the error and remove paths. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-i801.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index

[PATCHv2 4/5] i2c: i801: Remove pci_enable_device() call from i801_resume()

2015-02-11 Thread Jarkko Nikula
Since pci_disable_device() is not called from i801_suspend() and power state is set already it means that subsequent pci_enable_device() calls do practically nothing but monotonically increase struct pci_dev enable_cnt. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c

[PATCHv2 1/5] i2c: i801: Don't break user-visible strings

2015-02-11 Thread Jarkko Nikula
It makes more difficult to grep these error prints from sources if they are split to multiple source lines. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-i801.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses

[PATCHv2 2/5] i2c: i801: Remove i801_driver forward declaration

2015-02-11 Thread Jarkko Nikula
struct pci_driver i801_driver forward declaration is needed only for accessing the name field. Remove it and use dev_driver_string() instead. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com Reviewed-by: Jean Delvare jdelv...@suse.de --- drivers/i2c/busses/i2c-i801.c | 6 ++ 1 file

[PATCHv2 5/5] i2c: i801: Use managed pcim_* PCI device initialization and reservation

2015-02-11 Thread Jarkko Nikula
] i2c-i801.c: don't pci_disable_device() after it was just enabled) and http://marc.info/?l=linux-kernelm=115160053309535w=2 Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-i801.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git

[PATCH 1/2] i2c: core: Remove needless structure member zero initialization

2015-04-29 Thread Jarkko Nikula
No need to clear one struct i2c_client member variable since memset has already cleared all of them. Remove also one space intendation from err label. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/i2c-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

Re: [RFC 0/1] i2c: acpi: revert setting a stable device name

2015-08-17 Thread Jarkko Nikula
On 15.08.2015 18:13, Guenter Roeck wrote: On Fri, Aug 14, 2015 at 12:37:13PM -0700, Dustin Byford wrote: 70762ab from 11/2014 (i2c: Use stable dev_name for ACPI enumerated I2C slaves) modified the sysfs-visible dev_name() for ACPI enumerated I2C devices. With that change,

[RFC] i2c: Revert back to old device naming for ACPI enumerated I2C slaves

2015-08-24 Thread Jarkko Nikula
: 70762abb9f89 i2c: Use stable dev_name for ACPI enumerated I2C slaves Reported-by: Dustin Byford dus...@cumulusnetworks.com Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- This is on top of 4.2.0-rc8. I didn't check exact kernel versions where this still applies but I know we would need

Re: [PATCH 2/2] i2c: designware: Remove adapter name from debug print in i2c_dw_isr()

2015-08-07 Thread Jarkko Nikula
On 07.08.2015 14:10, Wolfram Sang wrote: On Fri, Aug 07, 2015 at 01:43:28PM +0300, Jarkko Nikula wrote: Printing adapter name is irrelevant from this debug print and makes output needlessly long. Having already device and functions names printed here is enough for debugging. Signed-off

[PATCH 1/2] i2c: designware: Remove space between variable and its value in debug print

2015-08-07 Thread Jarkko Nikula
Remove extra space from enabled= 0x to make debug print a bit more dense and to be in sync with stat=0x. While at it, use %#x for printing 0x prefixed hexadecimal values. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-designware-core.c | 2 +- 1 file

[PATCH 2/2] i2c: designware: Remove adapter name from debug print in i2c_dw_isr()

2015-08-07 Thread Jarkko Nikula
Printing adapter name is irrelevant from this debug print and makes output needlessly long. Having already device and functions names printed here is enough for debugging. Signed-off-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- drivers/i2c/busses/i2c-designware-core.c | 4 ++-- 1 file

[PATCH] i2c: designware: Make debug print in i2c_dw_isr() shorter

2015-08-07 Thread Jarkko Nikula
-by: Jarkko Nikula jarkko.nik...@linux.intel.com --- This is my previous [PATCH 1/2] i2c: designware: Remove space between variable and its value in debug print and [PATCH 2/2] i2c: designware: Remove adapter name from debug print in i2c_dw_isr() squashed. --- drivers/i2c/busses/i2c-designware-core.c | 4

Re: [RFC] i2c: Revert back to old device naming for ACPI enumerated I2C slaves

2015-08-25 Thread Jarkko Nikula
On 08/25/2015 08:03 AM, Dustin Byford wrote: On Mon Aug 24 13:52, Jarkko Nikula wrote: I don't know how common ACPI enumerated I2C hwmon devices are but I guess they exists since Dustin notices this issue and wrote With that change, /sys/bus/i2c/devices/i2c-0-004a, for example, became /sys/bus

Re: [PATCH v2 6/6] i2c: designware: Move common probe code into i2c_dw_probe()

2015-10-21 Thread Jarkko Nikula
Hi On 10/20/2015 07:32 PM, Wolfram Sang wrote: There was a merge conflict with a bugfix from i2c/for-current. I think it is okay, but you may want to double check my i2c/for-next. Looks like pm_runtime_disable() got dropped from your 36d48fb5766a ("i2c: designware-platdrv: enable RuntimePM

[PATCH] i2c: designware: Disable runtime PM in case i2c_dw_probe() fails

2015-10-21 Thread Jarkko Nikula
Call to pm_runtime_disable() got dropped while handling the merge conflict between commit 36d48fb5766a ("i2c: designware-platdrv: enable RuntimePM before registering to the core") and commit d80d134182ba ("i2c: designware: Move common probe code into i2c_dw_probe()"). Signed-o

Re: [PATCH v4 2/2] i2c: add ACPI support for I2C mux ports

2015-10-23 Thread Jarkko Nikula
On 10/23/2015 04:40 PM, Mika Westerberg wrote: On Fri, Oct 23, 2015 at 04:13:11PM +0300, Mika Westerberg wrote: On Fri, Oct 23, 2015 at 12:16:11PM +0200, Wolfram Sang wrote: On Fri, Oct 23, 2015 at 11:40:13AM +0300, Mika Westerberg wrote: On Thu, Oct 22, 2015 at 02:17:42AM -0700, Dustin

Re: linux-next: Tree for Oct 21 (drivers/i2c/busses/i2c-designware-platdrv.c)

2015-10-21 Thread Jarkko Nikula
Hi On 10/21/2015 11:28 PM, Randy Dunlap wrote: On 10/20/15 23:16, Stephen Rothwell wrote: Hi all, There will be no linux-next releases after tomorrow until Nov 2 (kernel summit). Changes since 20151020: on i386 or x86_64: when CONFIG_PM_SLEEP is not enabled:

[PATCH] i2c: i801: Add support for Intel Broxton

2015-10-22 Thread Jarkko Nikula
This patch adds the SMBUS PCI ID of Intel Broxton. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- This goes on top of Mika's "[PATCH] i2c: i801: Add support for Intel DNV": http://marc.info/?l=linux-i2c=14447401042=2 --- drivers/i2c/busses/i2c-i801.c | 3 +++

[PATCH] i2c: i801: Document Intel DNV and Broxton

2015-10-26 Thread Jarkko Nikula
Add missing entries into i2c-i801 documentation and Kconfig about recently added Intel DNV and Broxton. Suggested-by: Jean Delvare <jdelv...@suse.de> Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> Cc: Mika Westerberg <mika.westerb...@linux.intel.com> --- Docume

Re: [PATCH] i2c: i801: Add support for Intel Broxton

2015-10-26 Thread Jarkko Nikula
Hi On 10/25/2015 12:50 PM, Jean Delvare wrote: @@ -204,6 +205,7 @@ #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBUS 0xa123 #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMBUS 0x9d23 #define PCI_DEVICE_ID_INTEL_DNV_SMBUS 0x19df +#define

Re: designware platdrv and runtime pm?

2015-11-10 Thread Jarkko Nikula
On 09.11.2015 23:15, Wolfram Sang wrote: Hi guys, while handling the merge conflict for the designware-platdrv, I noticed an asymmetry in the runtime PM handling. Currently, code looks like this: if (dev->pm_runtime_disabled) { pm_runtime_forbid(>dev); } else {

Re: Issues with touchpad / touchscreen on yoga 900

2015-10-30 Thread Jarkko Nikula
Hi On 10/29/2015 08:30 PM, Wolfram Sang wrote: On Thu, Oct 29, 2015 at 11:29:13AM -0600, Kevin Fenzi wrote: Greetings. I'm having problems with a lenovo yoga 900 not seeing it's touchscreen or touchpad. Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1275718 The problem parts of

[PATCH] platform/chrome: Fix i2c-designware adapter name

2015-11-03 Thread Jarkko Nikula
DesignWare I2C adapter" name. Reported-by: Jeremiah Mahler <jmmah...@gmail.com> Fixes: d80d134182ba ("i2c: designware: Move common probe code into i2c_dw_probe()") Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- Hi Jeremiah. This is the same diff I

Re: [PATCH] i2c: designware: Don't mask TX_EMPTY if write is in progress

2015-10-30 Thread Jarkko Nikula
Hi On 10/30/2015 09:37 AM, Jisheng Zhang wrote: Currently when i2c_msg index search is completed, TX_EMPTY interrupt will be masked. But if the size of i2c_msg data is longer than the size of the tx buffer, we still need TX_EMPTY interrupt, otherwise we will get "controller timed out" error.

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

2015-11-06 Thread Jarkko Nikula
On 06.11.2015 06:34, Yu, Xiangliang wrote: -Original Message- From: Mika Westerberg [mailto:mika.westerb...@linux.intel.com] --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c @@ -783,6 +783,9 @@ irqreturn_t i2c_dw_isr(int this_irq, void

Re: [PATCH 0/6] i2c: designware: Code duplication removal and cleanups

2015-10-15 Thread Jarkko Nikula
Hi On 10/15/2015 03:18 PM, Wolfram Sang wrote: Jarkko, would you be interested in maintaining the designware driver? For any non-trivial patch to this driver, I'd need assistance. Yes I can. I think you could add also Mika and Andy as all of us are actively supporting it. -- Jarkko -- To

Re: [PATCH 2/2] i2c: designware: enable High-speed mode for pcidrv

2015-10-15 Thread Jarkko Nikula
On 10/15/2015 08:46 AM, Xiang Wang wrote: 1. "bus speed mode" is a bit different from other parameters. Actually it can be determined by the speed setting of "i2c devices" in ACPI (I2CSerialBus). E.g. If i2c device uses 3MHz, we use High-speed mode for this i2c bus. 2. If we hardcode speed

[PATCH] i2c: designware: Fix build error when !CONFIG_PM_SLEEP

2015-10-21 Thread Jarkko Nikula
2c_prepare and dw_i2c_complete PM hooks to dw_i2c_plat_prepare and dw_i2c_plat_complete since this was obviously missing from the commit. Reported-by: kbuild test robot <fengguang...@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- drivers/i2c/busses/i2c-des

[PATCH v2 6/6] i2c: designware: Move common probe code into i2c_dw_probe()

2015-10-12 Thread Jarkko Nikula
- Using device name for interrupt name. Previous it was platform device name, ACPI device name or "i2c-designware-pci". - Error code from devm_request_irq() and i2c_add_numbered_adapter() will be printed in case of error. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.co

[PATCH 4/6] i2c: designware: Make dw_readl() and dw_writel() static

2015-08-31 Thread Jarkko Nikula
dw_readl() and dw_writel() are not used outside of i2c-designware-core and they are not exported so make them static and remove their forward declaration. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- drivers/i2c/busses/i2c-designware-core.c | 4 ++-- drivers/i2c/buss

[PATCH 6/6] i2c: designware: Move common probe code into i2c_dw_probe()

2015-08-31 Thread Jarkko Nikula
ware-pci" for PCI devices. - Interrupt name too will be "i2c-designware". Previous it was platform device name, ACPI device name or "i2c-designware-pci". - Error code from devm_request_irq() and i2c_add_numbered_adapter() will be printed in case of error. Signed-of

[PATCH 5/6] i2c: designware: Rename platform driver probe and PM functions

2015-08-31 Thread Jarkko Nikula
Make it easier to distinguish between i2c-designware-platdrv and i2c-designware-core functions and to be consistent with i2c-designware-pcidrv. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- drivers/i2c/busses/i2c-designware-platdrv.c | 24

[PATCH 3/6] i2c: designware: Remove unused functions

2015-08-31 Thread Jarkko Nikula
i2c_dw_is_enabled() became unused by the commit be58eda775c8 ("i2c: designware-pci: Cleanup driver power management") and i2c_dw_enable() by the commit 3a48d1c08fe0 ("i2c: prevent spurious interrupt on Designware controllers"). Signed-off-by: Jarkko Nikula <jarkko

[PATCH 0/6] i2c: designware: Code duplication removal and cleanups

2015-08-31 Thread Jarkko Nikula
re-core.ko 42811524 0580516ad drivers/i2c/busses/i2c-designware-pci.ko 43371072 054091521 drivers/i2c/busses/i2c-designware-platform.ko 158433716 16 195754c77 (TOTALS) Jarkko Nikula (6): i2c: designware: Remove interrupt clearing from i2c_dw

[PATCH 1/6] i2c: designware: Remove interrupt clearing from i2c_dw_pci_probe()

2015-08-31 Thread Jarkko Nikula
p the code and replace i2c_dw_clear_int() in i2c_dw_xfer_init() by direct register read as there are no other callers. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- drivers/i2c/busses/i2c-designware-core.c | 8 +--- drivers/i2c/busses/i2c-designware-core.h | 1 - driver

[PATCH] i2c: Remove setting for 1 second timeout from adapter drivers

2015-09-03 Thread Jarkko Nikula
I2C adapter drivers that are using 1 second timeout can leave the timeout unset and let the i2c-core.c: i2c_register_adapter() to set it instead. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- drivers/i2c/busses/i2c-ibm_iic.c | 1 - drivers/i2c/busses/i2c-io

Re: [PATCH RESEND] i2c: Remove setting for 1 second timeout from adapter drivers

2015-12-04 Thread Jarkko Nikula
On 12/03/2015 10:52 PM, Wolfram Sang wrote: On Wed, Dec 02, 2015 at 01:02:34PM +0200, Jarkko Nikula wrote: I2C adapter drivers that are using 1 second timeout can leave the timeout unset and let the i2c-core.c: i2c_register_adapter() to set it instead. Signed-off-by: Jarkko Nikula <jarkko.

[PATCH RESEND] i2c: Remove setting for 1 second timeout from adapter drivers

2015-12-02 Thread Jarkko Nikula
I2C adapter drivers that are using 1 second timeout can leave the timeout unset and let the i2c-core.c: i2c_register_adapter() to set it instead. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- drivers/i2c/busses/i2c-ibm_iic.c | 1 - drivers/i2c/busses/i2c-io

[RFC] i2c: Prevent runtime suspend of parent during adapter registration

2015-12-15 Thread Jarkko Nikula
there won't be spurious runtime PM status changes for parent's probe and lets the driver core to idle the device after probe finishes. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- I noticed this with i2c-designware-platdrv.c which started to do so after commit 36d48fb5766a

Re: [PATCH v2 0/2] i2c:dw: Add APM X-Gene ACPI I2C device support

2015-12-16 Thread Jarkko Nikula
On 12/16/2015 11:04 AM, Mika Westerberg wrote: On Tue, Dec 15, 2015 at 11:20:03AM -0800, Loc Ho wrote: Can we not just add an AML method that will return the operation clock frequency that the I2C driver can use? If the method doesn't existed, we will just bail and do nothing or assume what

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

2015-12-10 Thread Jarkko Nikula
dev->power.disable_depth keeps increasing but keep it sync by calling pm_runtime_disable() only when runtime PM is not disabled. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- drivers/i2c/busses/i2c-designware-platdrv.c | 9 - 1 file changed, 4 insertions(+), 5

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

2015-12-10 Thread Jarkko Nikula
CONFIG_I2C_DESIGNWARE_PLATFORM is built-in. Signed-off-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> --- Hi David. Can you ack/nak this patch as I'm not fully familiar with this HW semaphore can there be problems when IOSF_MBI is built as a module. At least I'm getting similar sensible l

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

2015-12-10 Thread Jarkko Nikula
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 always built-in in order to be able to compile support for Intel Baytrail I2C

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

2015-12-11 Thread Jarkko Nikula
stat = dw_readl(dev, DW_IC_INTR_MASK); + i2c_dw_disable_int(dev); + dw_writel(dev, stat, DW_IC_INTR_MASK); + } Looks ok to me. Acked-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> -- To unsubscribe from this list: send the line "unsubscribe linux-i2

Re: [PATCH] i2c/designware: enable i2c controller to suspend/resume asynchronously

2016-01-05 Thread Jarkko Nikula
Hi On 12/24/2015 04:30 PM, Fu, Zhonghui wrote: Now, PM core supports asynchronous suspend/resume mode for devices during system suspend/resume, and the power state transition of one device may be completed in separate kernel thread. PM core ensures all power state transition dependency between

Re: [PATCH v1 13/13] i2c: designware: Convert to use unified device property API

2015-11-24 Thread Jarkko Nikula
Andy: Was this one able to go separately? At least it builds without rest of the set but is there anything that could break DT based system if there are no patches 1-8/13? Acked-by: Jarkko Nikula <jarkko.nik...@linux.intel.com> -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html