Re: [PATCH 2/3] spi / ACPI: add ACPI enumeration support

2012-11-07 Thread Mika Westerberg
On Tue, Nov 06, 2012 at 11:36:08PM +0100, Rafael J. Wysocki wrote: > > > > OK, but then we need to pass the information obtained from _CRS > > (presumably after some adjustments through _SRS) to drivers, or rather to > > things like the SPI core, I2C core etc. so that they can create device > > ob

Re: [PATCH 2/3] spi / ACPI: add ACPI enumeration support

2012-11-07 Thread Mika Westerberg
On Wed, Nov 07, 2012 at 12:14:31PM +0100, Rafael J. Wysocki wrote: > > So is the idea now that the ACPI core parses the resources and passes them > > forward via struct acpi_device? I'm just wondering how to proceed with > > these I2C and SPI enumeration patches. > > Well, we definitely don't want

Re: [PATCH 1/3] gpio / ACPI: add ACPI support

2012-11-08 Thread Mika Westerberg
On Thu, Nov 08, 2012 at 03:55:18PM +, Grant Likely wrote: > Hi Mika, > > On Sat, Nov 3, 2012 at 7:46 AM, Mika Westerberg > wrote: > > From: Mathias Nyman > > > > Add support for translating ACPI GPIO pin numbers to Linux GPIO API pins. > > Needs a

Re: [PATCH 2/3] spi / ACPI: add ACPI enumeration support

2012-11-08 Thread Mika Westerberg
On Thu, Nov 08, 2012 at 12:32:25PM -0700, Bjorn Helgaas wrote: > Struct device_driver is a generic structure, so it seems strange to > have to include non-generic things like of_device_id and now > acpi_match_table there. Yes, but in a sense the DT and ACPI are "generic". So that they are used to

Re: [PATCH 2/3] spi / ACPI: add ACPI enumeration support

2012-11-08 Thread Mika Westerberg
On Thu, Nov 08, 2012 at 01:46:24AM +0100, Rafael J. Wysocki wrote: > On Wednesday, November 07, 2012 03:05:48 PM Mika Westerberg wrote: > > On Wed, Nov 07, 2012 at 12:14:31PM +0100, Rafael J. Wysocki wrote: > > > > So is the idea now that the ACPI core parses the resources and

Re: [PATCH 2/3] spi / ACPI: add ACPI enumeration support

2012-11-08 Thread Mika Westerberg
On Thu, Nov 08, 2012 at 06:48:05PM +, Grant Likely wrote: > On Sat, Nov 3, 2012 at 7:46 AM, Mika Westerberg > wrote: > > ACPI 5 introduced SPISerialBus resource that allows us to enumerate and > > configure the SPI slave devices behind the SPI controller. This patch adds &g

Re: [PATCH 3/3] i2c / ACPI: add ACPI enumeration support

2012-11-08 Thread Mika Westerberg
On Thu, Nov 08, 2012 at 06:58:47PM +, Grant Likely wrote: > On Sat, Nov 3, 2012 at 7:46 AM, Mika Westerberg > wrote: > > ACPI 5 introduced I2cSerialBus resource that makes it possible to enumerate > > and configure the I2C slave devices behind the I2C controller. This pat

Re: [PATCH 1/3] gpio / ACPI: add ACPI support

2012-11-11 Thread Mika Westerberg
On Fri, Nov 09, 2012 at 03:46:58PM +, Grant Likely wrote: > > I guess It's possible to write a driver like that. > > The only acpi enumerated driver with the acpi_handle set (soon coming to > > upstream) is not done like that. > > > > Do you think this is a case that should be solved now? or j

Re: [PATCH 0/3] Thunderbolt workarounds

2012-12-27 Thread Mika Westerberg
On Wed, Dec 26, 2012 at 05:50:42PM -0700, Bjorn Helgaas wrote: > On Thu, Dec 13, 2012 at 12:25 PM, Kirill A. Shutemov > wrote: > > From: "Kirill A. Shutemov" > > > > I had chance to test two PC setups with Thunderbolt: Acer Aspire S5 and > > Intel DZ77RE-75K motherboard. Unfortunately, both of th

Re: [PATCH] SPI: SSP SPI Controller driver v3

2012-12-19 Thread Mika Westerberg
On Tue, Dec 18, 2012 at 04:11:36PM +0800, chao bi wrote: > > This patch is to implement SSP SPI controller driver, which has been applied > and > validated on intel Moorestown & Medfield platform. The patch are originated by > Ken Mills and Sylvain Centelles > , > migrating to lateset Linux mai

Re: [PATCH v2 1/3] gpio / ACPI: add ACPI support

2012-11-15 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 02:34:22AM +0100, Rafael J. Wysocki wrote: > On Thursday, November 15, 2012 01:03:15 PM Mika Westerberg wrote: > > From: Mathias Nyman > > > > Add support for translating ACPI GPIO pin numbers to Linux GPIO API pins. > > Needs a gpio cont

Re: [PATCH v2 1/3] gpio / ACPI: add ACPI support

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 08:54:48AM +0200, Mika Westerberg wrote: > On Fri, Nov 16, 2012 at 02:34:22AM +0100, Rafael J. Wysocki wrote: > > On Thursday, November 15, 2012 01:03:15 PM Mika Westerberg wrote: > > > From: Mathias Nyman > > > > > > Add support for

Re: [PATCH v2 1/3] gpio / ACPI: add ACPI support

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 10:05:49AM +0200, Mika Westerberg wrote: > > One more thing, sometimes we want to assign the handle like in the case of > SPI controller driver we set the master->dev.acpi_handle. In that case we > can't use DEVICE_ACPI_HANDLE() as is. Should we ju

Re: [PATCH v2 1/3] gpio / ACPI: add ACPI support

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 11:02:05AM +0100, Rafael J. Wysocki wrote: > On Friday, November 16, 2012 10:12:46 AM Mika Westerberg wrote: > > On Fri, Nov 16, 2012 at 10:05:49AM +0200, Mika Westerberg wrote: > > > > > > One more thing, sometimes we want to assign the

Re: [PATCH v2 3/3] i2c / ACPI: add ACPI enumeration support

2012-11-16 Thread Mika Westerberg
Rafael J. Wysocki wrote: > > > > On Thursday, November 15, 2012 01:03:17 PM Mika Westerberg wrote: > > > > > ACPI 5 introduced I2cSerialBus resource that makes it possible to > > > > > enumerate > > > > > and configure the I2C slave devices be

Re: [PATCH 1/6] dmaengine: introduce is_slave_xfer function

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 03:59:14PM +0200, Andy Shevchenko wrote: > This function helps to distinguish the slave type of transfer by checking the > direction parameter. > > Signed-off-by: Andy Shevchenko > Cc: Nicolas Ferre > Cc: Mika Westerberg > Cc: Guennadi Liakhovetski

Re: [PATCH] ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks

2012-11-16 Thread Mika Westerberg
_dev_get_resources() initiating the resources walk returns > an error code. It is better to use AE_CTRL_TERMINATE for this > purpose, however, so do that. > > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg > --- > drivers/acpi/resource.c |2 +- > 1 f

Re: [PATCH v2 3/3] i2c / ACPI: add ACPI enumeration support

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 04:17:29PM +0200, Mika Westerberg wrote: > > > > > +static int acpi_i2c_find_child_address(struct acpi_resource *ares, > > > > > void *data) > > > > > +{ > > > > > + struct acpi_resource_i2c_serialbu

Re: [PATCH 1/6] dmaengine: introduce is_slave_xfer function

2012-11-16 Thread Mika Westerberg
ike shorter names. Fair enough. Reviewed-by: Mika Westerberg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 4/6] dma: ep93xx_dma: reuse is_slave_xfer helper

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 03:59:17PM +0200, Andy Shevchenko wrote: > Signed-off-by: Andy Shevchenko > Cc: Mika Westerberg Acked-by: Mika Westerberg > --- > drivers/dma/ep93xx_dma.c |3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/dma/e

[PATCH v2 3/3 UPDATED] i2c / ACPI: add ACPI enumeration support

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 05:47:53PM +0100, Jean Delvare wrote: > Hi Mika, > > On Fri, 16 Nov 2012 17:23:32 +0200, Mika Westerberg wrote: > > Here's the updated version where we handle 10-bit addresses properly > > (hopefully). > > (...) > > +static int a

Re: [PATCH v2 3/3] i2c / ACPI: add ACPI enumeration support

2012-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 09:02:36PM +0100, Rafael J. Wysocki wrote: > Ah, that's what's called by acpi_dev_get_resources(). But what about writing > it this way: > > static int acpi_i2c_find_child_address(struct acpi_resource *ares, void *data) > { > >if (ares->type == ACPI_RESOURCE_TYPE_

Re: [PATCH v2 3/3 UPDATED] i2c / ACPI: add ACPI enumeration support

2012-11-17 Thread Mika Westerberg
On Fri, Nov 16, 2012 at 11:46:40PM -0700, Bjorn Helgaas wrote: > On Fri, Nov 16, 2012 at 10:28 AM, Mika Westerberg > wrote: > > ... > > From: Mika Westerberg > > Date: Mon, 10 Sep 2012 12:12:32 +0300 > > Subject: [PATCH] i2c / ACPI: add ACPI enumeration sup

Re: [PATCH v2 3/3 UPDATED] i2c / ACPI: add ACPI enumeration support

2012-11-17 Thread Mika Westerberg
On Sat, Nov 17, 2012 at 10:03:54AM +0200, Mika Westerberg wrote: > On Fri, Nov 16, 2012 at 11:46:40PM -0700, Bjorn Helgaas wrote: > > On Fri, Nov 16, 2012 at 10:28 AM, Mika Westerberg > > wrote: > > > ... > > > From: Mika Westerberg > > > Date: Mon

Re: [PATCH v2 2/3] spi / ACPI: add ACPI enumeration support

2012-11-17 Thread Mika Westerberg
On Sat, Nov 17, 2012 at 11:11:59AM +0100, Rafael J. Wysocki wrote: > > +static acpi_status acpi_spi_add_device(acpi_handle handle, u32 level, > > + void *data, void **return_value) > > +{ > > + struct spi_master *master = data; > > + struct resource_list_entry *

Re: [PATCH v2 3/3 UPDATED] i2c / ACPI: add ACPI enumeration support

2012-11-18 Thread Mika Westerberg
On Sat, Nov 17, 2012 at 12:24:45PM +0100, Rafael J. Wysocki wrote: > Well, maybe there is one. Perhaps we can make acpi_platform_notify() > call acpi_bind_one() upfront and only if that fails, do the whole > type->find_device() dance? Of course, acpi_bind_one() would need to > be modified slight

Re: [PATCH 1/2] ACPI: Allow ACPI handles of devices to be initialized in advance

2012-11-19 Thread Mika Westerberg
goto err; > } > > mutex_lock(&acpi_dev->physical_node_lock); > + > + /* Sanity check. */ > + list_for_each_entry(physical_node, &acpi_dev->physical_node_list, node) .. and overwrite it here ;-) Maybe using a different variable for the sanity

Re: [PATCH 2/2] ACPI / platform: Initialize ACPI handles of platform devices in advance

2012-11-19 Thread Mika Westerberg
On Mon, Nov 19, 2012 at 09:44:21PM +0100, Rafael J. Wysocki wrote: > So, we want to have acpi_handle (or acpi_node) in addition to of_node in > struct > device (to be used in the analogous way plus for the execution of AML > methods), > but we don't want all users of device.h to have to include A

Re: [PATCH v2 3/3 UPDATED] i2c / ACPI: add ACPI enumeration support

2012-11-19 Thread Mika Westerberg
On Mon, Nov 19, 2012 at 03:49:25PM -0700, Bjorn Helgaas wrote: > I think the benefit here is that you can merely point > .acpi_match_table at an acpi_device_id[] table, then use > platform_get_resource() as a generic way to get resources, whether the > platform device came from OF, ACPI, etc. The

Re: [Update][PATCH 2/3] ACPI / driver core: Introduce struct acpi_dev_node and related macros

2012-11-20 Thread Mika Westerberg
On Tue, Nov 20, 2012 at 01:59:23AM +0100, Rafael J. Wysocki wrote: > Index: linux/include/linux/device.h > === > --- linux.orig/include/linux/device.h > +++ linux/include/linux/device.h > @@ -578,6 +578,12 @@ struct device_dma_paramete

Re: [Update][PATCH 0/3] ACPI: Simplify "glueing" to physical nodes

2012-11-20 Thread Mika Westerberg
On Tue, Nov 20, 2012 at 01:55:46AM +0100, Rafael J. Wysocki wrote: > > Following is the series with the Greg's feedback taken into account. > Patch [1/3] is the same as before with the bug found by Mika fixed, [2/3] is > an additional patch adding struct acpi_dev_node to compile out unused stuff i

[PATCH v3 3/3] i2c / ACPI: add ACPI enumeration support

2012-11-20 Thread Mika Westerberg
order to get its slave devices enumerated, created and bound to the corresponding ACPI handle. Signed-off-by: Mika Westerberg --- drivers/acpi/Kconfig|6 +++ drivers/acpi/Makefile |1 + drivers/acpi/acpi_i2c.c | 112 +++ drivers/i2c/i2c

[PATCH v3 0/3] ACPI 5 support for GPIO, SPI and I2C

2012-11-20 Thread Mika Westerberg
ludes and dropped from acpi_i2c.h Mathias Nyman (1): gpio / ACPI: add ACPI support Mika Westerberg (2): spi / ACPI: add ACPI enumeration support i2c / ACPI: add ACPI enumeration support drivers/acpi/Kconfig|6 +++ drivers/acpi/Makefile |1 + drivers/acp

[PATCH v3 1/3] gpio / ACPI: add ACPI support

2012-11-20 Thread Mika Westerberg
d-off-by: Mika Westerberg --- drivers/gpio/Kconfig|4 drivers/gpio/Makefile |1 + drivers/gpio/gpiolib-acpi.c | 56 +++ include/linux/acpi_gpio.h | 19 +++ 4 files changed, 80 insertions(+) create mode 100644 dr

[PATCH v3 2/3] spi / ACPI: add ACPI enumeration support

2012-11-20 Thread Mika Westerberg
for further configuration. Signed-off-by: Mika Westerberg --- drivers/spi/spi.c | 115 - 1 file changed, 114 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 84c2861..3ae5351 100644 --- a/drivers/spi/spi.c

Re: [Update 2][PATCH 2/3] ACPI / driver core: Introduce struct acpi_dev_node and related macros

2012-11-20 Thread Mika Westerberg
On Tue, Nov 20, 2012 at 10:34:04AM +0100, Rafael J. Wysocki wrote: > On Tuesday, November 20, 2012 11:10:07 AM Mika Westerberg wrote: > > On Tue, Nov 20, 2012 at 01:59:23AM +0100, Rafael J. Wysocki wrote: > > > Index: linux/incl

Re: [PATCH v3 2/3] spi / ACPI: add ACPI enumeration support

2012-11-20 Thread Mika Westerberg
On Tue, Nov 20, 2012 at 02:05:26PM +0100, Rafael J. Wysocki wrote: > On Tuesday, November 20, 2012 12:29:43 PM Mika Westerberg wrote: > > ACPI 5 introduced SPISerialBus resource that allows us to enumerate and > > configure the SPI slave devices behind the SPI controller.

Re: [PATCH v3 3/3] i2c / ACPI: add ACPI enumeration support

2012-11-20 Thread Mika Westerberg
On Tue, Nov 20, 2012 at 02:06:46PM +0100, Rafael J. Wysocki wrote: > On Tuesday, November 20, 2012 12:29:44 PM Mika Westerberg wrote: > > ACPI 5 introduced I2cSerialBus resource that makes it possible to enumerate > > and configure the I2C slave devices behind the I2C control

[PATCH v4 0/3] ACPI 5 support for GPIO, SPI and I2C

2012-11-20 Thread Mika Westerberg
l - dropped the acpi_enumerate_spi/i2c_device() - added required includes and dropped from acpi_i2c.h Thanks. Mathias Nyman (1): gpio / ACPI: add ACPI support Mika Westerberg (2): spi / ACPI: add ACPI enumeration support i2c / ACPI: add ACPI enumeration support

[PATCH v4 3/3] i2c / ACPI: add ACPI enumeration support

2012-11-20 Thread Mika Westerberg
order to get its slave devices enumerated, created and bound to the corresponding ACPI handle. Signed-off-by: Mika Westerberg --- drivers/acpi/Kconfig|6 +++ drivers/acpi/Makefile |1 + drivers/acpi/acpi_i2c.c | 103 +++ drivers/i2c/i2c

[PATCH v4 1/3] gpio / ACPI: add ACPI support

2012-11-20 Thread Mika Westerberg
d-off-by: Mika Westerberg --- drivers/gpio/Kconfig|4 drivers/gpio/Makefile |1 + drivers/gpio/gpiolib-acpi.c | 54 +++ include/linux/acpi_gpio.h | 19 +++ 4 files changed, 78 insertions(+) create mode 100644 dr

[PATCH v4 2/3] spi / ACPI: add ACPI enumeration support

2012-11-20 Thread Mika Westerberg
for further configuration. Signed-off-by: Mika Westerberg --- drivers/spi/spi.c | 103 - 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 84c2861..1ab0523 100644 --- a/drivers/spi/spi.c

Re: [PATCH] i2c-designware: fix RX FIFO overrun

2013-04-22 Thread Mika Westerberg
On Fri, Apr 19, 2013 at 07:05:30PM +0100, Josef Ahmad wrote: > >From a969728248c3b439dc97a69e7dac133b5efa34e7 Mon Sep 17 00:00:00 2001 > From: Josef Ahmad > Date: Fri, 19 Apr 2013 17:28:10 +0100 > Subject: [PATCH] i2c-designware: fix RX FIFO overrun > > i2c_dw_xfer_msg() pushes a number of bytes

Re: [PATCH] i2c-designware: fix RX FIFO overrun

2013-04-22 Thread Mika Westerberg
elements): > > State of the fifos: > +-+ > TX -> | E E E E E W W R | > +-+ > +-+ > RX | E E R R R R R R | <- > +-+ > > Now, say the transaction requires to pump 2

Re: [PATCH REBASE] i2c-designware: make SDA hold time configurable

2013-06-17 Thread Mika Westerberg
On Wed, Jun 12, 2013 at 04:47:45PM +0200, Christian Ruppert wrote: > On Mon, Jun 10, 2013 at 05:29:55PM +0200, Wolfram Sang wrote: > > On Tue, May 14, 2013 at 03:04:02PM +0200, Christian Ruppert wrote: > > > This patch makes the SDA hold time configurable through device tree. > > > > > > [rebased

Re: [PATCH V2] i2c: designware: fix race between subsequent xfers

2013-06-17 Thread Mika Westerberg
On Fri, Jun 14, 2013 at 04:37:41PM +0200, Wolfram Sang wrote: > On Fri, Jun 07, 2013 at 10:51:23AM +0200, Christian Ruppert wrote: > > The designware block is not always properly disabled in the case of > > transfer errors. Interrupts from aborted transfers might be handled > > after the data struc

Re: [PATCH 1/2] i2c: designware: fix race between subsequent xfers

2013-06-06 Thread Mika Westerberg
Hi Christian, On Thu, Jun 06, 2013 at 03:43:35PM +0200, Christian Ruppert wrote: > The designware block is not always properly disabled in the case of > transfer errors. Interrupts from aborted transfers might be handled > after the data structures for the following transfer are initialised but >

Re: [PATCH 2/2] i2c: designware: make i2c xfers non-interruptible

2013-06-06 Thread Mika Westerberg
On Thu, Jun 06, 2013 at 03:43:36PM +0200, Christian Ruppert wrote: > When the process at the source of an i2c transfer is killed in the > middle of the transfer, the transfer is interrupted. Interrupted > transfers might cause buggy slaves on the bus (or higher level drivers) > to go haywire. > Thi

[PATCH] ACPI / LPSS: override SDIO device's private register space size

2013-06-18 Thread Mika Westerberg
enlarge size of this private register space. Work around this by adding a possibility to override size of the private register space in the ACPI LPSS driver and set correct size for the SDIO device. Signed-off-by: Mika Westerberg --- Applies on top of https://patchwork.kernel.org/patch/2742521

[PATCH 2/2] spi/pxa2xx: use a flag to check if the device is runtime suspended

2013-06-18 Thread Mika Westerberg
private data that indicates whether the device is runtime suspended, and in that case return IRQ_NONE from the interrupt handler. Signed-off-by: Mika Westerberg --- drivers/spi/spi-pxa2xx.c | 4 +++- drivers/spi/spi-pxa2xx.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a

[PATCH 1/2] spi/pxa2xx: use GFP_ATOMIC in sg table allocation

2013-06-18 Thread Mika Westerberg
pxa2xx_spi_map_dma_buffer() gets called in tasklet context so we can't sleep when we allocate a new sg table. Use GFP_ATOMIC here instead. Signed-off-by: Mika Westerberg --- drivers/spi/spi-pxa2xx-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-p

Re: [PATCH] acpi-dma: fix sparse warning

2013-06-18 Thread Mika Westerberg
. Thus, we have to enforce __leXX if we want to > convert them to CPU order. > > Signed-off-by: Andy Shevchenko Even though it is ugly, Reviewed-by: Mika Westerberg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord

Re: [PATCH] ACPI / PM: Fix error code path for power resources initialization

2013-06-19 Thread Mika Westerberg
> > To prevent this problem from occuring, initialize the list_node > field of struct acpi_power_resource upfront. > > Reported-by: Mika Westerberg Reviewed-by: Mika Westerberg > Signed-off-by: Rafael J. Wysocki > Cc: 3.9+ > --- > drivers/acpi/power.c |1 + >

Re: [PATCH 2/2] spi/pxa2xx: use a flag to check if the device is runtime suspended

2013-06-19 Thread Mika Westerberg
On Tue, Jun 18, 2013 at 07:09:48PM +0100, Mark Brown wrote: > On Tue, Jun 18, 2013 at 05:29:45PM +0300, Mika Westerberg wrote: > > Current code calls pm_runtime_suspended() in the interrupt handler to check > > if the device is suspended or not. However, runtime PM status of the dev

Re: [PATCH 2/2] spi/pxa2xx: use a flag to check if the device is runtime suspended

2013-06-19 Thread Mika Westerberg
On Wed, Jun 19, 2013 at 11:05:15AM +0100, Russell King - ARM Linux wrote: > On Wed, Jun 19, 2013 at 10:39:38AM +0100, Mark Brown wrote: > > On Wed, Jun 19, 2013 at 10:25:08AM +0100, Russell King - ARM Linux wrote: > > > On Tue, Jun 18, 2013 at 07:09:48PM +0100, Mark Brown wrote: > > > > > > This s

Re: [PATCH] gpio-langwell: remove Withney point support

2013-06-20 Thread Mika Westerberg
On Thu, Jun 20, 2013 at 10:09:37AM +0300, Andy Shevchenko wrote: > On Thu, Jun 20, 2013 at 9:46 AM, Linus Walleij > wrote: > > On Wed, Jun 19, 2013 at 11:02 PM, Andy Shevchenko > > wrote: > >> On Wed, Jun 19, 2013 at 10:23 PM, Linus Walleij > >> wrote: > >> > >>> Please give some context though

[PATCH] spi/pxa2xx: fix memory corruption due to wrong size used in devm_kzalloc()

2013-06-20 Thread Mika Westerberg
[] ? kthread_create_on_node+0x110/0x110 Fix this by using the right structure size in devm_kzalloc(). Reported-by: Jerome Blin Signed-off-by: Mika Westerberg Cc: sta...@vger.kernel.org # 3.9+ --- drivers/spi/spi-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi

[PATCH 1/6] PCI: acpiphp: do not check for SLOT_ENABLED in enable_device()

2013-06-25 Thread Mika Westerberg
lot. Let's push the check up by stack. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/acpiphp_glue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c in

[PATCH 6/6] x86/PCI: quirk Thunderbolt PCI-to-PCI bridges

2013-06-25 Thread Mika Westerberg
indows. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- arch/x86/pci/fixup.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index f5809fa..924822b 100644 --- a/arch/x86/pc

[PATCH 5/6] PCI: acpiphp: look _RMV method a bit deeper in the hierarhcy

2013-06-25 Thread Mika Westerberg
) } } } } If we want to support such machines we must look for the _RMV method a bit deeper in the hierarchy. Fix this by changing pcihp_is_ejectable() to check few more devices down from the root port. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci

[PATCH 2/6] PCI: acpiphp: enable_device(): rescan even if no new devices on slot

2013-06-25 Thread Mika Westerberg
o do the rescan anyway. Because of that we must make sure that pcibios_resource_survey_bus() and check_hotplug_bridge() get called only for a just found bus and not the ones already added to the system. Failure to do so will lead to resource conflicts. Signed-off-by: Kirill A. Shutemov Sign

[PATCH 3/6] PCI: introduce pci_trim_stale_devices()

2013-06-25 Thread Mika Westerberg
fore looking for new ones. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/remove.c | 20 include/linux/pci.h | 1 + 2 files changed, 21 insertions(+) diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 8fc54b7..77b7a64 100644 -

[PATCH 0/6] Thunderbolt workarounds take 2

2013-06-25 Thread Mika Westerberg
ENABLED in enable_device() PCI: acpiphp: enable_device(): rescan even if no new devices on slot PCI: introduce pci_trim_stale_devices() PCI: acpiphp: check for new devices on enabled host Mika Westerberg (2): PCI: acpiphp: look _RMV method a bit deeper in the hierarhcy x86/PCI: quirk Thunderbolt

[PATCH 4/6] PCI: acpiphp: check for new devices on enabled host

2013-06-25 Thread Mika Westerberg
nd and look for the ones after that. We do that even if slot already enabled (SLOT_ENABLED). Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/acpiphp_glue.c | 56 ++ 1 file changed, 27 insertions(+), 29 deletions(-) di

Re: [PATCH 5/6] PCI: acpiphp: look _RMV method a bit deeper in the hierarhcy

2013-06-25 Thread Mika Westerberg
On Tue, Jun 25, 2013 at 09:15:47PM +0300, Andy Shevchenko wrote: > On Tue, Jun 25, 2013 at 7:22 PM, Mika Westerberg > wrote: > > > The acpiphp driver finds out whether the device is hotpluggable by checking > > whether it has _RMV method behind it (and if it returns 1).

Re: [PATCH 5/6] PCI: acpiphp: look _RMV method a bit deeper in the hierarhcy

2013-06-25 Thread Mika Westerberg
On Tue, Jun 25, 2013 at 09:31:52PM +0300, Andy Shevchenko wrote: > On Tue, Jun 25, 2013 at 9:31 PM, Mika Westerberg > wrote: > > On Tue, Jun 25, 2013 at 09:15:47PM +0300, Andy Shevchenko wrote: > >> On Tue, Jun 25, 2013 at 7:22 PM, Mika Westerberg > >> wr

Re: [PATCH 0/6] Thunderbolt workarounds take 2

2013-06-26 Thread Mika Westerberg
On Wed, Jun 26, 2013 at 01:24:25AM +0200, Rafael J. Wysocki wrote: > Would you please CC things touching ACPIPHP to linux-acpi? Sorry about that -- It wasn't listed in the output of get_maintainers.pl so it kind of was forgotten. Do you want me to resend this series with linux-acpi@ included? --

Re: [PATCH 1/6] PCI: acpiphp: do not check for SLOT_ENABLED in enable_device()

2013-07-01 Thread Mika Westerberg
On Mon, Jul 01, 2013 at 04:01:37PM +0200, Rafael J. Wysocki wrote: > > Given the fact that SLOT_ENABLED is only checked in acpiphp_enable_slot() > > (after this patch) and that /sys/bus/pci/slots/*/power uses SLOT_POWEREDON > > anyway, should we remove the whole flag? > > Sure, if it is not necess

Re: [PATCH 1/6] PCI: acpiphp: do not check for SLOT_ENABLED in enable_device()

2013-07-02 Thread Mika Westerberg
On Tue, Jul 02, 2013 at 10:29:12PM +0200, Rafael J. Wysocki wrote: > On Tuesday, July 02, 2013 10:40:39 AM Bjorn Helgaas wrote: > > On Mon, Jul 1, 2013 at 7:29 PM, Rafael J. Wysocki wrote: > > > On Monday, July 01, 2013 09:36:13 PM Mika Westerberg wrote: > > >> On M

[PATCH] i2c-designware: configure SDA hold time from ACPI

2013-07-03 Thread Mika Westerberg
Some Intel LPSS I2C devices make the SDA hold time parameter available via SSCN (standard mode) and FMCN (fast mode) ACPI methods. If we find that such method exist, we evaluate it and pass the returned SDA hold value to the i2c-designware core analogous to Device Tree. Signed-off-by: Mika

[PATCH] spi/pxa2xx: enable DMA on newer Intel LPSS silicon

2013-07-03 Thread Mika Westerberg
There is an additional bit in the Intel LPSS SPI private registers that needs to be set in order to be able to use DMA with the SPI controller. Enable this as well. Signed-off-by: Mika Westerberg --- drivers/spi/spi-pxa2xx.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH v2 5/8] PCI: acpiphp: kill SLOT_ENABLED in favor of always re-enumerating the devices

2013-07-03 Thread Mika Westerberg
twice. So get rid of the SLOT_ENABLED flag and always re-enumerate devices behind a slot when acpiphp_enable_slot() is called. In addition doing this allows userspace to simulate Bus Check event by writing '1' to the 'power' file under the slot. Signed-off-by: Kirill A. Shutemov Sig

[PATCH v2 4/8] PCI: acpiphp: check for new devices on enabled host

2013-07-03 Thread Mika Westerberg
on the bus. We do that even if the slot is already enabled (SLOT_ENABLED). Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/acpiphp_glue.c | 55 ++ drivers/pci/remove.c | 20 ++ include/linux/

[PATCH v2 0/8] Thunderbolt workarounds

2013-07-03 Thread Mika Westerberg
s on slot PCI: acpiphp: check for new devices on enabled host PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5 Mika Westerberg (4): x86/PCI: prevent re-allocation of already existing bridge and ROM resources PCI: acpiphp: kill SLOT_ENABLED in favor of always re-enumerating the

[PATCH v2 2/8] PCI: acpiphp: do not check for SLOT_ENABLED in enable_device()

2013-07-03 Thread Mika Westerberg
lot. Let's push the check up by stack. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/acpiphp_glue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c in

[PATCH v2 7/8] PCI: acpiphp: get rid of unused constants in acpiphp.h

2013-07-03 Thread Mika Westerberg
These are not used anywhere so kill them. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/acpiphp.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h index ecc61b7..5fc9977 100644 --- a

[PATCH v2 1/8] x86/PCI: prevent re-allocation of already existing bridge and ROM resources

2013-07-03 Thread Mika Westerberg
lready and we can skip it. We do the same for ROM resources as well. Signed-off-by: Mika Westerberg --- arch/x86/pci/i386.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 94919e3..db6b1ab 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/

[PATCH v2 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5

2013-07-03 Thread Mika Westerberg
vice (HRDN) { // ... Device (EPUP) { // ... Method (_RMV, 0, NotSerialized) // _RMV: Removal Status { Return (One) } } } } } Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika

[PATCH v2 8/8] PCI: acpiphp: sanitize acpiphp_get_[latch|adapter]_status()

2013-07-03 Thread Mika Westerberg
There is no need for a temporary variable and all the tricks with ternary operators. Change the functions to be a bit more straightforward. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/acpiphp_glue.c | 12 ++-- 1 file changed, 2 insertions

[PATCH v2 3/8] PCI: acpiphp: enable_device(): rescan even if no new devices on slot

2013-07-03 Thread Mika Westerberg
o do the rescan anyway. Because of that we must make sure that pcibios_resource_survey_bus() and check_hotplug_bridge() get called only for a just found bus and not the ones already added to the system. Failure to do so will lead to resource conflicts. Signed-off-by: Kirill A. Shutemov Sign

Re: [PATCH v2 02/11] spi: spi-ep93xx: use read,write instead of __raw_* variants

2013-07-03 Thread Mika Westerberg
> decide if they are inlined. > > Signed-off-by: H Hartley Sweeten > Cc: Ryan Mallon > Cc: Mika Westerberg Acked-by: Mika Westerberg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v2 03/11] spi: spi-ep93xx: remove bits_per_word() helper

2013-07-03 Thread Mika Westerberg
On Tue, Jul 02, 2013 at 10:07:01AM -0700, H Hartley Sweeten wrote: > Check t->bits_per_word directly and remove the inline helper function. > > Signed-off-by: H Hartley Sweeten > Cc: Ryan Mallon > Cc: Mika Westerberg I wonder why the helper was there in the first plac

Re: [PATCH v2 04/11] spi: spi-ep93xx: get platform resources early in (*probe)

2013-07-03 Thread Mika Westerberg
On Tue, Jul 02, 2013 at 10:07:53AM -0700, H Hartley Sweeten wrote: > Get the platform resources early in the (*probe) to minimize the number > of goto's in the error path. > > Signed-off-by: H Hartley Sweeten > Cc: Ryan Mallon > Cc: Mika Westerberg Acked-by: Mika Wester

Re: [PATCH v2 05/11] spi: spi-ep93xx: use devm_clk_get()

2013-07-03 Thread Mika Westerberg
On Tue, Jul 02, 2013 at 10:08:21AM -0700, H Hartley Sweeten wrote: > Use devm_clk_get() so that the clk_put() happens automatically when > the last reference to this driver is dropped. > > Signed-off-by: H Hartley Sweeten > Cc: Ryan Mallon > Cc: Mika Westerberg Acked-b

Re: [PATCH v2 06/11] spi: spi-ep93xx: remove dev_err() for kzalloc() failure

2013-07-03 Thread Mika Westerberg
On Tue, Jul 02, 2013 at 10:08:59AM -0700, H Hartley Sweeten wrote: > The kzalloc() failure will have already output a message. > > Signed-off-by: H Hartley Sweeten > Cc: Ryan Mallon > Cc: Mika Westerberg Acked-by: Mika Westerberg -- To unsubscribe from this list: send the li

Re: [PATCH v2 07/11] spi: spi-ep93xx: remove 'dss' from per chip private data

2013-07-03 Thread Mika Westerberg
> > Just pass the t->bits_per_word directly to ep93xx_spi_chip_setup() in > ep93xx_spi_process_transfer() and remove 'dss' from the per chip private > data. > > Signed-off-by: H Hartley Sweeten > Cc: Ryan Mallon > Cc: Mika Westerberg Acked-by: Mika Westerbe

Re: [PATCH v2 0/8] Thunderbolt workarounds

2013-07-03 Thread Mika Westerberg
On Wed, Jul 03, 2013 at 07:29:00PM +0100, Matthew Garrett wrote: > Are there any plans to provide native support for the Thunderbolt > controller, rather than relying on system management mode? I believe there are some to implement a native Thunderbolt controller driver but I don't know the detai

Re: [PATCH] i2c-designware: Manually set RESTART bit between messages

2013-07-04 Thread Mika Westerberg
On Wed, Jul 03, 2013 at 10:15:11PM +0200, Wolfram Sang wrote: > > CCing Mika and Christian. > > On Fri, Jun 21, 2013 at 03:05:28PM +0800, Chew Chiau Ee wrote: > > From: Chew, Chiau Ee > > > > If both IC_EMPTYFIFO_HOLD_MASTER_EN and IC_RESTART_EN are set to 1, the > > Designware I2C controller d

Re: [PATCH v2 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5

2013-07-04 Thread Mika Westerberg
On Wed, Jul 03, 2013 at 11:40:42PM +0200, Rafael J. Wysocki wrote: > On Wednesday, July 03, 2013 05:04:53 PM Mika Westerberg wrote: > > From: "Kirill A. Shutemov" > > > > Correct ACPI PCI hotplug imeplementation should have _RMV method in a > > PCI slot (dev

Re: [PATCH v2 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5

2013-07-04 Thread Mika Westerberg
On Thu, Jul 04, 2013 at 02:36:00PM +0200, Rafael J. Wysocki wrote: > On Thursday, July 04, 2013 11:58:44 AM Mika Westerberg wrote: > > On Wed, Jul 03, 2013 at 11:40:42PM +0200, Rafael J. Wysocki wrote: > > > On Wednesday, July 03, 2013 05:04:53 PM Mika Westerberg wrote: >

Re: [PATCH v2 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5

2013-07-04 Thread Mika Westerberg
On Thu, Jul 04, 2013 at 03:14:58PM +0200, Rafael J. Wysocki wrote: > On Thursday, July 04, 2013 03:53:38 PM Mika Westerberg wrote: > > On Thu, Jul 04, 2013 at 02:36:00PM +0200, Rafael J. Wysocki wrote: > > > On Thursday, July 04, 2013 11:58:44 AM Mika Westerberg wrote: > >

[PATCH v2.1 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5

2013-07-04 Thread Mika Westerberg
) } } } } ... Fix this by adding a DMI quirk for the Acer Aspire S5 machine that gives an alternative path to the _RMV method. Signed-off-by: Kirill A. Shutemov Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/acpi_pcihp.c

Re: [PATCH v2.1 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5

2013-07-04 Thread Mika Westerberg
On Fri, Jul 05, 2013 at 01:48:01AM +0200, Rafael J. Wysocki wrote: > This is fine by me and same for the other patches in the series. > > Acked-by: Rafael J. Wysocki Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kern

[PATCH] ACPI / power: add missing newline to debug messages

2013-07-05 Thread Mika Westerberg
There are few places in power.c where debug messages have no newline at the end. Reading such debug messages from dmesg is not fun so fix this by adding the missing newlines. Signed-off-by: Mika Westerberg --- drivers/acpi/power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH 6/6] x86/PCI: quirk Thunderbolt PCI-to-PCI bridges

2013-06-26 Thread Mika Westerberg
On Tue, Jun 25, 2013 at 02:15:56PM -0700, Jesse Barnes wrote: > On Tue, 25 Jun 2013 19:22:10 +0300 > Mika Westerberg wrote: > > > + if (!(pci_probe & PCI_NOASSIGN_ROMS)) { > > + pr_info("Thunderbolt host router detected disabling ROMs\

Re: [PATCH 2/6] PCI: acpiphp: enable_device(): rescan even if no new devices on slot

2013-06-27 Thread Mika Westerberg
On Wed, Jun 26, 2013 at 05:37:58PM -0600, Bjorn Helgaas wrote: > On Tue, Jun 25, 2013 at 10:22 AM, Mika Westerberg > wrote: > > From: "Kirill A. Shutemov" > > > > pci_scan_slot() returns number of new devices connected *directly* > > connected to the

Re: [PATCH 2/6] PCI: acpiphp: enable_device(): rescan even if no new devices on slot

2013-06-27 Thread Mika Westerberg
On Wed, Jun 26, 2013 at 06:20:24PM -0700, Yinghai Lu wrote: > On Tue, Jun 25, 2013 at 9:22 AM, Mika Westerberg > wrote: > > From: "Kirill A. Shutemov" > > > > pci_scan_slot() returns number of new devices connected *directly* > > connected to the slot. C

Re: [PATCH 6/6] x86/PCI: quirk Thunderbolt PCI-to-PCI bridges

2013-06-27 Thread Mika Westerberg
On Wed, Jun 26, 2013 at 04:15:01PM -0600, Alex Williamson wrote: > On Wed, 2013-06-26 at 14:59 -0600, Bjorn Helgaas wrote: > > [+cc Alex] > > > > On Wed, Jun 26, 2013 at 6:17 AM, Mika Westerberg > > wrote: > > > On Tue, Jun 25, 2013 at 02:15:56PM -0700, Jesse

Re: [PATCH 6/6] x86/PCI: quirk Thunderbolt PCI-to-PCI bridges

2013-06-27 Thread Mika Westerberg
On Wed, Jun 26, 2013 at 04:18:53PM -0600, Bjorn Helgaas wrote: > On Tue, Jun 25, 2013 at 10:22 AM, Mika Westerberg > wrote: > > Thunderbolt PCI-to-PCI bridges typically use BIOS "assisted" enumeration. > > This means that the BIOS will allocate bridge resources based

Re: [PATCH 6/6] x86/PCI: quirk Thunderbolt PCI-to-PCI bridges

2013-06-27 Thread Mika Westerberg
On Wed, Jun 26, 2013 at 03:26:59PM -0700, Yinghai Lu wrote: > On Wed, Jun 26, 2013 at 3:18 PM, Bjorn Helgaas wrote: > > On Tue, Jun 25, 2013 at 10:22 AM, Mika Westerberg > > wrote: > >> Thunderbolt PCI-to-PCI bridges typically use BIOS "assisted" enumeration.

<    1   2   3   4   5   6   7   8   9   10   >