[PATCH RESEND 0/2] runtime PM support for I2C clients

2013-09-09 Thread Mika Westerberg
[Resend with linux-arm-kernel included and added acks from Rafael] Hi all, With the advent of ACPI 5.0 we are starting to see I2C client devices described in ACPI namespace that support power management by the means of standard ACPI _PSx-methods. For example Intel Haswell based platforms might ha

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Mika Westerberg
On Mon, Sep 09, 2013 at 04:40:28PM +0100, Mark Brown wrote: > On Mon, Sep 09, 2013 at 04:34:38PM +0300, Mika Westerberg wrote: > > > + /* > > +* Enable runtime PM for the client device. If the client wants to > > +* participate on runtime PM it should call

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Mika Westerberg
On Tue, Sep 10, 2013 at 01:27:54PM +0100, Mark Brown wrote: > On Tue, Sep 10, 2013 at 10:51:00AM +0300, Mika Westerberg wrote: > > On Mon, Sep 09, 2013 at 04:40:28PM +0100, Mark Brown wrote: > > > > How is this going to interact with client devices which are already > >

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-11 Thread Mika Westerberg
On Wed, Sep 11, 2013 at 10:55:52AM +0100, Mark Brown wrote: > On Wed, Sep 11, 2013 at 09:01:16AM +0800, Aaron Lu wrote: > > > Looks like, it all boils down to how many I2C devices should be allowed > > for runtime PM by default and how many I2C devices should be forbidden. > > , and then we allow/

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-11 Thread Mika Westerberg
On Wed, Sep 11, 2013 at 12:14:09PM +0100, Mark Brown wrote: > On Wed, Sep 11, 2013 at 02:05:43PM +0300, Mika Westerberg wrote: > > > I'll also look into converting the existing I2C client drivers to use this > > method. One question, though, is it better to have the con

[PATCH] mfd: wm8994: fix compile warning in wm8994_i2c_probe()

2013-09-11 Thread Mika Westerberg
as it should be the same size than the native pointer type. Signed-off-by: Mika Westerberg --- drivers/mfd/wm8994-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index bd53879..9928bb1 100644 --- a/drivers/mfd/wm8

[PATCH v2 3/9] Input: misc - convert existing I2C client drivers to use I2C core runtime PM

2013-09-11 Thread Mika Westerberg
to pm_runtime_set_autosuspend_delay() in mpu3050 driver because the driver doesn't seem to use autosuspend anyway. Signed-off-by: Mika Westerberg --- drivers/input/misc/bma150.c | 4 ++-- drivers/input/misc/mpu3050.c | 16 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/in

[PATCH v2 2/9] i2c: attach/detach I2C client device to the ACPI power domain

2013-09-11 Thread Mika Westerberg
that's the case, attach it to the ACPI power domain. In addition we make sure that the device is fully powered when its ->probe() function gets called. For non-ACPI devices this patch is a no-op. Signed-off-by: Lv Zheng Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki --- drivers

[PATCH v2 9/9] spi: attach/detach SPI device to the ACPI power domain

2013-09-11 Thread Mika Westerberg
ACPI power domain if the device has an ACPI handle. This makes sure that the device is powered on when its ->probe() is called. For non-ACPI devices this patch is a no-op. Signed-off-by: Mika Westerberg --- drivers/spi/spi.c | 9 + 1 file changed, 9 insertions(+) diff --git a/driv

[PATCH v2 6/9] mfd: wm8994: convert to use I2C core runtime PM

2013-09-11 Thread Mika Westerberg
The I2C core now prepares runtime PM on behalf of the I2C client device, so only thing the driver needs to do is to call pm_runtime_put() at the end of its ->probe(). This patch converts wm8994 driver to use this model. Signed-off-by: Mika Westerberg --- drivers/mfd/wm8994-core.c | 5 ++---

[PATCH v2 5/9] drivers/misc: convert existing I2C clients driver to use I2C core runtime PM

2013-09-11 Thread Mika Westerberg
The I2C core now prepares runtime PM on behalf of the I2C client device, so only thing the driver needs to do is to call pm_runtime_put() at the end of its ->probe(). This patch converts I2C client drivers under drivers/misc to use this model. Signed-off-by: Mika Westerberg --- drivers/m

[PATCH v2 0/9] runtime PM support for I2C and SPI client devices

2013-09-11 Thread Mika Westerberg
afael ACKed the previous version but I've changed the patches a bit, so I only kept his ACK in the second patch (it is unchanged). ] Aaron Lu (1): i2c: prepare runtime PM support for I2C client devices Lv Zheng (1): i2c: attach/detach I2C client device to the ACPI power domain Mika Wes

[PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-11 Thread Mika Westerberg
stion is regarded as being runtime PM active and powered on. This patch adds also runtime PM support for the SPI master device because it is needed to be able to runtime power manage the SPI controller device. The SPI master device is handled along with the SPI controller device. Signed-off-

[PATCH v2 7/9] ASoC: codecs: convert existing I2C client drivers to use I2C core runtime PM

2013-09-11 Thread Mika Westerberg
The I2C core now prepares runtime PM on behalf of the I2C client device, so only thing the driver needs to do is to call pm_runtime_put() at the end of its ->probe(). This patch converts ASoC codec drivers to use this model. Signed-off-by: Mika Westerberg --- sound/soc/codecs/wm2200.c |

[PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-11 Thread Mika Westerberg
evice is handled along with the I2C controller device (it uses pm_runtime_no_callbacks()). Signed-off-by: Aaron Lu Signed-off-by: Mika Westerberg --- drivers/i2c/i2c-core.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 4/9] [media] s5p-tv: convert to use I2C core runtime PM

2013-09-11 Thread Mika Westerberg
The I2C core now prepares runtime PM on behalf of the I2C client device, so only thing the driver needs to do is to call pm_runtime_put() at the end of its ->probe(). This patch converts s5p-tv driver to use this model. Signed-off-by: Mika Westerberg --- drivers/media/platform/s5p

Re: [PATCH v2 6/9] mfd: wm8994: convert to use I2C core runtime PM

2013-09-12 Thread Mika Westerberg
On Wed, Sep 11, 2013 at 06:12:43PM +0200, Samuel Ortiz wrote: > Hi Mika, > > On Wed, Sep 11, 2013 at 06:32:37PM +0300, Mika Westerberg wrote: > > The I2C core now prepares runtime PM on behalf of the I2C client device, so > > only thing the driver needs to do is to call pm

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Wed, Sep 11, 2013 at 04:51:20PM +0100, Mark Brown wrote: > On Wed, Sep 11, 2013 at 06:32:39PM +0300, Mika Westerberg wrote: > > This patch adds runtime PM support for the SPI bus analogous to what has > > been done for the I2C bus. This means that the SPI core prepares runti

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > On Thu, Sep 12, 2013 at 12:27:43PM +0300, Mika Westerberg wrote: > > On Wed, Sep 11, 2013 at 04:51:20PM +0100, Mark Brown wrote: > > > > I would be able to have this and the other patch in the SPI tree in case &

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 01:04:28PM +0200, Wolfram Sang wrote: > On Thu, Sep 12, 2013 at 01:04:55PM +0200, Rafael J. Wysocki wrote: > > On Thursday, September 12, 2013 12:43:02 PM Mika Westerberg wrote: > > > On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > >

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 01:04:55PM +0200, Rafael J. Wysocki wrote: > On Thursday, September 12, 2013 12:43:02 PM Mika Westerberg wrote: > > On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > > > On Thu, Sep 12, 2013 at 12:27:43PM +0300, Mika Westerberg wrote: >

Re: [PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 02:34:21PM -0700, Kevin Hilman wrote: > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > > index f32ca29..44374b4 100644 > > --- a/drivers/i2c/i2c-core.c > > +++ b/drivers/i2c/i2c-core.c > > @@ -248,11 +248,30 @@ static int i2c_device_probe(struct device *dev

Re: [PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-13 Thread Mika Westerberg
On Fri, Sep 13, 2013 at 10:59:50AM +0100, Mark Brown wrote: > On Fri, Sep 13, 2013 at 09:54:34AM +0300, Mika Westerberg wrote: > > On Thu, Sep 12, 2013 at 02:34:21PM -0700, Kevin Hilman wrote: > > > > For hardware that is disabled/powered-off on startup, there will now be >

Re: [PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-13 Thread Mika Westerberg
On Fri, Sep 13, 2013 at 11:31:52AM +0100, Mark Brown wrote: > On Fri, Sep 13, 2013 at 01:16:11PM +0300, Mika Westerberg wrote: > > On Fri, Sep 13, 2013 at 10:59:50AM +0100, Mark Brown wrote: > > > > Accessing the bus isn't an issue for I2C outside of ACPI, the power >

Re: [PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-13 Thread Mika Westerberg
On Fri, Sep 13, 2013 at 07:30:55AM -0700, Kevin Hilman wrote: > Mika Westerberg writes: > > > On Thu, Sep 12, 2013 at 02:34:21PM -0700, Kevin Hilman wrote: > >> > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > >> > index f32ca29..44374b4 100644

[PATCH 2/2] gpio / ACPI: add support for GPIO operation regions

2013-09-13 Thread Mika Westerberg
structure. Signed-off-by: Mika Westerberg --- drivers/gpio/gpiolib-acpi.c | 131 ++-- 1 file changed, 126 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index e12a08e..f52536a 100644 --- a/drivers/gp

[PATCH 1/2] gpio / ACPI: register to ACPI events automatically

2013-09-13 Thread Mika Westerberg
nterface to be private to gpiolib-acpi and remove call to the API from the one existing user (pinctrl-baytrail.c). Signed-off-by: Mika Westerberg --- drivers/gpio/gpiolib-acpi.c| 18 ++ drivers/gpio/gpiolib.c | 3 +++ drivers/pinctrl/pinctrl-baytrai

Re: [PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-13 Thread Mika Westerberg
On Fri, Sep 13, 2013 at 05:14:56PM +0200, Sylwester Nawrocki wrote: > On 09/13/2013 08:54 AM, Mika Westerberg wrote: > > On Thu, Sep 12, 2013 at 02:34:21PM -0700, Kevin Hilman wrote: > >>> > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > >>

Re: [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions

2013-09-13 Thread Mika Westerberg
On Fri, Sep 13, 2013 at 06:55:11PM +0300, Andy Shevchenko wrote: > On Fri, Sep 13, 2013 at 6:14 PM, Mika Westerberg > wrote: > > GPIO operation regions is a new feature introduced in ACPI 5.0 > > specification. In practise it means that now ASL code can toggle GPIOs with >

Re: [PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-13 Thread Mika Westerberg
On Fri, Sep 13, 2013 at 05:50:22PM +0300, Mika Westerberg wrote: > On Fri, Sep 13, 2013 at 07:30:55AM -0700, Kevin Hilman wrote: > > Mika Westerberg writes: > > > > > On Thu, Sep 12, 2013 at 02:34:21PM -0700, Kevin Hilman wrote: > > >> > diff --git a/d

Re: [PATCH 2/5] gpiolib / ACPI: convert to gpiod interfaces

2013-10-08 Thread Mika Westerberg
On Mon, Oct 07, 2013 at 09:54:13PM -0700, Alexandre Courbot wrote: > > +struct gpio_desc *acpi_get_gpiod(char *path, int pin) > > { > > struct gpio_chip *chip; > > acpi_handle handle; > > @@ -48,18 +49,15 @@ int acpi_get_gpio(char *path, int pin) > > > > status = acpi_get_h

Re: [PATCH 2/5] gpiolib / ACPI: convert to gpiod interfaces

2013-10-08 Thread Mika Westerberg
On Tue, Oct 08, 2013 at 11:45:08AM +0300, Mika Westerberg wrote: > > I also wonder whether you could also avoid exporting acpi_get_gpiod* > > (which allow GPIO consumers to shortcut gpiolib) by implementing > > acpi_get_gpio* into the C file (maybe even using gpiod_get()). I see

Re: [PATCH 1/2] i2c designware make SCL and SDA falling time configurable

2013-10-09 Thread Mika Westerberg
On Tue, Oct 08, 2013 at 05:00:54PM +0200, Romain Baeriswyl wrote: > static void __i2c_dw_enable(struct dw_i2c_dev *dev, bool enable) > @@ -286,6 +287,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev) > u32 input_clock_khz; > u32 hcnt, lcnt; > u32 reg; > + u32 sda_falling_time, scl

Re: [PATCH 2/2] i2c designware add support of I2C standard mode

2013-10-09 Thread Mika Westerberg
arameter is not set, the fast mode is selected. > Only when the parameter is set at 10, the standard mode is selected. > > Signed-off-by: Romain Baeriswyl > Reviewed-by: Christian Ruppert Reviewed-by: Mika Westerberg -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH 2/5] gpiolib / ACPI: convert to gpiod interfaces

2013-10-09 Thread Mika Westerberg
On Tue, Oct 08, 2013 at 09:24:50AM -0700, Alexandre Courbot wrote: > On Tue, Oct 8, 2013 at 1:45 AM, Mika Westerberg > wrote: > > On Mon, Oct 07, 2013 at 09:54:13PM -0700, Alexandre Courbot wrote: > >> > +struct gpio_desc *acpi_get_gpiod(char *path, int pin) > &g

Re: [PATCH 2/5] gpiolib / ACPI: convert to gpiod interfaces

2013-10-09 Thread Mika Westerberg
On Tue, Oct 08, 2013 at 09:26:14AM -0700, Alexandre Courbot wrote: > On Tue, Oct 8, 2013 at 3:36 AM, Mika Westerberg > wrote: > > On Tue, Oct 08, 2013 at 11:45:08AM +0300, Mika Westerberg wrote: > >> > I also wonder whether you could also avoid exporting acpi_get_gpiod*

[PATCH 2/3] i2c: attach/detach I2C client device to the ACPI power domain

2013-10-09 Thread Mika Westerberg
that's the case, attach it to the ACPI power domain. In addition we make sure that the device is fully powered when its ->probe() function gets called. For non-ACPI devices this patch is a no-op. Signed-off-by: Lv Zheng Signed-off-by: Mika Westerberg --- drivers/i2c/i2c-core.c | 10 +

[PATCH 1/3] ACPI / PM: allow child devices to ignore parent power state

2013-10-09 Thread Mika Westerberg
when the device is powered on/off. Signed-off-by: Mika Westerberg --- drivers/acpi/device_pm.c | 8 +--- include/acpi/acpi_bus.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 59d3202..ca723a4 100644 ---

[PATCH 0/3] ACPI power management support for I2C and SPI devices

2013-10-09 Thread Mika Westerberg
): i2c: attach/detach I2C client device to the ACPI power domain Mika Westerberg (2): ACPI / PM: allow child devices to ignore parent power state spi: attach/detach SPI device to the ACPI power domain drivers/acpi/device_pm.c | 8 +--- drivers/i2c/i2c-core.c | 10 ++ drivers/spi

[PATCH 3/3] spi: attach/detach SPI device to the ACPI power domain

2013-10-09 Thread Mika Westerberg
ACPI power domain if the device has an ACPI handle. This makes sure that the device is powered on when its ->probe() is called. For non-ACPI devices this patch is a no-op. Signed-off-by: Mika Westerberg --- drivers/spi/spi.c | 20 ++-- 1 file changed, 18 insertions(+)

Re: [PATCH 3/3] spi: attach/detach SPI device to the ACPI power domain

2013-10-09 Thread Mika Westerberg
On Wed, Oct 09, 2013 at 06:55:28PM +0100, Mark Brown wrote: > On Wed, Oct 09, 2013 at 05:04:21PM +0300, Mika Westerberg wrote: > > If the SPI device is enumerated from ACPI namespace (it has an ACPI handle) > > it might have ACPI methods that needs to be called in order to tra

[PATCH v2 2/5] gpiolib / ACPI: convert to gpiod interfaces

2013-10-10 Thread Mika Westerberg
integer. We also drop acpi_get_gpio() as it is not used anywhere outside gpiolib-acpi and even there we use acpi_get_gpiod() instead. Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki Reviewed-by: Alexandre Courbot --- drivers/gpio/gpiolib-acpi.c | 51

[PATCH v2 4/5] gpiolib / ACPI: allow passing GPIOF_ACTIVE_LOW for GpioInt resources

2013-10-10 Thread Mika Westerberg
The ACPI GpioInt resources contain polarity field that is used to specify whether the interrupt is active high or low. Since gpiolib supports GPIOF_ACTIVE_LOW we can pass this information in the flags field in acpi_find_gpio(), analogous to the DeviceTree version. Signed-off-by: Mika Westerberg

[PATCH v2 5/5] gpiolib / ACPI: document the GPIO descriptor based interface

2013-10-10 Thread Mika Westerberg
In addition to the existing ACPI specific GPIO interface, document the new descriptor based GPIO interface in Documentation/acpi/enumeration.txt, so it is clear that this new interface is preferred over the ACPI specific version. Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki

[PATCH v2 0/5] gpiolib: convert ACPI gpio helpers to gpiod_ interfaces

2013-10-10 Thread Mika Westerberg
and tested on Intel Haswell machine. Mika Westerberg (5): gpiolib / ACPI: move acpi_gpiochip_free_interrupts next to the request function gpiolib / ACPI: convert to gpiod interfaces gpiolib / ACPI: add ACPI support for gpiod_get_index() gpiolib / ACPI: allow passing GPIOF_ACTIVE_LOW for

[PATCH v2 3/5] gpiolib / ACPI: add ACPI support for gpiod_get_index()

2013-10-10 Thread Mika Westerberg
gpiod_get_index() and gpiod_get() are now the new preferred way to request GPIOs. Add support for finding the corresponding GPIO descriptor from ACPI namespace. Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki Reviewed-by: Alexandre Courbot --- drivers/gpio/gpiolib.c | 10

[PATCH v2 1/5] gpiolib / ACPI: move acpi_gpiochip_free_interrupts next to the request function

2013-10-10 Thread Mika Westerberg
It makes more sense to have these functions close to each other. No functional changes. Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki --- drivers/gpio/gpiolib-acpi.c | 76 ++--- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a

Re: [PATCH 2/3] i2c: attach/detach I2C client device to the ACPI power domain

2013-10-10 Thread Mika Westerberg
On Thu, Oct 10, 2013 at 10:09:19AM +0200, Wolfram Sang wrote: > On Wed, Oct 09, 2013 at 05:04:20PM +0300, Mika Westerberg wrote: > > From: Lv Zheng > > > > If the I2C client device is enumerated from ACPI namespace it might have > > ACPI methods that needs to be called

[PATCH v2 3/3] spi: attach/detach SPI device to the ACPI power domain

2013-10-10 Thread Mika Westerberg
ACPI power domain if the device has an ACPI handle. This makes sure that the device is powered on when its ->probe() is called. For non-ACPI devices this patch is a no-op. Signed-off-by: Mika Westerberg Acked-by: Mark Brown --- drivers/spi/spi.c | 18 -- 1 file changed,

[PATCH v2 1/3] ACPI / PM: allow child devices to ignore parent power state

2013-10-10 Thread Mika Westerberg
when the device is powered on/off. Signed-off-by: Mika Westerberg --- drivers/acpi/device_pm.c | 8 +--- include/acpi/acpi_bus.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 59d3202..ca723a4 100644 ---

[PATCH v2 0/3] ACPI power management support for I2C and SPI devices

2013-10-10 Thread Mika Westerberg
/detach I2C client device to the ACPI power domain Mika Westerberg (2): ACPI / PM: allow child devices to ignore parent power state spi: attach/detach SPI device to the ACPI power domain drivers/acpi/device_pm.c | 8 +--- drivers/i2c/i2c-core.c | 5 + drivers/spi/spi.c| 18

[PATCH v2 2/3] i2c: attach/detach I2C client device to the ACPI power domain

2013-10-10 Thread Mika Westerberg
that's the case, attach it to the ACPI power domain. In addition we make sure that the device is fully powered when its ->probe() function gets called. For non-ACPI devices this patch is a no-op. Signed-off-by: Lv Zheng Signed-off-by: Mika Westerberg Acked-by: Wolfram Sang --- drivers

[PATCH] ACPI / LPSS: don't crash if a device has no MMIO resources

2013-09-02 Thread Mika Westerberg
v_desc. Reported-and-tested-by: Imre Kaloz Signed-off-by: Mika Westerberg Cc: sta...@vger.kernel.org # 3.10+ --- drivers/acpi/acpi_lpss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 6a38218..fb78bb9 100644 --- a/driver

Re: [RFC PATCH 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-02 Thread Mika Westerberg
On Wed, Aug 28, 2013 at 11:38:58AM +0200, Wolfram Sang wrote: > On Tue, Aug 20, 2013 at 05:03:35PM +0300, Mika Westerberg wrote: > > From: Aaron Lu > > > > This patch adds runtime PM support for the I2C bus in a similar way that > > has been done for PCI bus already.

Re: [PATCH] i2c-designware: define i2c_dw_pci_runtime_idle only with runtime pm

2013-09-27 Thread Mika Westerberg
On Fri, Sep 27, 2013 at 04:43:13AM +0200, Wolfram Sang wrote: > On Fri, Sep 27, 2013 at 12:24:03AM +0200, Vincent Stehlé wrote: > > Make sure i2c_dw_pci_runtime_idle() is defined only when actually used, when > > CONFIG_PM_RUNTIME is defined. > > > > This fixes the following compilation warning: >

Re: [PATCH v3 0/4] Fix Win8 backlight issue

2013-09-27 Thread Mika Westerberg
| 4 + > 7 files changed, 324 insertions(+), 205 deletions(-) Just tested this series on my HP revolve 810 and this fixes the backlight issue it had :) Feel free to add my, Tested-by: Mika Westerberg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

[PATCH v3] runtime PM support for I2C adapter devices

2013-09-30 Thread Mika Westerberg
are OK with this. I didn't include changes to the SPI bus (the $subject is changed again to reflect that) because we don't need to change the existing drivers anymore. If this approach is accepted we can do the same for the SPI bus as well. Mika Westerberg (1): i2c: enable runti

[PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI

2013-09-30 Thread Mika Westerberg
addition to that we attach the I2C client devices to the ACPI power domain and make sure that they are powered on when the driver ->probe() is called. Non-ACPI devices are not affected by this change. This patch is based on the work by Aaron Lu and Lv Zheng. Signed-off-by: Mika Westerb

Re: [PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI

2013-09-30 Thread Mika Westerberg
On Mon, Sep 30, 2013 at 07:20:59PM +0200, Rafael J. Wysocki wrote: > > +static void acpi_i2c_device_pm_get(struct i2c_client *client) > > +{ > > + struct i2c_adapter *adap = client->adapter; > > + > > + /* Make sure the adapter is active */ > > + if (ACPI_HANDLE(adap->dev.parent)) > > +

Re: [PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI

2013-10-01 Thread Mika Westerberg
On Mon, Sep 30, 2013 at 05:43:48PM +0300, Mika Westerberg wrote: > +static void acpi_i2c_device_pm_get(struct i2c_client *client) > +{ > + struct i2c_adapter *adap = client->adapter; > + > + /* Make sure the adapter is active */ > + if (ACPI_HA

Re: [RFC 4/5] gpiolib: add gpiod_get() and gpiod_put() functions

2013-09-23 Thread Mika Westerberg
On Fri, Sep 20, 2013 at 08:40:48PM +0200, Linus Walleij wrote: > On Wed, Sep 4, 2013 at 9:56 PM, Stephen Warren wrote: > > On 09/04/2013 05:29 AM, Alexandre Courbot wrote: > >> Add gpiod_get() and gpiod_put() functions that provide safer handling of > >> GPIOs. > >> > >> These functions put the GP

Re: [RFC 0/5] New descriptor-based GPIO interface

2013-09-23 Thread Mika Westerberg
On Fri, Sep 20, 2013 at 08:06:00PM +0200, Linus Walleij wrote: > On Wed, Sep 4, 2013 at 1:29 PM, Alexandre Courbot wrote: > > > Here is a first RFC for the new GPIO interface. > > I'm quite happy with this, and given that all DT-implementations will start > to use it from day 1 I'll happily merg

Re: [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions

2013-09-23 Thread Mika Westerberg
On Fri, Sep 20, 2013 at 09:21:37PM +0200, Linus Walleij wrote: > On Fri, Sep 13, 2013 at 5:14 PM, Mika Westerberg > wrote: > > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c > (...) > > +st

Re: [PATCH 1/2] gpio / ACPI: register to ACPI events automatically

2013-09-23 Thread Mika Westerberg
On Fri, Sep 20, 2013 at 09:08:57PM +0200, Linus Walleij wrote: > On Fri, Sep 13, 2013 at 5:14 PM, Mika Westerberg > wrote: > > > Instead of asking each driver to register to the ACPI events we can just > > call acpi_gpiochip_register_interrupts() for each chip that has ACPI

Re: [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions

2013-09-23 Thread Mika Westerberg
On Tue, Sep 24, 2013 at 12:47:56AM +, Zheng, Lv wrote: > > From: Mika Westerberg [mailto:mika.westerb...@linux.intel.com] > > Sent: Tuesday, September 17, 2013 4:37 PM > > > > On Mon, Sep 16, 2013 at 11:35:56PM +, Zheng, Lv wrote: > > > > From:

Re: [PATCH v2 1/9] i2c: prepare runtime PM support for I2C client devices

2013-09-23 Thread Mika Westerberg
On Tue, Sep 17, 2013 at 01:07:37PM +0200, Sylwester Nawrocki wrote: > On 09/16/2013 10:47 AM, Mika Westerberg wrote: > > I'm actually thinking that it is probably better now if we don't touch the > > client runtime PM at all in the I2C core. > > > > I propo

[PATCH RESEND 00/12] ACPI: add module_acpi_driver() and convert drivers to it

2012-09-07 Thread Mika Westerberg
; as this same check is already done at the beginning of acpi_bus_register_driver(). I think these should all go via ACPI tree because they all depend on the first patch which touches the ACPI subsystem. Mika Westerberg (12): ACPI: introduce module_acpi_driver() helper macro ACPI/button

[PATCH RESEND 01/12] ACPI: introduce module_acpi_driver() helper macro

2012-09-07 Thread Mika Westerberg
Add a helper macro module_acpi_driver() which reduces the boilerplate code for ACPI drivers. This is similar what is done for other busses (PCI, SPI, I2C etc). Signed-off-by: Mika Westerberg --- include/acpi/acpi_bus.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include

[PATCH RESEND 03/12] ACPI/fan: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg --- drivers/acpi/fan.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index bc36a47..3bd6a54 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c @@ -212,24 +212,4 @@ static

[PATCH RESEND 04/12] ACPI/hed: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg --- drivers/acpi/hed.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c index d0c1967..20a0f2c 100644 --- a/drivers/acpi/hed.c +++ b/drivers/acpi/hed.c @@ -86,25 +86,7 @@ static

[PATCH RESEND 09/12] ideapad: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg Acked-by: Ike Panhc --- drivers/platform/x86/ideapad-laptop.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index dae7abe..5ff4f2e 100644 --- a

[PATCH RESEND 02/12] ACPI/button: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg --- drivers/acpi/button.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 314a3b8..f0d936b 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -450,15 +450,4

[PATCH RESEND 05/12] ACPI/sbshc: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg --- drivers/acpi/sbshc.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index f8d2a47..cf6129a 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c @@ -310,23 +310,7

[PATCH RESEND 10/12] topstar-laptop: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg Acked-by: Herton R. Krzesinski --- drivers/platform/x86/topstar-laptop.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c index d528daa

[PATCH RESEND 08/12] hp_accel: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg Reviewed-by: Éric Piel --- drivers/platform/x86/hp_accel.c | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c index 6b9af98..18d74f2 100644 --- a/drivers

[PATCH RESEND 11/12] toshiba_bluetooth: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg --- drivers/platform/x86/toshiba_bluetooth.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c index 5e5d631..e95be0b 100644 --- a

[PATCH RESEND 12/12] xo15-ebook: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg --- drivers/platform/x86/xo15-ebook.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/platform/x86/xo15-ebook.c b/drivers/platform/x86/xo15-ebook.c index 38ba39d..16d340c 100644 --- a/drivers/platform/x86/xo15-ebook.c

[PATCH RESEND 06/12] i2c-scmi: convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg Acked-by: Jean Delvare --- drivers/i2c/busses/i2c-scmi.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c index 388cbdc..6aafa3d 100644 --- a/drivers/i2c/busses/i2c

[PATCH RESEND 07/12] Input: atlas_btns - convert to module_acpi_driver()

2012-09-07 Thread Mika Westerberg
Signed-off-by: Mika Westerberg Acked-by: Dmitry Torokhov --- drivers/input/misc/atlas_btns.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c index 601f737..26f1313 100644 --- a/drivers

Re: [PATCH] ACPI / PM: Fix header of acpi_dev_pm_detach() in acpi.h

2012-12-05 Thread Mika Westerberg
On Wed, Dec 05, 2012 at 12:08:12PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The header of acpi_dev_pm_detach() in include/linux/acpi.h has an > incorrect return type, which should be void. Fix that. > > Signed-off-by: Rafael J. Wysocki Reviewed-b

Re: [PATCH 6/7] gpio/langwell: find the irq domain mapping

2012-10-17 Thread Mika Westerberg
On Tue, Oct 16, 2012 at 09:23:23PM +0200, Linus Walleij wrote: > Switch from creating the IRQ domain mapping to finding it. In this > case we know very well that the driver has created the apropriate > mapping, we just need to locate it, no need to create any > on-the-fly mappings. I may be missin

[PATCH] ACPI: add documentation about ACPI 5 enumeration

2012-12-07 Thread Mika Westerberg
Add a document that describes how to take advantage of ACPI enumeration for buses like platform, I2C and SPI. In addition to that we document how to translate ACPI GpioIo and GpioInt resources to be useful in Linux device drivers. Signed-off-by: Mika Westerberg --- Documentation/acpi

[PATCH] ACPI: add Haswell LPSS devices to acpi_platform_device_ids list

2012-12-07 Thread Mika Westerberg
All devices behind Haswell LPSS (Low Power Subsystem) should be represented as platform devices so add them to the acpi_platform_device_ids list. Signed-off-by: Mika Westerberg --- drivers/acpi/scan.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/acpi/scan.c b

Re: [PATCH] ACPI: add Haswell LPSS devices to acpi_platform_device_ids list

2012-12-07 Thread Mika Westerberg
On Fri, Dec 07, 2012 at 11:01:26AM +, Alan Cox wrote: > On Fri, 7 Dec 2012 12:08:02 +0200 > Mika Westerberg wrote: > > > All devices behind Haswell LPSS (Low Power Subsystem) should be represented > > as platform devices > > What about the bus heirarchy ?

Re: [PATCH 1/3] ACPI: Move device resources interpretation code from PNP to ACPI core

2012-11-12 Thread Mika Westerberg
On Mon, Nov 12, 2012 at 01:00:26PM +0100, Rafael J. Wysocki wrote: > +/** > + * acpi_dev_irq_flags - Determine IRQ resource flags. > + * @triggering: Triggering type as provided by ACPI. > + * @polarity: Interrupt polarity as provided by ACPI. > + * @shareable: Whether or not the interrupt is share

Re: [PATCH 3/3] ACPI: Evaluate _CRS while creating device node objects

2012-11-12 Thread Mika Westerberg
On Mon, Nov 12, 2012 at 01:02:11PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Currently, whoever wants to use ACPI device resources has to call > acpi_walk_resources() to browse the buffer returned by the _CRS > method for the given device and create filters passed to that > ro

Re: [PATCH 3/3] ACPI: Evaluate _CRS while creating device node objects

2012-11-12 Thread Mika Westerberg
On Mon, Nov 12, 2012 at 10:03:56PM +0100, Rafael J. Wysocki wrote: > > > +static acpi_status acpi_bus_add_resource(struct acpi_resource *res, > > > + void *context) > > > +{ > > > + struct list_head *list = context; > > > + struct acpi_resource_list_entry *entry; >

Re: [Replacement][PATCH 3/3]

2012-11-13 Thread Mika Westerberg
On Tue, Nov 13, 2012 at 01:06:59PM +0100, Rafael J. Wysocki wrote: > > I don't know any better option. > > Well, a better option would be to convince ACPICA to provide us different > interfaces. :-) Heh, indeed. > We might actually try to do that in the future, but for now we still need > _CRS t

Re: [Replacement][PATCH 3/3]

2012-11-13 Thread Mika Westerberg
On Tue, Nov 13, 2012 at 04:15:51PM +0100, Rafael J. Wysocki wrote: > > Could we change this so that you can pass NULL list as well (provided that > > the preproc is given)? > > > > This is useful in case when we try to find the SPI/I2C device handle based > > on the ACPI serial bus resource addres

Re: [Replacement][PATCH 3/3]

2012-11-13 Thread Mika Westerberg
On Tue, Nov 13, 2012 at 04:28:50PM +0100, Rafael J. Wysocki wrote: > On Tuesday, November 13, 2012 05:18:13 PM Mika Westerberg wrote: > > On Tue, Nov 13, 2012 at 04:15:51PM +0100, Rafael J. Wysocki wrote: > > > > Could we change this so that you can pass NULL list as well (p

Re: [PATCH 0/3 rev 2] Centralized parsing of ACPI device resources

2012-11-14 Thread Mika Westerberg
itations I didn't realize before. I've now tested this series on my ACPI 5 enabled test machine and everything works fine - I can see the platform devices and that they have the ACPI handle attached. For the whole series, Reviewed-by: Mika Westerberg Tested-by: Mika Westerberg (test

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

2012-11-15 Thread Mika Westerberg
re is a dependency to linux-pm.git/linux-next so I think it would be better if these will be merged via that tree. 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/Kco

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

2012-11-15 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 | 212 ++ drivers/i2c/i2c

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

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

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

2012-11-15 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

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

2012-11-06 Thread Mika Westerberg
On Mon, Nov 05, 2012 at 03:40:14PM +0100, Linus Walleij wrote: > > I forgot to mention that we want to hook up _existing_ drivers to those > > things, > > and they already use the global GPIO numbers, don't they? > > Yes they do, usually this is either passed from the platform using platform > da

[PATCH] ACPI / platform: use ACPI device name instead of _HID._UID

2012-11-06 Thread Mika Westerberg
evice name instead of trusting that the BIOS sets the _UIDs correctly. Signed-off-by: Mika Westerberg Cc: Bjorn Helgaas --- This was suggested by Bjorn Helgaas in another thread. The patch applies on top of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next. drivers

Re: [PATCH] gpiolib: iron out include ladder mistakes

2012-11-07 Thread Mika Westerberg
On Tue, Nov 06, 2012 at 05:21:03PM +0100, Linus Walleij wrote: > +static inline int > +gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, > +unsigned int pin_base, unsigned int npins) > +{ > +} Should you return some value above? Like -ENOSYS? -- To unsubsc

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

2012-11-07 Thread Mika Westerberg
On Tue, Nov 06, 2012 at 11:15:21AM +0100, Linus Walleij wrote: > On Tue, Nov 6, 2012 at 10:39 AM, Mika Westerberg > wrote: > > On Mon, Nov 05, 2012 at 03:40:14PM +0100, Linus Walleij wrote: > >> > I forgot to mention that we want to hook up _existing_ drivers to those &

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

2012-11-07 Thread Mika Westerberg
On Tue, Nov 06, 2012 at 11:18:11PM +0100, Rafael J. Wysocki wrote: > > How is the SPI controller different than this? Is there some logical > > difference that requires a different framework? Or are you proposing > > that we get rid of acpi_bus_register_driver() and migrate everything > > to this

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