Thread (37 messages) 37 messages, 11 authors, 2014-09-15

[Linaro-acpi] [RFC PATCH for Juno 1/2] net: smsc911x add support for probing from ACPI

From: Grant Likely <hidden>
Date: 2014-09-15 04:08:49
Also in: linux-acpi, lkml

On Mon, 1 Sep 2014 16:28:54 +0100, Graeme Gregory [off-list ref] wrote:
On Mon, Sep 01, 2014 at 05:17:51PM +0200, Arnd Bergmann wrote:
quoted
On Monday 01 September 2014 23:06:00 Hanjun Guo wrote:
quoted
+#ifdef CONFIG_ACPI
+/* Configure some sensible defaults for ACPI mode */
+static int smsc911x_probe_config_acpi(struct smsc911x_platform_config *config,
+                                   acpi_handle *ahandle)
+{
+       if (!ahandle)
+               return -ENOSYS;
+
+       config->phy_interface = PHY_INTERFACE_MODE_MII;
Please remove the #ifdef and use 

	if (!IS_ENABLED(CONFIG_ACPI) || !ahandle)

to check for ACPI support. This should result in the same object code
in all cases, but give better compile-time coverage when ACPI is
disabled.
struct acpi_handle does not exist in the case !CONFIG_ACPI
quoted
Also, -ENOSYS is probably the wrong return value. I think you mean
-ENXIO.
Yes that would make sense thanks.

Not sure if we are planning to actually upstream this patch, I guess it
depends if ARM start shipping Junos with the ACPI tables loaded on them.
I think we do want this upstreamed. Juno is intended to be a readily
available reference platform, regardless of the firmware loaded when
shipped. There will be users who use it as a test platform for ACPI
development.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help