i2c-i801: Simplify dependency towards GPIOLIB
Arbitrarily selecting GPIOLIB causes trouble on some architectures, so don't do that. Instead, just make the optional multiplexing code depend on CONFIG_I2C_MUX_GPIO instead of CONFIG_I2C_MUX for now. We can revisit if the i2c-i801 driver ever supports other multiplexing flavors. Also make that optional code depend on DMI, as it won't do anything without that. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Fengguang Wu <fengguang.wu@intel.com>
This commit is contained in:
parent
31d178bffc
commit
79e3e5b894
|
@ -81,7 +81,6 @@ config I2C_I801
|
|||
tristate "Intel 82801 (ICH/PCH)"
|
||||
depends on PCI
|
||||
select CHECK_SIGNATURE if X86 && DMI
|
||||
select GPIOLIB if I2C_MUX
|
||||
help
|
||||
If you say yes to this option, support will be included for the Intel
|
||||
801 family of mainboard I2C interfaces. Specifically, the following
|
||||
|
|
|
@ -82,7 +82,8 @@
|
|||
#include <linux/wait.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
#if defined CONFIG_I2C_MUX || defined CONFIG_I2C_MUX_MODULE
|
||||
#if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \
|
||||
defined CONFIG_DMI
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/i2c-mux-gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
@ -192,7 +193,8 @@ struct i801_priv {
|
|||
int len;
|
||||
u8 *data;
|
||||
|
||||
#if defined CONFIG_I2C_MUX || defined CONFIG_I2C_MUX_MODULE
|
||||
#if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \
|
||||
defined CONFIG_DMI
|
||||
const struct i801_mux_config *mux_drvdata;
|
||||
struct platform_device *mux_pdev;
|
||||
#endif
|
||||
|
@ -921,7 +923,8 @@ static void __init input_apanel_init(void) {}
|
|||
static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) {}
|
||||
#endif /* CONFIG_X86 && CONFIG_DMI */
|
||||
|
||||
#if defined CONFIG_I2C_MUX || defined CONFIG_I2C_MUX_MODULE
|
||||
#if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \
|
||||
defined CONFIG_DMI
|
||||
static struct i801_mux_config i801_mux_config_asus_z8_d12 = {
|
||||
.gpio_chip = "gpio_ich",
|
||||
.values = { 0x02, 0x03 },
|
||||
|
|
Loading…
Reference in New Issue
Block a user