diff options
author | Pedro Perez de Heredia <pedro.perez@digi.com> | 2012-02-05 14:06:32 +0100 |
---|---|---|
committer | Pedro Perez de Heredia <pedro.perez@digi.com> | 2012-02-05 14:06:32 +0100 |
commit | 0e01b35db88924d161cf6652d5f21d2d612addd4 (patch) | |
tree | 191c810cd830de2c19ce6161a2209c542e58f810 | |
parent | 0796dca2807079d6672a8e864d10d7ab5ac6b4eb (diff) |
ccxmx53: add pmic gpio support to reset wifi (#41841)
This commit enables the support for the gpios of the da9053.
This allows to manupulate that gpios (for instance in the
wireless drivers, where the wifi power enable comes from a
pmic gpio).
Not doing a power cycling on the redpine module was causing
some detection issues on some ccwmx53 modules.
Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
-rw-r--r-- | arch/arm/configs/imx5_ccwmx53js_defconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-ccwmx53.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx53_ccwmx53js_pmic_da9053.c | 3 | ||||
-rw-r--r-- | drivers/mfd/da9052-core.c | 5 | ||||
-rw-r--r-- | include/linux/mfd/da9052/gpio.h | 17 |
5 files changed, 23 insertions, 14 deletions
diff --git a/arch/arm/configs/imx5_ccwmx53js_defconfig b/arch/arm/configs/imx5_ccwmx53js_defconfig index e556d4d7a6f7..b592da7f61bb 100644 --- a/arch/arm/configs/imx5_ccwmx53js_defconfig +++ b/arch/arm/configs/imx5_ccwmx53js_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.35 -# Wed Jan 18 18:49:44 2012 +# Linux kernel version: 2.6.35.14 +# Sun Feb 5 14:05:52 2012 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -1107,7 +1107,7 @@ CONFIG_GPIO_SYSFS=y # # MODULbus GPIO expanders: # -# CONFIG_DA9052_GPIO_ENABLE is not set +CONFIG_DA9052_GPIO_ENABLE=y # CONFIG_GENERIC_PWM is not set # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set @@ -2138,6 +2138,7 @@ CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_PCOMP=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_TESTS=y # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set CONFIG_CRYPTO_WORKQUEUE=y diff --git a/arch/arm/mach-mx5/board-ccwmx53.h b/arch/arm/mach-mx5/board-ccwmx53.h index 89d894299403..53dc834b79d0 100644 --- a/arch/arm/mach-mx5/board-ccwmx53.h +++ b/arch/arm/mach-mx5/board-ccwmx53.h @@ -70,6 +70,11 @@ #define USER_KEY2_PAD MX53_PAD_GPIO_11__GPIO4_1 #define USER_KEY2_GPIO MX53_GPIO(4, 1) /* GPIO_4_1 */ +#define GPIO_PMIC_START (7 * 32) +#define WLAN_POWER_EN_GPIO (GPIO_PMIC_START + 10) +#define ETH0_RESET_GPIO (GPIO_PMIC_START + 11) +#define EXT_ETH_RESET_GPIO (GPIO_PMIC_START + 12) + /* Second touch settings */ void ccwmx53_init_2nd_touch(void); void gpio_wireless_active(void); diff --git a/arch/arm/mach-mx5/mx53_ccwmx53js_pmic_da9053.c b/arch/arm/mach-mx5/mx53_ccwmx53js_pmic_da9053.c index 11ee82be7a7a..4295eed8806d 100644 --- a/arch/arm/mach-mx5/mx53_ccwmx53js_pmic_da9053.c +++ b/arch/arm/mach-mx5/mx53_ccwmx53js_pmic_da9053.c @@ -249,10 +249,9 @@ static struct da9052_platform_data __initdata da9052_plat = { .led_data = &da9052_gpio_leds, .tsi_data = &da9052_tsi, .bat_data = &da9052_bat, - /* .gpio_base = GPIO_BOARD_START, */ + .gpio_base = GPIO_PMIC_START, }; - static struct i2c_board_info __initdata da9052_i2c_device = { I2C_BOARD_INFO(DA9052_SSC_I2C_DEVICE_NAME, DA9052_I2C_ADDR >> 1), .irq = gpio_to_irq(CCWMX53_DA9052_IRQ_GPIO), diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c index e24da112e728..7f0873068dc9 100644 --- a/drivers/mfd/da9052-core.c +++ b/drivers/mfd/da9052-core.c @@ -449,6 +449,11 @@ static int add_da9052_devices(struct da9052 *da9052) if (ret) return ret; + ret = da9052_add_subdevice_pdata(da9052, "da9052-gpio", + pdata, sizeof(struct da9052_platform_data)); + if (ret) + return ret; + return ret; } diff --git a/include/linux/mfd/da9052/gpio.h b/include/linux/mfd/da9052/gpio.h index 68a24ad9d828..8a7c8eb20c19 100644 --- a/include/linux/mfd/da9052/gpio.h +++ b/include/linux/mfd/da9052/gpio.h @@ -50,16 +50,15 @@ #define DA9052_GPIO_PIN_6 DA9052_GPIO_CONFIG_TSI #define DA9052_GPIO_PIN_7 DA9052_GPIO_CONFIG_TSI -#define DA9052_GPIO_PIN_8 DA9052_GPIO_CONFIG -#define DA9052_GPIO_PIN_9 DA9052_GPIO_CONFIG -#define DA9052_GPIO_PIN_10 DA9052_GPIO_CONFIG -#define DA9052_GPIO_PIN_11 DA9052_GPIO_CONFIG +#define DA9052_GPIO_PIN_8 0 +#define DA9052_GPIO_PIN_9 0 +#define DA9052_GPIO_PIN_10 0 +#define DA9052_GPIO_PIN_11 0 +#define DA9052_GPIO_PIN_12 0 +#define DA9052_GPIO_PIN_13 0 +#define DA9052_GPIO_PIN_14 0 +#define DA9052_GPIO_PIN_15 0 -#define DA9052_GPIO_PIN_12 DA9052_GPIO_CONFIG -#define DA9052_GPIO_PIN_13 DA9052_GPIO_CONFIG - -#define DA9052_GPIO_PIN_14 DA9052_GPIO_CONFIG -#define DA9052_GPIO_PIN_15 DA9052_GPIO_CONFIG enum ip_op_type { ALTERNATE_FUNCTIONALITY = 0, |