diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-21 17:07:44 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-21 17:07:44 -0400 |
| commit | 29fdd5ba6297f865046e3793481be4979f75d85a (patch) | |
| tree | 2c94f76f4b6f6ab683257e8e7c9480a85d6c3942 | |
| parent | d1433d55c75652e7af76b32188a1b5f8af654ab3 (diff) | |
| parent | 4560d67722816cca4b2f3dfb1d7c5b902fd2075b (diff) | |
Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"Here is the fixup for the 'lowlight' of my last pull request. I2C is
not selected anymore by I2C_ACPI. Instead, the code in question now
depends on I2C=y.
Also, Mika has agreed to support me and be the maintainer for I2C-ACPI
related patches. Finally, a new-ID-patch came along last week"
* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
MAINTAINERS: add maintainer for ACPI parts of I2C
i2c: i801: Add PCI ID for Intel Braswell
i2c: rework kernel config I2C_ACPI
| -rw-r--r-- | MAINTAINERS | 7 | ||||
| -rw-r--r-- | drivers/i2c/Kconfig | 15 | ||||
| -rw-r--r-- | drivers/i2c/Makefile | 2 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/i2c-acpi.c | 2 | ||||
| -rw-r--r-- | include/linux/i2c.h | 12 |
6 files changed, 26 insertions, 14 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 05dc39d66920..cb78ab59610d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -4446,6 +4446,13 @@ F: include/linux/i2c-*.h | |||
| 4446 | F: include/uapi/linux/i2c.h | 4446 | F: include/uapi/linux/i2c.h |
| 4447 | F: include/uapi/linux/i2c-*.h | 4447 | F: include/uapi/linux/i2c-*.h |
| 4448 | 4448 | ||
| 4449 | I2C ACPI SUPPORT | ||
| 4450 | M: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
| 4451 | L: linux-i2c@vger.kernel.org | ||
| 4452 | L: linux-acpi@vger.kernel.org | ||
| 4453 | S: Maintained | ||
| 4454 | F: drivers/i2c/i2c-acpi.c | ||
| 4455 | |||
| 4449 | I2C-TAOS-EVM DRIVER | 4456 | I2C-TAOS-EVM DRIVER |
| 4450 | M: Jean Delvare <jdelvare@suse.de> | 4457 | M: Jean Delvare <jdelvare@suse.de> |
| 4451 | L: linux-i2c@vger.kernel.org | 4458 | L: linux-i2c@vger.kernel.org |
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 3e3b680dc007..b51a402752c4 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig | |||
| @@ -23,17 +23,14 @@ config I2C | |||
| 23 | This I2C support can also be built as a module. If so, the module | 23 | This I2C support can also be built as a module. If so, the module |
| 24 | will be called i2c-core. | 24 | will be called i2c-core. |
| 25 | 25 | ||
| 26 | config I2C_ACPI | 26 | config ACPI_I2C_OPREGION |
| 27 | bool "I2C ACPI support" | 27 | bool "ACPI I2C Operation region support" |
| 28 | select I2C | 28 | depends on I2C=y && ACPI |
| 29 | depends on ACPI | ||
| 30 | default y | 29 | default y |
| 31 | help | 30 | help |
| 32 | Say Y here if you want to enable ACPI I2C support. This includes support | 31 | Say Y here if you want to enable ACPI I2C operation region support. |
| 33 | for automatic enumeration of I2C slave devices and support for ACPI I2C | 32 | Operation Regions allow firmware (BIOS) code to access I2C slave devices, |
| 34 | Operation Regions. Operation Regions allow firmware (BIOS) code to | 33 | such as smart batteries through an I2C host controller driver. |
| 35 | access I2C slave devices, such as smart batteries through an I2C host | ||
| 36 | controller driver. | ||
| 37 | 34 | ||
| 38 | if I2C | 35 | if I2C |
| 39 | 36 | ||
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index a1f590cbb435..e0228b228256 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | i2ccore-y := i2c-core.o | 5 | i2ccore-y := i2c-core.o |
| 6 | i2ccore-$(CONFIG_I2C_ACPI) += i2c-acpi.o | 6 | i2ccore-$(CONFIG_ACPI) += i2c-acpi.o |
| 7 | 7 | ||
| 8 | obj-$(CONFIG_I2C_BOARDINFO) += i2c-boardinfo.o | 8 | obj-$(CONFIG_I2C_BOARDINFO) += i2c-boardinfo.o |
| 9 | obj-$(CONFIG_I2C) += i2ccore.o | 9 | obj-$(CONFIG_I2C) += i2ccore.o |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 2994690b26e9..10467a327749 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
| @@ -164,6 +164,7 @@ | |||
| 164 | 164 | ||
| 165 | /* Older devices have their ID defined in <linux/pci_ids.h> */ | 165 | /* Older devices have their ID defined in <linux/pci_ids.h> */ |
| 166 | #define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12 | 166 | #define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12 |
| 167 | #define PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS 0x2292 | ||
| 167 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 | 168 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 |
| 168 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 | 169 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 |
| 169 | /* Patsburg also has three 'Integrated Device Function' SMBus controllers */ | 170 | /* Patsburg also has three 'Integrated Device Function' SMBus controllers */ |
| @@ -828,6 +829,7 @@ static const struct pci_device_id i801_ids[] = { | |||
| 828 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_SMBUS) }, | 829 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_SMBUS) }, |
| 829 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS) }, | 830 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS) }, |
| 830 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS) }, | 831 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS) }, |
| 832 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) }, | ||
| 831 | { 0, } | 833 | { 0, } |
| 832 | }; | 834 | }; |
| 833 | 835 | ||
diff --git a/drivers/i2c/i2c-acpi.c b/drivers/i2c/i2c-acpi.c index e8b61967334b..0dbc18c15c43 100644 --- a/drivers/i2c/i2c-acpi.c +++ b/drivers/i2c/i2c-acpi.c | |||
| @@ -126,6 +126,7 @@ void acpi_i2c_register_devices(struct i2c_adapter *adap) | |||
| 126 | dev_warn(&adap->dev, "failed to enumerate I2C slaves\n"); | 126 | dev_warn(&adap->dev, "failed to enumerate I2C slaves\n"); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | #ifdef CONFIG_ACPI_I2C_OPREGION | ||
| 129 | static int acpi_gsb_i2c_read_bytes(struct i2c_client *client, | 130 | static int acpi_gsb_i2c_read_bytes(struct i2c_client *client, |
| 130 | u8 cmd, u8 *data, u8 data_len) | 131 | u8 cmd, u8 *data, u8 data_len) |
| 131 | { | 132 | { |
| @@ -360,3 +361,4 @@ void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter) | |||
| 360 | 361 | ||
| 361 | acpi_bus_detach_private_data(handle); | 362 | acpi_bus_detach_private_data(handle); |
| 362 | } | 363 | } |
| 364 | #endif | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index ea507665896c..a95efeb53a8b 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -577,16 +577,20 @@ static inline struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node | |||
| 577 | } | 577 | } |
| 578 | #endif /* CONFIG_OF */ | 578 | #endif /* CONFIG_OF */ |
| 579 | 579 | ||
| 580 | #ifdef CONFIG_I2C_ACPI | 580 | #ifdef CONFIG_ACPI |
| 581 | int acpi_i2c_install_space_handler(struct i2c_adapter *adapter); | ||
| 582 | void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter); | ||
| 583 | void acpi_i2c_register_devices(struct i2c_adapter *adap); | 581 | void acpi_i2c_register_devices(struct i2c_adapter *adap); |
| 584 | #else | 582 | #else |
| 585 | static inline void acpi_i2c_register_devices(struct i2c_adapter *adap) { } | 583 | static inline void acpi_i2c_register_devices(struct i2c_adapter *adap) { } |
| 584 | #endif /* CONFIG_ACPI */ | ||
| 585 | |||
| 586 | #ifdef CONFIG_ACPI_I2C_OPREGION | ||
| 587 | int acpi_i2c_install_space_handler(struct i2c_adapter *adapter); | ||
| 588 | void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter); | ||
| 589 | #else | ||
| 586 | static inline void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter) | 590 | static inline void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter) |
| 587 | { } | 591 | { } |
| 588 | static inline int acpi_i2c_install_space_handler(struct i2c_adapter *adapter) | 592 | static inline int acpi_i2c_install_space_handler(struct i2c_adapter *adapter) |
| 589 | { return 0; } | 593 | { return 0; } |
| 590 | #endif | 594 | #endif /* CONFIG_ACPI_I2C_OPREGION */ |
| 591 | 595 | ||
| 592 | #endif /* _LINUX_I2C_H */ | 596 | #endif /* _LINUX_I2C_H */ |
