* [PATCH] ACPI / LPSS: Don't abort acpi scan on missing mem resource.
@ 2017-08-04 23:46 Ronald Tschalär
2017-08-07 10:47 ` Mika Westerberg
0 siblings, 1 reply; 4+ messages in thread
From: Ronald Tschalär @ 2017-08-04 23:46 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Len Brown, Federico Lorenzi, linux-acpi, Ronald Tschalär
On MacBook8's (2015) there appears to be no memory resource for the
SPI master device. Returning an error here in this case then leads to
the acpi device being ignored completely instead of just the handler
being skipped.
This isn't an issue on later MacBook(Pro)'s because their ACPI SPI
devices don't have any CID and therefore no attempt is made to install
this handler.
Returning an error was introduced in commit d3e13ff3c1aa - this restores
the original behaviour.
Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
---
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 e51a1e98e62f..558fbdec5b38 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -452,7 +452,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
acpi_dev_free_resource_list(&resource_list);
if (!pdata->mmio_base) {
- ret = -ENOMEM;
+ /* Skip the device, but continue the namespace scan. */
+ ret = 0;
goto err_out;
}
--
2.13.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ACPI / LPSS: Don't abort acpi scan on missing mem resource.
2017-08-04 23:46 [PATCH] ACPI / LPSS: Don't abort acpi scan on missing mem resource Ronald Tschalär
@ 2017-08-07 10:47 ` Mika Westerberg
2017-08-08 3:14 ` Life is hard, and then you die
0 siblings, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2017-08-07 10:47 UTC (permalink / raw)
To: Ronald Tschalär
Cc: Rafael J. Wysocki, Len Brown, Federico Lorenzi, linux-acpi
On Fri, Aug 04, 2017 at 04:46:16PM -0700, Ronald Tschalär wrote:
> On MacBook8's (2015) there appears to be no memory resource for the
> SPI master device. Returning an error here in this case then leads to
> the acpi device being ignored completely instead of just the handler
> being skipped.
What's the problem if we prevent creation of the SPI master device? How
does user see the issue? It is not like the SPI driver could use the
device anyway.
Just trying to understand why we would want to change the behaviour.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI / LPSS: Don't abort acpi scan on missing mem resource.
2017-08-07 10:47 ` Mika Westerberg
@ 2017-08-08 3:14 ` Life is hard, and then you die
2017-08-08 10:13 ` Mika Westerberg
0 siblings, 1 reply; 4+ messages in thread
From: Life is hard, and then you die @ 2017-08-08 3:14 UTC (permalink / raw)
To: Mika Westerberg
Cc: Rafael J. Wysocki, Len Brown, Federico Lorenzi, linux-acpi
On Mon, Aug 07, 2017 at 01:47:09PM +0300, Mika Westerberg wrote:
> On Fri, Aug 04, 2017 at 04:46:16PM -0700, Ronald Tschalär wrote:
> > On MacBook8's (2015) there appears to be no memory resource for the
> > SPI master device. Returning an error here in this case then leads to
> > the acpi device being ignored completely instead of just the handler
> > being skipped.
>
> What's the problem if we prevent creation of the SPI master device? How
> does user see the issue?
Their keyboard and touchpad don't work :-)
> It is not like the SPI driver could use the
> device anyway.
The spi master device works just fine (once recognized). Nothing the
acpi-lpss handler provides appears to be necessary for this device
(though admittedly the PM stuff hasn't been explored much).
> Just trying to understand why we would want to change the behaviour.
Apologies for the lack of context. This is related to the work on
the SPI keyboard and touchpad driver for MacBook(Pro)'s
(https://github.com/cb22/macbook12-spi-driver/) (and as such is
tangentally related to the recent apple SPI properties work by Lukas
Wunner that just got accepted). We obviously need the spi master
device in order to set up the keyboard/touchpad SPI slave device.
Btw., in case it matters, this SPI controller shows up in lscpi as
00:15.4 Serial bus controller [0c80]: Intel Corporation Wildcat Point-LP Serial IO GSPI Controller #1 [8086:9ce6] (rev 03)
Hope this helps.
Cheers,
Ronald
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI / LPSS: Don't abort acpi scan on missing mem resource.
2017-08-08 3:14 ` Life is hard, and then you die
@ 2017-08-08 10:13 ` Mika Westerberg
0 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2017-08-08 10:13 UTC (permalink / raw)
To: Life is hard, and then you die
Cc: Rafael J. Wysocki, Len Brown, Federico Lorenzi, linux-acpi
On Mon, Aug 07, 2017 at 08:14:16PM -0700, Life is hard, and then you die wrote:
>
> On Mon, Aug 07, 2017 at 01:47:09PM +0300, Mika Westerberg wrote:
> > On Fri, Aug 04, 2017 at 04:46:16PM -0700, Ronald Tschalär wrote:
> > > On MacBook8's (2015) there appears to be no memory resource for the
> > > SPI master device. Returning an error here in this case then leads to
> > > the acpi device being ignored completely instead of just the handler
> > > being skipped.
> >
> > What's the problem if we prevent creation of the SPI master device? How
> > does user see the issue?
>
> Their keyboard and touchpad don't work :-)
>
> > It is not like the SPI driver could use the
> > device anyway.
>
> The spi master device works just fine (once recognized). Nothing the
> acpi-lpss handler provides appears to be necessary for this device
> (though admittedly the PM stuff hasn't been explored much).
>
> > Just trying to understand why we would want to change the behaviour.
>
> Apologies for the lack of context. This is related to the work on
> the SPI keyboard and touchpad driver for MacBook(Pro)'s
> (https://github.com/cb22/macbook12-spi-driver/) (and as such is
> tangentally related to the recent apple SPI properties work by Lukas
> Wunner that just got accepted). We obviously need the spi master
> device in order to set up the keyboard/touchpad SPI slave device.
OK, thanks for the clarification. I think it may be good idea to add
these details to the changelog as well.
The patch itself is fine by me :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-08 10:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 23:46 [PATCH] ACPI / LPSS: Don't abort acpi scan on missing mem resource Ronald Tschalär
2017-08-07 10:47 ` Mika Westerberg
2017-08-08 3:14 ` Life is hard, and then you die
2017-08-08 10:13 ` Mika Westerberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox