All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power()
@ 2016-05-19 13:25 ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2016-05-19 13:25 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson, Adrian Hunter, Rafael J. Wysocki, Len Brown
  Cc: linux-acpi, Laszlo Fiat, Nicholas Krause, stable

Drivers that needs acpi_device_fix_up_power(), allow them to be built as
modules by exporting this function.

Cc: <stable@vger.kernel.org> # 4.5+
Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Rafael/Len, if you are okay with using acpi_device_fix_up_power() as a fix
for an issue in patch 2/2, then I would like to request an ack so I can take
both these patches via my MMC tree.

---
 drivers/acpi/device_pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index cd2c3d6..993fd31 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -319,6 +319,7 @@ int acpi_device_fix_up_power(struct acpi_device *device)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(acpi_device_fix_up_power);
 
 int acpi_device_update_power(struct acpi_device *device, int *state_p)
 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power()
@ 2016-05-19 13:25 ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2016-05-19 13:25 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson, Adrian Hunter, Rafael J. Wysocki, Len Brown
  Cc: linux-acpi, Laszlo Fiat, Nicholas Krause, stable

Drivers that needs acpi_device_fix_up_power(), allow them to be built as
modules by exporting this function.

Cc: <stable@vger.kernel.org> # 4.5+
Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Rafael/Len, if you are okay with using acpi_device_fix_up_power() as a fix
for an issue in patch 2/2, then I would like to request an ack so I can take
both these patches via my MMC tree.

---
 drivers/acpi/device_pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index cd2c3d6..993fd31 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -319,6 +319,7 @@ int acpi_device_fix_up_power(struct acpi_device *device)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(acpi_device_fix_up_power);
 
 int acpi_device_update_power(struct acpi_device *device, int *state_p)
 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] mmc: sdhci-acpi: Ensure connected devices are powered when probing
  2016-05-19 13:25 ` Ulf Hansson
@ 2016-05-19 13:25   ` Ulf Hansson
  -1 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2016-05-19 13:25 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson, Adrian Hunter, Rafael J. Wysocki, Len Brown
  Cc: linux-acpi, Laszlo Fiat, Nicholas Krause, stable

From: Adrian Hunter <adrian.hunter@intel.com>

Some devices connected to the SDHCI controller may have separate enabling
lines that are controlled through GPIO. These devices need to be powered
on and enabled before probing. This is to ensure all devices connected can
be seen by the controller.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
Cc: <stable@vger.kernel.org> # 4.5+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/sdhci-acpi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index b2d70ba..2d1c4870 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -378,7 +378,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	acpi_handle handle = ACPI_HANDLE(dev);
-	struct acpi_device *device;
+	struct acpi_device *device, *child;
 	struct sdhci_acpi_host *c;
 	struct sdhci_host *host;
 	struct resource *iomem;
@@ -390,6 +390,11 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 	if (acpi_bus_get_device(handle, &device))
 		return -ENODEV;
 
+	/* Power on the SDHCI controller and its children */
+	acpi_device_fix_up_power(device);
+	list_for_each_entry(child, &device->children, node)
+		acpi_device_fix_up_power(child);
+
 	if (acpi_bus_get_status(device) || !device->status.present)
 		return -ENODEV;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] mmc: sdhci-acpi: Ensure connected devices are powered when probing
@ 2016-05-19 13:25   ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2016-05-19 13:25 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson, Adrian Hunter, Rafael J. Wysocki, Len Brown
  Cc: linux-acpi, Laszlo Fiat, Nicholas Krause, stable

From: Adrian Hunter <adrian.hunter@intel.com>

Some devices connected to the SDHCI controller may have separate enabling
lines that are controlled through GPIO. These devices need to be powered
on and enabled before probing. This is to ensure all devices connected can
be seen by the controller.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
Cc: <stable@vger.kernel.org> # 4.5+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/sdhci-acpi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index b2d70ba..2d1c4870 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -378,7 +378,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	acpi_handle handle = ACPI_HANDLE(dev);
-	struct acpi_device *device;
+	struct acpi_device *device, *child;
 	struct sdhci_acpi_host *c;
 	struct sdhci_host *host;
 	struct resource *iomem;
@@ -390,6 +390,11 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 	if (acpi_bus_get_device(handle, &device))
 		return -ENODEV;
 
+	/* Power on the SDHCI controller and its children */
+	acpi_device_fix_up_power(device);
+	list_for_each_entry(child, &device->children, node)
+		acpi_device_fix_up_power(child);
+
 	if (acpi_bus_get_status(device) || !device->status.present)
 		return -ENODEV;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power()
  2016-05-19 13:25 ` Ulf Hansson
  (?)
  (?)
@ 2016-05-19 13:52 ` Rafael J. Wysocki
  2016-05-20 14:04   ` Ulf Hansson
  -1 siblings, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2016-05-19 13:52 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-mmc, Adrian Hunter, Rafael J. Wysocki, Len Brown,
	ACPI Devel Maling List, Laszlo Fiat, Nicholas Krause, Stable

On Thu, May 19, 2016 at 3:25 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> Drivers that needs acpi_device_fix_up_power(), allow them to be built as
> modules by exporting this function.
>
> Cc: <stable@vger.kernel.org> # 4.5+
> Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Rafael/Len, if you are okay with using acpi_device_fix_up_power() as a fix
> for an issue in patch 2/2, then I would like to request an ack so I can take
> both these patches via my MMC tree.

Yeah, should be fine.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  drivers/acpi/device_pm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
> index cd2c3d6..993fd31 100644
> --- a/drivers/acpi/device_pm.c
> +++ b/drivers/acpi/device_pm.c
> @@ -319,6 +319,7 @@ int acpi_device_fix_up_power(struct acpi_device *device)
>
>         return ret;
>  }
> +EXPORT_SYMBOL_GPL(acpi_device_fix_up_power);
>
>  int acpi_device_update_power(struct acpi_device *device, int *state_p)
>  {
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-acpi: Ensure connected devices are powered when probing
  2016-05-19 13:25   ` Ulf Hansson
  (?)
@ 2016-05-20  7:04   ` Adrian Hunter
  2016-05-20 14:04     ` Ulf Hansson
  -1 siblings, 1 reply; 8+ messages in thread
From: Adrian Hunter @ 2016-05-20  7:04 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-mmc, Rafael J. Wysocki, Len Brown, linux-acpi, Laszlo Fiat,
	Nicholas Krause, stable

On 19/05/16 16:25, Ulf Hansson wrote:
> From: Adrian Hunter <adrian.hunter@intel.com>
> 
> Some devices connected to the SDHCI controller may have separate enabling
> lines that are controlled through GPIO. These devices need to be powered
> on and enabled before probing. This is to ensure all devices connected can
> be seen by the controller.
> 

I have noticed that stable can get dependent patches the wrong way around
(breaking bisectability) when they are not explicitly defined as dependent.
For that reason, I was going to put the EXPORT of acpi_device_fix_up_power()
into this patch.

I think we need at least to mention in this patch that it is dependent on
the other patch.

Also I have more information here:

Reported-by: Laszlo Fiat <laszlo.fiat@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112571
Link: http://lkml.kernel.org/r/CA+7w51inLtQSr656bJvOjGG9oQWKYPXH+xxDPJKbeJ=CcrkS9Q@mail.gmail.com


> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
> Cc: <stable@vger.kernel.org> # 4.5+
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/host/sdhci-acpi.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index b2d70ba..2d1c4870 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -378,7 +378,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	acpi_handle handle = ACPI_HANDLE(dev);
> -	struct acpi_device *device;
> +	struct acpi_device *device, *child;
>  	struct sdhci_acpi_host *c;
>  	struct sdhci_host *host;
>  	struct resource *iomem;
> @@ -390,6 +390,11 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
>  	if (acpi_bus_get_device(handle, &device))
>  		return -ENODEV;
>  
> +	/* Power on the SDHCI controller and its children */
> +	acpi_device_fix_up_power(device);
> +	list_for_each_entry(child, &device->children, node)
> +		acpi_device_fix_up_power(child);
> +
>  	if (acpi_bus_get_status(device) || !device->status.present)
>  		return -ENODEV;
>  
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power()
  2016-05-19 13:52 ` [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power() Rafael J. Wysocki
@ 2016-05-20 14:04   ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2016-05-20 14:04 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-mmc, Adrian Hunter, Rafael J. Wysocki, Len Brown,
	ACPI Devel Maling List, Laszlo Fiat, Nicholas Krause, Stable

On 19 May 2016 at 15:52, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Thu, May 19, 2016 at 3:25 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> Drivers that needs acpi_device_fix_up_power(), allow them to be built as
>> modules by exporting this function.
>>
>> Cc: <stable@vger.kernel.org> # 4.5+
>> Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>> ---
>>
>> Rafael/Len, if you are okay with using acpi_device_fix_up_power() as a fix
>> for an issue in patch 2/2, then I would like to request an ack so I can take
>> both these patches via my MMC tree.
>
> Yeah, should be fine.
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Thanks, applied for fixes!

Kind regards
Uffe

>
>> ---
>>  drivers/acpi/device_pm.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
>> index cd2c3d6..993fd31 100644
>> --- a/drivers/acpi/device_pm.c
>> +++ b/drivers/acpi/device_pm.c
>> @@ -319,6 +319,7 @@ int acpi_device_fix_up_power(struct acpi_device *device)
>>
>>         return ret;
>>  }
>> +EXPORT_SYMBOL_GPL(acpi_device_fix_up_power);
>>
>>  int acpi_device_update_power(struct acpi_device *device, int *state_p)
>>  {
>> --
>> 1.9.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-acpi: Ensure connected devices are powered when probing
  2016-05-20  7:04   ` Adrian Hunter
@ 2016-05-20 14:04     ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2016-05-20 14:04 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: linux-mmc, Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Laszlo Fiat, Nicholas Krause, # 4.0+

On 20 May 2016 at 09:04, Adrian Hunter <adrian.hunter@intel.com> wrote:
> On 19/05/16 16:25, Ulf Hansson wrote:
>> From: Adrian Hunter <adrian.hunter@intel.com>
>>
>> Some devices connected to the SDHCI controller may have separate enabling
>> lines that are controlled through GPIO. These devices need to be powered
>> on and enabled before probing. This is to ensure all devices connected can
>> be seen by the controller.
>>
>
> I have noticed that stable can get dependent patches the wrong way around
> (breaking bisectability) when they are not explicitly defined as dependent.
> For that reason, I was going to put the EXPORT of acpi_device_fix_up_power()
> into this patch.
>
> I think we need at least to mention in this patch that it is dependent on
> the other patch.

I do that..

>
> Also I have more information here:
>
> Reported-by: Laszlo Fiat <laszlo.fiat@gmail.com>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112571
> Link: http://lkml.kernel.org/r/CA+7w51inLtQSr656bJvOjGG9oQWKYPXH+xxDPJKbeJ=CcrkS9Q@mail.gmail.com
>

...and add this.

>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
>> Cc: <stable@vger.kernel.org> # 4.5+
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Applied for fixes!

Thanks and kind regards
Uffe

>> ---
>>  drivers/mmc/host/sdhci-acpi.c | 7 ++++++-
>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
>> index b2d70ba..2d1c4870 100644
>> --- a/drivers/mmc/host/sdhci-acpi.c
>> +++ b/drivers/mmc/host/sdhci-acpi.c
>> @@ -378,7 +378,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
>>  {
>>       struct device *dev = &pdev->dev;
>>       acpi_handle handle = ACPI_HANDLE(dev);
>> -     struct acpi_device *device;
>> +     struct acpi_device *device, *child;
>>       struct sdhci_acpi_host *c;
>>       struct sdhci_host *host;
>>       struct resource *iomem;
>> @@ -390,6 +390,11 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
>>       if (acpi_bus_get_device(handle, &device))
>>               return -ENODEV;
>>
>> +     /* Power on the SDHCI controller and its children */
>> +     acpi_device_fix_up_power(device);
>> +     list_for_each_entry(child, &device->children, node)
>> +             acpi_device_fix_up_power(child);
>> +
>>       if (acpi_bus_get_status(device) || !device->status.present)
>>               return -ENODEV;
>>
>>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-20 14:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 13:25 [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power() Ulf Hansson
2016-05-19 13:25 ` Ulf Hansson
2016-05-19 13:25 ` [PATCH 2/2] mmc: sdhci-acpi: Ensure connected devices are powered when probing Ulf Hansson
2016-05-19 13:25   ` Ulf Hansson
2016-05-20  7:04   ` Adrian Hunter
2016-05-20 14:04     ` Ulf Hansson
2016-05-19 13:52 ` [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power() Rafael J. Wysocki
2016-05-20 14:04   ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.