diff mbox

mfd: cros_ec_spi: set wakeup capability

Message ID 1402953143-24681-1-git-send-email-dianders@chromium.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Doug Anderson June 16, 2014, 9:12 p.m. UTC
From: Prathyush K <prathyush.k@samsung.com>

Set the device as wakeup capable and register the wakeup source.

Note: Though it makes more sense to have the SPI framework do this,
(either via device tree or by board_info)
this change is as per an existing mail chain:
https://lkml.org/lkml/2009/8/27/291

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
---
Note that I don't have suspend/resume actually working upstream, but I
see that /sys/bus/spi/drivers/cros-ec-spi/spi2.0/power/wakeup exists
with this patch and doesn't exist without it.

 drivers/mfd/cros_ec_spi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Lee Jones June 18, 2014, 9:20 a.m. UTC | #1
> From: Prathyush K <prathyush.k@samsung.com>
> 
> Set the device as wakeup capable and register the wakeup source.
> 
> Note: Though it makes more sense to have the SPI framework do this,
> (either via device tree or by board_info)
> this change is as per an existing mail chain:
> https://lkml.org/lkml/2009/8/27/291
> 
> Signed-off-by: Prathyush K <prathyush.k@samsung.com>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
> Note that I don't have suspend/resume actually working upstream, but I
> see that /sys/bus/spi/drivers/cros-ec-spi/spi2.0/power/wakeup exists
> with this patch and doesn't exist without it.

Very well.  Applied, thanks.

>  drivers/mfd/cros_ec_spi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
> index 0b8d328..ef22dd5 100644
> --- a/drivers/mfd/cros_ec_spi.c
> +++ b/drivers/mfd/cros_ec_spi.c
> @@ -385,6 +385,8 @@ static int cros_ec_spi_probe(struct spi_device *spi)
>  		return err;
>  	}
>  
> +	device_init_wakeup(&spi->dev, true);
> +
>  	return 0;
>  }
>
diff mbox

Patch

diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
index 0b8d328..ef22dd5 100644
--- a/drivers/mfd/cros_ec_spi.c
+++ b/drivers/mfd/cros_ec_spi.c
@@ -385,6 +385,8 @@  static int cros_ec_spi_probe(struct spi_device *spi)
 		return err;
 	}
 
+	device_init_wakeup(&spi->dev, true);
+
 	return 0;
 }