diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2013-08-21 10:28:23 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-08-23 04:22:29 -0400 |
commit | 55e71edb81b2b45273e7b284cce13ff24bde846f (patch) | |
tree | 6a9a473f7865779bf4a5cf3036711f0356ebae75 /Documentation/acpi | |
parent | 687b81d083c082bc1e853032e3a2a54f8c251d27 (diff) |
i2c: move ACPI helpers into the core
This follows what has already been done for the DeviceTree helpers. Move
the ACPI helpers from drivers/acpi/acpi_i2c.c to the I2C core and update
documentation accordingly.
This also solves a problem reported by Jerry Snitselaar that we can't build
the ACPI I2C helpers as a module.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'Documentation/acpi')
-rw-r--r-- | Documentation/acpi/enumeration.txt | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index 958266efcc20..d977778b5e67 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt | |||
@@ -228,18 +228,9 @@ ACPI handle like: | |||
228 | I2C serial bus support | 228 | I2C serial bus support |
229 | ~~~~~~~~~~~~~~~~~~~~~~ | 229 | ~~~~~~~~~~~~~~~~~~~~~~ |
230 | The slaves behind I2C bus controller only need to add the ACPI IDs like | 230 | The slaves behind I2C bus controller only need to add the ACPI IDs like |
231 | with the platform and SPI drivers. However the I2C bus controller driver | 231 | with the platform and SPI drivers. The I2C core automatically enumerates |
232 | needs to call acpi_i2c_register_devices() after it has added the adapter. | 232 | any slave devices behind the controller device once the adapter is |
233 | 233 | registered. | |
234 | An I2C bus (controller) driver does: | ||
235 | |||
236 | ... | ||
237 | ret = i2c_add_numbered_adapter(adapter); | ||
238 | if (ret) | ||
239 | /* handle error */ | ||
240 | |||
241 | /* Enumerate the slave devices behind this bus via ACPI */ | ||
242 | acpi_i2c_register_devices(adapter); | ||
243 | 234 | ||
244 | Below is an example of how to add ACPI support to the existing mpu3050 | 235 | Below is an example of how to add ACPI support to the existing mpu3050 |
245 | input driver: | 236 | input driver: |