Skip to contentSkip to conversation

Add SDHCI ACPI driver

PATCH Applied Adrian Hunter 3 participants 7 messages Nov 23, 2012

Subsystems (4)
lore
Share & tools
lore

Adrian Hunter

author maintainer
#0 lore raw

v2 cover Add SDHCI ACPI driver

Hi

Here is SDHCI ACPI driver.

Changes for v2:

Dropped "PNPACPI: exclude SDHCI devices" Added "PNPACPI: exclude devices already bound" Changed dev->acpi_handle to ACPI_HANDLE(dev) Added Chris' Ack for sdhci-acpi

Adrian Hunter (2):
ACPI: add SDHCI to ACPI platform devices
mmc: sdhci-acpi: add SDHCI ACPI driver

Mika Westerberg (1):
PNPACPI: exclude devices already bound

 drivers/acpi/scan.c           |   2 +
 drivers/mmc/host/Kconfig      |  12 ++
 drivers/mmc/host/Makefile     |   1 +
 drivers/mmc/host/sdhci-acpi.c | 304 ++++++++++++++++++++++++++++++++++++++++++
 drivers/pnp/pnpacpi/core.c    |   4 +
 5 files changed, 323 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-acpi.c

Regards
Adrian Hunter

author maintainer
#1 lore raw

PATCH v2 1/3 PNPACPI: exclude devices already bound

From: Mika Westerberg <[email protected]>

This will exclude ACPI platform devices from also being created as PNP devices.

---
 drivers/pnp/pnpacpi/core.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/pnp/pnpacpi/core.c +4 -0
index 26b5d4b..653d563 100644
@@ -242,6 +242,10 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
 	char *pnpid;
 	struct acpi_hardware_id *id;
 
+	/* Skip devices that are already bound */
+	if (device->physical_node_count)
+		return 0;
+
 	/*
 	 * If a PnPacpi device is not present , the device
 	 * driver should not be loaded.
Signature · 1 line
1.7.11.7
author maintainer
#2 lore raw

PATCH v2 2/3 ACPI: add SDHCI to ACPI platform devices

In reply to Adrian Hunter
---
 drivers/acpi/scan.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/scan.c +2 -0
index 8c4ac6d..67a7fa6 100644
@@ -35,6 +35,8 @@ static const char *dummy_hid = "device";
  */
 static const struct acpi_device_id acpi_platform_device_ids[] = {
 
+	{ "PNP0D40" },
+
 	{ }
 };
 
Signature · 1 line
1.7.11.7
author maintainer
#4 lore raw

PATCH v2 3/3 mmc: sdhci-acpi: add SDHCI ACPI driver

In reply to Adrian Hunter
---
 drivers/mmc/host/Kconfig      |  12 ++
 drivers/mmc/host/Makefile     |   1 +
 drivers/mmc/host/sdhci-acpi.c | 304 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 317 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-acpi.c
drivers/mmc/host/Kconfig +12 -0
index 9bf10e7..56eac10 100644
@@ -81,6 +81,18 @@ config MMC_RICOH_MMC
 
 	  If unsure, say Y.
 
+config MMC_SDHCI_ACPI
+	tristate "SDHCI support for ACPI enumerated SDHCI controllers"
+	depends on MMC_SDHCI && ACPI
+	help
+	  This selects support for ACPI enumerated SDHCI controllers,
+	  identified by ACPI Compatibility ID PNP0D40 or specific
+	  ACPI Hardware IDs.
+
+	  If you have a controller with this interface, say Y or M here.
+
+	  If unsure, say N.
+
 config MMC_SDHCI_PLTFM
 	tristate "SDHCI platform and OF driver helper"
 	depends on MMC_SDHCI
drivers/mmc/host/Makefile +1 -0
index 17ad0a7..0e4960a 100644
@@ -9,6 +9,7 @@ obj-$(CONFIG_MMC_MXS)		+= mxs-mmc.o
 obj-$(CONFIG_MMC_SDHCI)		+= sdhci.o
 obj-$(CONFIG_MMC_SDHCI_PCI)	+= sdhci-pci.o
 obj-$(subst m,y,$(CONFIG_MMC_SDHCI_PCI))	+= sdhci-pci-data.o
+obj-$(CONFIG_MMC_SDHCI_ACPI)	+= sdhci-acpi.o
 obj-$(CONFIG_MMC_SDHCI_PXAV3)	+= sdhci-pxav3.o
 obj-$(CONFIG_MMC_SDHCI_PXAV2)	+= sdhci-pxav2.o
 obj-$(CONFIG_MMC_SDHCI_S3C)	+= sdhci-s3c.o
drivers/mmc/host/sdhci-acpi.c new file +304 -0

304 lines not on this page · raw message

Signature · 1 line
1.7.11.7
Reviewed-by on v2 2/3
#3 lore raw

Re: [PATCH v2 2/3] ACPI: add SDHCI to ACPI platform devices

In reply to Adrian Hunter
Quoted 1 line · Adrian Hunter
Quoted 19 lines
---
 drivers/acpi/scan.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/scan.c +2 -0
index 8c4ac6d..67a7fa6 100644
@@ -35,6 +35,8 @@ static const char *dummy_hid = "device";
  */
 static const struct acpi_device_id acpi_platform_device_ids[] = {
 
+	{ "PNP0D40" },
+
 	{ }
 };
 
Signature · 1 line
1.7.11.7
#6 lore raw
In reply to Adrian Hunter
Quoted 12 lines · Adrian Hunter

Hi

Here is SDHCI ACPI driver.

Changes for v2:

Dropped "PNPACPI: exclude SDHCI devices" Added "PNPACPI: exclude devices already bound" Changed dev->acpi_handle to ACPI_HANDLE(dev) Added Chris' Ack for sdhci-acpi

Quoted 6 lines

Adrian Hunter (2):
ACPI: add SDHCI to ACPI platform devices
mmc: sdhci-acpi: add SDHCI ACPI driver

Mika Westerberg (1):
PNPACPI: exclude devices already bound

Applied to linux-pm.git/linux-next as v3.8 material.

Next time, however, I'll really prefer it if your changelogs (1) exist and (2) are more descriptive than the (existing) ones in this series.

I added the changelogs for you (please check in the tree above if they make sense), but that's not something I should be doing in general I think.

Thanks,
Rafael

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.