From 67a163c0ebb4d17c80461abbb69eb88c788a3d7a Mon Sep 17 00:00:00 2001 From: Hemant Gupta Date: Tue, 11 Oct 2011 16:52:33 +0530 Subject: cg2900: Use Dynamic Machine configuration. This patch adds dynamic selection of machine configuration and merges the board and device configuration files. ST-Ericsson ID: 365671 ST-Ericcson FOSS-OUT-ID: Trivial ST-Ericsson Linux next: 365671 Change-Id: I58601115bb8234ab203ac8cd37711563eceb4d17 Signed-off-by: Hemant Gupta Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33130 Reviewed-by: QABUILD Reviewed-by: Par-Gunnar HJALMDAHL Reviewed-by: Jonas ABERG --- drivers/staging/cg2900/Makefile | 12 +- drivers/staging/cg2900/board-mop500-cg2900.c | 281 ---------------------- drivers/staging/cg2900/board-u5500-cg2900.c | 154 ------------ drivers/staging/cg2900/board-ux500-cg2900.c | 331 ++++++++++++++++++++++++++ drivers/staging/cg2900/devices-cg2900-u5500.c | 64 ----- drivers/staging/cg2900/devices-cg2900-u8500.c | 179 -------------- drivers/staging/cg2900/devices-cg2900-ux500.c | 219 +++++++++++++++++ drivers/staging/cg2900/devices-cg2900.c | 30 ++- drivers/staging/cg2900/devices-cg2900.h | 6 +- 9 files changed, 573 insertions(+), 703 deletions(-) delete mode 100644 drivers/staging/cg2900/board-mop500-cg2900.c delete mode 100644 drivers/staging/cg2900/board-u5500-cg2900.c create mode 100644 drivers/staging/cg2900/board-ux500-cg2900.c delete mode 100644 drivers/staging/cg2900/devices-cg2900-u5500.c delete mode 100644 drivers/staging/cg2900/devices-cg2900-u8500.c create mode 100644 drivers/staging/cg2900/devices-cg2900-ux500.c diff --git a/drivers/staging/cg2900/Makefile b/drivers/staging/cg2900/Makefile index d68b9ae9991..14e2847bacf 100644 --- a/drivers/staging/cg2900/Makefile +++ b/drivers/staging/cg2900/Makefile @@ -7,15 +7,9 @@ ccflags-y := \ -Iarch/arm/mach-ux500 obj-$(CONFIG_CG2900) += devices-cg2900.o \ - devices-cg2900-u5500.o devices-cg2900-u8500.o \ - clock-cg2900.o - -ifeq ($(CONFIG_UX500_SOC_DB8500), y) -obj-$(CONFIG_CG2900) += board-mop500-cg2900.o -endif -ifeq ($(CONFIG_UX500_SOC_DB5500), y) -obj-$(CONFIG_CG2900) += board-u5500-cg2900.o -endif + devices-cg2900-ux500.o \ + board-ux500-cg2900.o \ + clock-cg2900.o obj-y += mfd/ obj-y += bluetooth/ diff --git a/drivers/staging/cg2900/board-mop500-cg2900.c b/drivers/staging/cg2900/board-mop500-cg2900.c deleted file mode 100644 index 5f40941a5f1..00000000000 --- a/drivers/staging/cg2900/board-mop500-cg2900.c +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (C) 2008-2011 ST-Ericsson - * - * Author: Par-Gunnar Hjalmdahl - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, as - * published by the Free Software Foundation. - * - */ - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "cg2900.h" -#include "devices-cg2900.h" -#include "pins-db8500.h" -#include "pins.h" -#include "board-mop500.h" - -#define CG2900_BT_ENABLE_GPIO 170 -#define CG2900_GBF_ENA_RESET_GPIO 171 -#define WLAN_PMU_EN_GPIO 226 -#define WLAN_PMU_EN_GPIO_U9500 AB8500_PIN_GPIO11 -#define CG2900_BT_CTS_GPIO 0 - -enum cg2900_gpio_pull_sleep cg2900_sleep_gpio[21] = { - CG2900_NO_PULL, /* GPIO 0: PTA_CONFX */ - CG2900_PULL_DN, /* GPIO 1: PTA_STATUS */ - CG2900_NO_PULL, /* GPIO 2: UART_CTSN */ - CG2900_PULL_UP, /* GPIO 3: UART_RTSN */ - CG2900_PULL_UP, /* GPIO 4: UART_TXD */ - CG2900_NO_PULL, /* GPIO 5: UART_RXD */ - CG2900_PULL_DN, /* GPIO 6: IOM_DOUT */ - CG2900_NO_PULL, /* GPIO 7: IOM_FSC */ - CG2900_NO_PULL, /* GPIO 8: IOM_CLK */ - CG2900_NO_PULL, /* GPIO 9: IOM_DIN */ - CG2900_PULL_DN, /* GPIO 10: PWR_REQ */ - CG2900_PULL_DN, /* GPIO 11: HOST_WAKEUP */ - CG2900_PULL_DN, /* GPIO 12: IIS_DOUT */ - CG2900_NO_PULL, /* GPIO 13: IIS_WS */ - CG2900_NO_PULL, /* GPIO 14: IIS_CLK */ - CG2900_NO_PULL, /* GPIO 15: IIS_DIN */ - CG2900_PULL_DN, /* GPIO 16: PTA_FREQ */ - CG2900_PULL_DN, /* GPIO 17: PTA_RF_ACTIVE */ - CG2900_NO_PULL, /* GPIO 18: NotConnected (J6428) */ - CG2900_NO_PULL, /* GPIO 19: EXT_DUTY_CYCLE */ - CG2900_NO_PULL, /* GPIO 20: EXT_FRM_SYNCH */ -}; - -static struct platform_device ux500_cg2900_device = { - .name = "cg2900", -}; - -static struct platform_device ux500_cg2900_chip_device = { - .name = "cg2900-chip", - .dev = { - .parent = &ux500_cg2900_device.dev, - }, -}; - -static struct platform_device ux500_stlc2690_chip_device = { - .name = "stlc2690-chip", - .dev = { - .parent = &ux500_cg2900_device.dev, - }, -}; - -static struct cg2900_platform_data cg2900_test_platform_data = { - .bus = HCI_VIRTUAL, - .gpio_sleep = cg2900_sleep_gpio, -}; - -static struct platform_device ux500_cg2900_test_device = { - .name = "cg2900-test", - .dev = { - .parent = &ux500_cg2900_device.dev, - .platform_data = &cg2900_test_platform_data, - }, -}; - -static struct resource cg2900_uart_resources_pre_v60[] = { - { - .start = CG2900_GBF_ENA_RESET_GPIO, - .end = CG2900_GBF_ENA_RESET_GPIO, - .flags = IORESOURCE_IO, - .name = "gbf_ena_reset", - }, - { - .start = CG2900_BT_ENABLE_GPIO, - .end = CG2900_BT_ENABLE_GPIO, - .flags = IORESOURCE_IO, - .name = "bt_enable", - }, - { - .start = CG2900_BT_CTS_GPIO, - .end = CG2900_BT_CTS_GPIO, - .flags = IORESOURCE_IO, - .name = "cts_gpio", - }, - { - .start = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .end = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .flags = IORESOURCE_IRQ, - .name = "cts_irq", - }, -}; - -static struct resource cg2900_uart_resources[] = { - { - .start = CG2900_GBF_ENA_RESET_GPIO, - .end = CG2900_GBF_ENA_RESET_GPIO, - .flags = IORESOURCE_IO, - .name = "gbf_ena_reset", - }, - { - .start = WLAN_PMU_EN_GPIO, - .end = WLAN_PMU_EN_GPIO, - .flags = IORESOURCE_IO, - .name = "pmu_en", - }, - { - .start = CG2900_BT_CTS_GPIO, - .end = CG2900_BT_CTS_GPIO, - .flags = IORESOURCE_IO, - .name = "cts_gpio", - }, - { - .start = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .end = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .flags = IORESOURCE_IRQ, - .name = "cts_irq", - }, -}; - -static struct resource cg2900_uart_resources_u9500[] = { - { - .start = CG2900_GBF_ENA_RESET_GPIO, - .end = CG2900_GBF_ENA_RESET_GPIO, - .flags = IORESOURCE_IO, - .name = "gbf_ena_reset", - }, - { - .start = WLAN_PMU_EN_GPIO_U9500, - .end = WLAN_PMU_EN_GPIO_U9500, - .flags = IORESOURCE_IO, - .name = "pmu_en", - }, - { - .start = CG2900_BT_CTS_GPIO, - .end = CG2900_BT_CTS_GPIO, - .flags = IORESOURCE_IO, - .name = "cts_gpio", - }, - { - .start = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .end = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .flags = IORESOURCE_IRQ, - .name = "cts_irq", - }, -}; - -static pin_cfg_t cg2900_uart_enabled[] = { - GPIO0_U0_CTSn | PIN_INPUT_PULLUP, - GPIO1_U0_RTSn | PIN_OUTPUT_HIGH, - GPIO2_U0_RXD | PIN_INPUT_PULLUP, - GPIO3_U0_TXD | PIN_OUTPUT_HIGH -}; - -static pin_cfg_t cg2900_uart_disabled[] = { - GPIO0_GPIO | PIN_INPUT_PULLUP, /* CTS pull up. */ - GPIO1_GPIO | PIN_OUTPUT_HIGH, /* RTS high-flow off. */ - GPIO2_GPIO | PIN_INPUT_PULLUP, /* RX pull down. */ - GPIO3_GPIO | PIN_OUTPUT_LOW /* TX low - break on. */ -}; - -static struct cg2900_platform_data cg2900_uart_platform_data = { - .bus = HCI_UART, - .gpio_sleep = cg2900_sleep_gpio, - .uart = { - .n_uart_gpios = 4, - .uart_enabled = cg2900_uart_enabled, - .uart_disabled = cg2900_uart_disabled, - }, - .regulator_id = "vdd", -}; - -static struct platform_device ux500_cg2900_uart_device = { - .name = "cg2900-uart", - .dev = { - .platform_data = &cg2900_uart_platform_data, - .parent = &ux500_cg2900_device.dev, - }, -}; - -static bool mach_supported(void) -{ - if (machine_is_u8500() || - machine_is_u5500() || - machine_is_hrefv60() || - machine_is_nomadik() || - machine_is_snowball()) - return true; - - return false; -} - -static int __init board_cg2900_init(void) -{ - int err; - - if (!mach_supported()) - return 0; - - dcg2900_init_platdata(&cg2900_test_platform_data); - dcg2900_init_platdata(&cg2900_uart_platform_data); - - if (pins_for_u9500()) { - ux500_cg2900_uart_device.num_resources = - ARRAY_SIZE(cg2900_uart_resources_u9500); - ux500_cg2900_uart_device.resource = - cg2900_uart_resources_u9500; - } else if (machine_is_hrefv60()) { - ux500_cg2900_uart_device.num_resources = - ARRAY_SIZE(cg2900_uart_resources); - ux500_cg2900_uart_device.resource = - cg2900_uart_resources; - } else { - ux500_cg2900_uart_device.num_resources = - ARRAY_SIZE(cg2900_uart_resources_pre_v60); - ux500_cg2900_uart_device.resource = - cg2900_uart_resources_pre_v60; - } - - err = platform_device_register(&ux500_cg2900_device); - if (err) - return err; - err = platform_device_register(&ux500_cg2900_uart_device); - if (err) - return err; - err = platform_device_register(&ux500_cg2900_test_device); - if (err) - return err; - err = platform_device_register(&ux500_cg2900_chip_device); - if (err) - return err; - err = platform_device_register(&ux500_stlc2690_chip_device); - if (err) - return err; - - dev_info(&ux500_cg2900_device.dev, "CG2900 initialized\n"); - return 0; -} - -static void __exit board_cg2900_exit(void) -{ - if (!mach_supported()) - return; - - platform_device_unregister(&ux500_stlc2690_chip_device); - platform_device_unregister(&ux500_cg2900_chip_device); - platform_device_unregister(&ux500_cg2900_test_device); - platform_device_unregister(&ux500_cg2900_uart_device); - platform_device_unregister(&ux500_cg2900_device); - - dev_info(&ux500_cg2900_device.dev, "CG2900 removed\n"); -} - -module_init(board_cg2900_init); -module_exit(board_cg2900_exit); diff --git a/drivers/staging/cg2900/board-u5500-cg2900.c b/drivers/staging/cg2900/board-u5500-cg2900.c deleted file mode 100644 index d6ca7b4c858..00000000000 --- a/drivers/staging/cg2900/board-u5500-cg2900.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (C) ST-Ericsson SA 2011 - * - * License terms: GNU General Public License (GPL) version 2 - */ - -#include -#include -#include - -#include -#include - -#include - -#include "devices-cg2900.h" -#include "pins-db5500.h" - -#define CG2900_BT_CTS_GPIO 168 - -enum cg2900_gpio_pull_sleep cg2900_u5500_sleep_gpio[21] = { - CG2900_NO_PULL, /* GPIO 0: PTA_CONFX */ - CG2900_PULL_DN, /* GPIO 1: PTA_STATUS */ - CG2900_NO_PULL, /* GPIO 2: UART_CTSN */ - CG2900_PULL_UP, /* GPIO 3: UART_RTSN */ - CG2900_PULL_UP, /* GPIO 4: UART_TXD */ - CG2900_NO_PULL, /* GPIO 5: UART_RXD */ - CG2900_PULL_DN, /* GPIO 6: IOM_DOUT */ - CG2900_NO_PULL, /* GPIO 7: IOM_FSC */ - CG2900_NO_PULL, /* GPIO 8: IOM_CLK */ - CG2900_NO_PULL, /* GPIO 9: IOM_DIN */ - CG2900_PULL_DN, /* GPIO 10: PWR_REQ */ - CG2900_PULL_DN, /* GPIO 11: HOST_WAKEUP */ - CG2900_PULL_DN, /* GPIO 12: IIS_DOUT */ - CG2900_NO_PULL, /* GPIO 13: IIS_WS */ - CG2900_NO_PULL, /* GPIO 14: IIS_CLK */ - CG2900_NO_PULL, /* GPIO 15: IIS_DIN */ - CG2900_PULL_DN, /* GPIO 16: PTA_FREQ */ - CG2900_PULL_DN, /* GPIO 17: PTA_RF_ACTIVE */ - CG2900_NO_PULL, /* GPIO 18: NotConnected (J6428) */ - CG2900_NO_PULL, /* GPIO 19: EXT_DUTY_CYCLE */ - CG2900_NO_PULL, /* GPIO 20: EXT_FRM_SYNCH */ -}; - -static struct platform_device ux500_cg2900_device = { - .name = "cg2900", -}; - -static struct platform_device ux500_cg2900_chip_device = { - .name = "cg2900-chip", - .dev = { - .parent = &ux500_cg2900_device.dev, - }, -}; - -static struct cg2900_platform_data cg2900_test_platform_data = { - .bus = HCI_VIRTUAL, - .gpio_sleep = cg2900_u5500_sleep_gpio, -}; - -static struct platform_device ux500_cg2900_test_device = { - .name = "cg2900-test", - .dev = { - .parent = &ux500_cg2900_device.dev, - .platform_data = &cg2900_test_platform_data, - }, -}; - -static struct resource cg2900_uart_resources[] = { - { - .start = CG2900_BT_CTS_GPIO, - .end = CG2900_BT_CTS_GPIO, - .flags = IORESOURCE_IO, - .name = "cts_gpio", - }, - { - .start = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .end = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), - .flags = IORESOURCE_IRQ, - .name = "cts_irq", - }, -}; - -static pin_cfg_t cg2900_uart_enabled[] = { - GPIO165_U3_RXD | PIN_INPUT_PULLUP, - GPIO166_U3_TXD | PIN_OUTPUT_HIGH, - GPIO167_U3_RTSn | PIN_OUTPUT_HIGH, - GPIO168_U3_CTSn | PIN_INPUT_PULLUP, -}; - -static pin_cfg_t cg2900_uart_disabled[] = { - GPIO165_GPIO | PIN_INPUT_PULLUP, /* RX pull down. */ - GPIO166_GPIO | PIN_OUTPUT_LOW, /* TX low - break on. */ - GPIO167_GPIO | PIN_OUTPUT_HIGH, /* RTS high-flow off. */ - GPIO168_GPIO | PIN_INPUT_PULLUP, /* CTS pull up. */ -}; - -static struct cg2900_platform_data cg2900_uart_platform_data = { - .bus = HCI_UART, - .gpio_sleep = cg2900_u5500_sleep_gpio, - .uart = { - .n_uart_gpios = 4, - .uart_enabled = cg2900_uart_enabled, - .uart_disabled = cg2900_uart_disabled, - }, -}; - -static struct platform_device ux500_cg2900_uart_device = { - .name = "cg2900-uart", - .dev = { - .platform_data = &cg2900_uart_platform_data, - .parent = &ux500_cg2900_device.dev, - }, - .num_resources = ARRAY_SIZE(cg2900_uart_resources), - .resource = cg2900_uart_resources, -}; - -static int __init u5500_cg2900_init(void) -{ - int err; - - dcg2900_init_platdata(&cg2900_test_platform_data); - dcg2900_init_platdata(&cg2900_uart_platform_data); - - err = platform_device_register(&ux500_cg2900_device); - if (err) - return err; - err = platform_device_register(&ux500_cg2900_uart_device); - if (err) - return err; - err = platform_device_register(&ux500_cg2900_test_device); - if (err) - return err; - err = platform_device_register(&ux500_cg2900_chip_device); - if (err) - return err; - - dev_info(&ux500_cg2900_device.dev, "CG2900 initialized\n"); - - return 0; -} - -static void __exit u5500_cg2900_exit(void) -{ - platform_device_unregister(&ux500_cg2900_chip_device); - platform_device_unregister(&ux500_cg2900_test_device); - platform_device_unregister(&ux500_cg2900_uart_device); - platform_device_unregister(&ux500_cg2900_device); - - dev_info(&ux500_cg2900_device.dev, "CG2900 removed\n"); -} - -module_init(u5500_cg2900_init); -module_exit(u5500_cg2900_exit); diff --git a/drivers/staging/cg2900/board-ux500-cg2900.c b/drivers/staging/cg2900/board-ux500-cg2900.c new file mode 100644 index 00000000000..bd81f68fdc6 --- /dev/null +++ b/drivers/staging/cg2900/board-ux500-cg2900.c @@ -0,0 +1,331 @@ +/* + * Copyright (C) ST-Ericsson SA 2011 + * + * Author: Par-Gunnar Hjalmdahl + * Author: Hemant Gupta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "board-mop500.h" +#include "cg2900.h" +#include "devices-cg2900.h" +#include "pins-db5500.h" +#include "pins-db8500.h" +#include "pins.h" + +#define CG2900_BT_ENABLE_GPIO 170 +#define CG2900_GBF_ENA_RESET_GPIO 171 +#define WLAN_PMU_EN_GPIO 226 +#define WLAN_PMU_EN_GPIO_U9500 AB8500_PIN_GPIO11 +#define CG2900_UX500_BT_CTS_GPIO 0 +#define CG2900_U5500_BT_CTS_GPIO 168 + +enum cg2900_gpio_pull_sleep ux500_cg2900_sleep_gpio[21] = { + CG2900_NO_PULL, /* GPIO 0: PTA_CONFX */ + CG2900_PULL_DN, /* GPIO 1: PTA_STATUS */ + CG2900_NO_PULL, /* GPIO 2: UART_CTSN */ + CG2900_PULL_UP, /* GPIO 3: UART_RTSN */ + CG2900_PULL_UP, /* GPIO 4: UART_TXD */ + CG2900_NO_PULL, /* GPIO 5: UART_RXD */ + CG2900_PULL_DN, /* GPIO 6: IOM_DOUT */ + CG2900_NO_PULL, /* GPIO 7: IOM_FSC */ + CG2900_NO_PULL, /* GPIO 8: IOM_CLK */ + CG2900_NO_PULL, /* GPIO 9: IOM_DIN */ + CG2900_PULL_DN, /* GPIO 10: PWR_REQ */ + CG2900_PULL_DN, /* GPIO 11: HOST_WAKEUP */ + CG2900_PULL_DN, /* GPIO 12: IIS_DOUT */ + CG2900_NO_PULL, /* GPIO 13: IIS_WS */ + CG2900_NO_PULL, /* GPIO 14: IIS_CLK */ + CG2900_NO_PULL, /* GPIO 15: IIS_DIN */ + CG2900_PULL_DN, /* GPIO 16: PTA_FREQ */ + CG2900_PULL_DN, /* GPIO 17: PTA_RF_ACTIVE */ + CG2900_NO_PULL, /* GPIO 18: NotConnected (J6428) */ + CG2900_NO_PULL, /* GPIO 19: EXT_DUTY_CYCLE */ + CG2900_NO_PULL, /* GPIO 20: EXT_FRM_SYNCH */ +}; + +static struct platform_device ux500_cg2900_device = { + .name = "cg2900", +}; + +static struct platform_device ux500_cg2900_chip_device = { + .name = "cg2900-chip", + .dev = { + .parent = &ux500_cg2900_device.dev, + }, +}; + +static struct platform_device ux500_stlc2690_chip_device = { + .name = "stlc2690-chip", + .dev = { + .parent = &ux500_cg2900_device.dev, + }, +}; + +static struct cg2900_platform_data ux500_cg2900_test_platform_data = { + .bus = HCI_VIRTUAL, + .gpio_sleep = ux500_cg2900_sleep_gpio, +}; + +static struct platform_device ux500_cg2900_test_device = { + .name = "cg2900-test", + .dev = { + .parent = &ux500_cg2900_device.dev, + .platform_data = &ux500_cg2900_test_platform_data, + }, +}; + +static struct resource cg2900_uart_resources_pre_v60[] = { + { + .start = CG2900_GBF_ENA_RESET_GPIO, + .end = CG2900_GBF_ENA_RESET_GPIO, + .flags = IORESOURCE_IO, + .name = "gbf_ena_reset", + }, + { + .start = CG2900_BT_ENABLE_GPIO, + .end = CG2900_BT_ENABLE_GPIO, + .flags = IORESOURCE_IO, + .name = "bt_enable", + }, + { + .start = CG2900_UX500_BT_CTS_GPIO, + .end = CG2900_UX500_BT_CTS_GPIO, + .flags = IORESOURCE_IO, + .name = "cts_gpio", + }, + { + .start = NOMADIK_GPIO_TO_IRQ(CG2900_UX500_BT_CTS_GPIO), + .end = NOMADIK_GPIO_TO_IRQ(CG2900_UX500_BT_CTS_GPIO), + .flags = IORESOURCE_IRQ, + .name = "cts_irq", + }, +}; + +static struct resource cg2900_uart_resources_u5500[] = { + { + .start = CG2900_U5500_BT_CTS_GPIO, + .end = CG2900_U5500_BT_CTS_GPIO, + .flags = IORESOURCE_IO, + .name = "cts_gpio", + }, + { + .start = NOMADIK_GPIO_TO_IRQ(CG2900_U5500_BT_CTS_GPIO), + .end = NOMADIK_GPIO_TO_IRQ(CG2900_U5500_BT_CTS_GPIO), + .flags = IORESOURCE_IRQ, + .name = "cts_irq", + }, +}; + +static struct resource cg2900_uart_resources_u8500[] = { + { + .start = CG2900_GBF_ENA_RESET_GPIO, + .end = CG2900_GBF_ENA_RESET_GPIO, + .flags = IORESOURCE_IO, + .name = "gbf_ena_reset", + }, + { + .start = WLAN_PMU_EN_GPIO, + .end = WLAN_PMU_EN_GPIO, + .flags = IORESOURCE_IO, + .name = "pmu_en", + }, + { + .start = CG2900_UX500_BT_CTS_GPIO, + .end = CG2900_UX500_BT_CTS_GPIO, + .flags = IORESOURCE_IO, + .name = "cts_gpio", + }, + { + .start = NOMADIK_GPIO_TO_IRQ(CG2900_UX500_BT_CTS_GPIO), + .end = NOMADIK_GPIO_TO_IRQ(CG2900_UX500_BT_CTS_GPIO), + .flags = IORESOURCE_IRQ, + .name = "cts_irq", + }, +}; + +static struct resource cg2900_uart_resources_u9500[] = { + { + .start = CG2900_GBF_ENA_RESET_GPIO, + .end = CG2900_GBF_ENA_RESET_GPIO, + .flags = IORESOURCE_IO, + .name = "gbf_ena_reset", + }, + { + .start = WLAN_PMU_EN_GPIO_U9500, + .end = WLAN_PMU_EN_GPIO_U9500, + .flags = IORESOURCE_IO, + .name = "pmu_en", + }, + { + .start = CG2900_UX500_BT_CTS_GPIO, + .end = CG2900_UX500_BT_CTS_GPIO, + .flags = IORESOURCE_IO, + .name = "cts_gpio", + }, + { + .start = NOMADIK_GPIO_TO_IRQ(CG2900_UX500_BT_CTS_GPIO), + .end = NOMADIK_GPIO_TO_IRQ(CG2900_UX500_BT_CTS_GPIO), + .flags = IORESOURCE_IRQ, + .name = "cts_irq", + }, +}; + +static pin_cfg_t u5500_cg2900_uart_enabled[] = { + GPIO165_U3_RXD | PIN_INPUT_PULLUP, + GPIO166_U3_TXD | PIN_OUTPUT_HIGH, + GPIO167_U3_RTSn | PIN_OUTPUT_HIGH, + GPIO168_U3_CTSn | PIN_INPUT_PULLUP, +}; + +static pin_cfg_t u5500_cg2900_uart_disabled[] = { + GPIO165_GPIO | PIN_INPUT_PULLUP, /* RX pull down. */ + GPIO166_GPIO | PIN_OUTPUT_LOW, /* TX low - break on. */ + GPIO167_GPIO | PIN_OUTPUT_HIGH, /* RTS high-flow off. */ + GPIO168_GPIO | PIN_INPUT_PULLUP, /* CTS pull up. */ +}; + +static pin_cfg_t ux500_cg2900_uart_enabled[] = { + GPIO0_U0_CTSn | PIN_INPUT_PULLUP, + GPIO1_U0_RTSn | PIN_OUTPUT_HIGH, + GPIO2_U0_RXD | PIN_INPUT_PULLUP, + GPIO3_U0_TXD | PIN_OUTPUT_HIGH +}; + +static pin_cfg_t ux500_cg2900_uart_disabled[] = { + GPIO0_GPIO | PIN_INPUT_PULLUP, /* CTS pull up. */ + GPIO1_GPIO | PIN_OUTPUT_HIGH, /* RTS high-flow off. */ + GPIO2_GPIO | PIN_INPUT_PULLUP, /* RX pull down. */ + GPIO3_GPIO | PIN_OUTPUT_LOW /* TX low - break on. */ +}; + +static struct cg2900_platform_data ux500_cg2900_uart_platform_data = { + .bus = HCI_UART, + .gpio_sleep = ux500_cg2900_sleep_gpio, + .uart = { + .n_uart_gpios = 4, + }, +}; + +static struct platform_device ux500_cg2900_uart_device = { + .name = "cg2900-uart", + .dev = { + .platform_data = &ux500_cg2900_uart_platform_data, + .parent = &ux500_cg2900_device.dev, + }, +}; + +static bool mach_supported(void) +{ + if (machine_is_u8500() || + machine_is_u5500() || + machine_is_hrefv60() || + machine_is_nomadik() || + machine_is_snowball()) + return true; + + return false; +} + +static int __init board_cg2900_init(void) +{ + int err; + + if (!mach_supported()) + return 0; + + dcg2900_init_platdata(&ux500_cg2900_test_platform_data); + if (machine_is_u5500()) { + ux500_cg2900_uart_platform_data.uart.uart_enabled = + u5500_cg2900_uart_enabled; + ux500_cg2900_uart_platform_data.uart.uart_disabled = + u5500_cg2900_uart_disabled; + } else { + ux500_cg2900_uart_platform_data.uart.uart_enabled = + ux500_cg2900_uart_enabled; + ux500_cg2900_uart_platform_data.uart.uart_disabled = + ux500_cg2900_uart_disabled; + ux500_cg2900_uart_platform_data.regulator_id = "vdd"; + } + dcg2900_init_platdata(&ux500_cg2900_uart_platform_data); + + if (cpu_is_u8500()) { + if (machine_is_hrefv60()) { + /* u8500 */ + ux500_cg2900_uart_device.num_resources = + ARRAY_SIZE(cg2900_uart_resources_u8500); + ux500_cg2900_uart_device.resource = + cg2900_uart_resources_u8500; + } else { + /* u8500 pre v60*/ + ux500_cg2900_uart_device.num_resources = + ARRAY_SIZE(cg2900_uart_resources_pre_v60); + ux500_cg2900_uart_device.resource = + cg2900_uart_resources_pre_v60; + } + } else if (cpu_is_u5500()) { + /* u5500 */ + ux500_cg2900_uart_device.num_resources = + ARRAY_SIZE(cg2900_uart_resources_u5500); + ux500_cg2900_uart_device.resource = + cg2900_uart_resources_u5500; + } else { + /* u9500 */ + ux500_cg2900_uart_device.num_resources = + ARRAY_SIZE(cg2900_uart_resources_u9500); + ux500_cg2900_uart_device.resource = + cg2900_uart_resources_u9500; + } + + err = platform_device_register(&ux500_cg2900_device); + if (err) + return err; + err = platform_device_register(&ux500_cg2900_uart_device); + if (err) + return err; + err = platform_device_register(&ux500_cg2900_test_device); + if (err) + return err; + err = platform_device_register(&ux500_cg2900_chip_device); + if (err) + return err; + err = platform_device_register(&ux500_stlc2690_chip_device); + if (err) + return err; + + dev_info(&ux500_cg2900_device.dev, "CG2900 initialized\n"); + return 0; +} + +static void __exit board_cg2900_exit(void) +{ + if (!mach_supported()) + return; + + platform_device_unregister(&ux500_stlc2690_chip_device); + platform_device_unregister(&ux500_cg2900_chip_device); + platform_device_unregister(&ux500_cg2900_test_device); + platform_device_unregister(&ux500_cg2900_uart_device); + platform_device_unregister(&ux500_cg2900_device); + + dev_info(&ux500_cg2900_device.dev, "CG2900 removed\n"); +} + +module_init(board_cg2900_init); +module_exit(board_cg2900_exit); diff --git a/drivers/staging/cg2900/devices-cg2900-u5500.c b/drivers/staging/cg2900/devices-cg2900-u5500.c deleted file mode 100644 index 39152e51295..00000000000 --- a/drivers/staging/cg2900/devices-cg2900-u5500.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * arch/arm/mach-ux500/devices-cg2900-u5500.c - * - * Copyright (C) ST-Ericsson SA 2010 - * Authors: - * Par-Gunnar Hjalmdahl (par-gunnar.p.hjalmdahl@stericsson.com) for ST-Ericsson. - * Henrik Possung (henrik.possung@stericsson.com) for ST-Ericsson. - * Josef Kindberg (josef.kindberg@stericsson.com) for ST-Ericsson. - * Dariusz Szymszak (dariusz.xd.szymczak@stericsson.com) for ST-Ericsson. - * Kjell Andersson (kjell.k.andersson@stericsson.com) for ST-Ericsson. - * License terms: GNU General Public License (GPL), version 2 - * - * Board specific device support for the Linux Bluetooth HCI H:4 Driver - * for ST-Ericsson connectivity controller. - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include "devices-cg2900.h" - -/* prcmu resout1 pin is used for CG2900 reset*/ -void dcg2900_u5500_enable_chip(struct cg2900_chip_dev *dev) -{ - struct dcg2900_info *info = dev->b_data; - - clk_enable(info->lpoclk); - /* - * Due to a bug in CG2900 we cannot just set GPIO high to enable - * the chip. We must wait more than 100 msecs before enbling the - * chip. - * - Set PDB to low. - * - Wait for 100 msecs - * - Set PDB to high. - */ - prcmu_resetout(1, 0); - schedule_timeout_uninterruptible(msecs_to_jiffies( - CHIP_ENABLE_PDB_LOW_TIMEOUT)); - prcmu_resetout(1, 1); -} - -void dcg2900_u5500_disable_chip(struct cg2900_chip_dev *dev) -{ - struct dcg2900_info *info = dev->b_data; - - prcmu_resetout(1, 0); - clk_disable(info->lpoclk); -} - -int dcg2900_u5500_setup(struct cg2900_chip_dev *dev, - struct dcg2900_info *info) -{ - info->lpoclk = clk_get(dev->dev, "lpoclk"); - if (IS_ERR(info->lpoclk)) - return PTR_ERR(info->lpoclk); - - return 0; -} diff --git a/drivers/staging/cg2900/devices-cg2900-u8500.c b/drivers/staging/cg2900/devices-cg2900-u8500.c deleted file mode 100644 index f7ca62d5c68..00000000000 --- a/drivers/staging/cg2900/devices-cg2900-u8500.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * arch/arm/mach-ux500/devices-cg2900-u8500.c - * - * Copyright (C) ST-Ericsson SA 2010 - * Authors: - * Par-Gunnar Hjalmdahl (par-gunnar.p.hjalmdahl@stericsson.com) for ST-Ericsson. - * Henrik Possung (henrik.possung@stericsson.com) for ST-Ericsson. - * Josef Kindberg (josef.kindberg@stericsson.com) for ST-Ericsson. - * Dariusz Szymszak (dariusz.xd.szymczak@stericsson.com) for ST-Ericsson. - * Kjell Andersson (kjell.k.andersson@stericsson.com) for ST-Ericsson. - * License terms: GNU General Public License (GPL), version 2 - * - * Board specific device support for the Linux Bluetooth HCI H:4 Driver - * for ST-Ericsson connectivity controller. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "devices-cg2900.h" - -void dcg2900_enable_chip(struct cg2900_chip_dev *dev) -{ - struct dcg2900_info *info = dev->b_data; - - if (info->gbf_gpio == -1) - return; - - /* - * Due to a bug in CG2900 we cannot just set GPIO high to enable - * the chip. We must wait more than 100 msecs before enabling the - * chip. - * - Set PDB to low. - * - Wait for 100 msecs - * - Set PDB to high. - */ - gpio_set_value(info->gbf_gpio, 0); - schedule_timeout_uninterruptible(msecs_to_jiffies( - CHIP_ENABLE_PDB_LOW_TIMEOUT)); - - if (info->pmuen_gpio != -1) { - /* - * We must first set PMU_EN pin high and then wait 300 us before - * setting the GBF_EN high. - */ - gpio_set_value(info->pmuen_gpio, 1); - udelay(CHIP_ENABLE_PMU_EN_TIMEOUT); - } - - gpio_set_value(info->gbf_gpio, 1); -} - -void dcg2900_disable_chip(struct cg2900_chip_dev *dev) -{ - struct dcg2900_info *info = dev->b_data; - - if (info->gbf_gpio != -1) - gpio_set_value(info->gbf_gpio, 0); - if (info->pmuen_gpio != -1) - gpio_set_value(info->pmuen_gpio, 0); -} - -int dcg2900_setup(struct cg2900_chip_dev *dev, - struct dcg2900_info *info) -{ - int err = 0; - struct resource *resource; - const char *gbf_name; - const char *bt_name = NULL; - const char *pmuen_name = NULL; - - resource = platform_get_resource_byname(dev->pdev, IORESOURCE_IO, - "gbf_ena_reset"); - if (!resource) { - dev_err(dev->dev, "GBF GPIO does not exist\n"); - err = -EINVAL; - goto err_handling; - } - - info->gbf_gpio = resource->start; - gbf_name = resource->name; - - resource = platform_get_resource_byname(dev->pdev, IORESOURCE_IO, - "bt_enable"); - /* BT Enable GPIO may not exist */ - if (resource) { - info->bt_gpio = resource->start; - bt_name = resource->name; - } - - resource = platform_get_resource_byname(dev->pdev, IORESOURCE_IO, - "pmu_en"); - /* PMU_EN GPIO may not exist */ - if (resource) { - info->pmuen_gpio = resource->start; - pmuen_name = resource->name; - } - - /* Now setup the GPIOs */ - err = gpio_request(info->gbf_gpio, gbf_name); - if (err < 0) { - dev_err(dev->dev, "gpio_request %s failed with err: %d\n", - gbf_name, err); - goto err_handling; - } - - err = gpio_direction_output(info->gbf_gpio, 0); - if (err < 0) { - dev_err(dev->dev, - "gpio_direction_output %s failed with err: %d\n", - gbf_name, err); - goto err_handling_free_gpio_gbf; - } - - if (!pmuen_name) - goto set_bt_gpio; - - err = gpio_request(info->pmuen_gpio, pmuen_name); - if (err < 0) { - dev_err(dev->dev, "gpio_request %s failed with err: %d\n", - pmuen_name, err); - goto err_handling_free_gpio_gbf; - } - - err = gpio_direction_output(info->pmuen_gpio, 0); - if (err < 0) { - dev_err(dev->dev, - "gpio_direction_output %s failed with err: %d\n", - pmuen_name, err); - goto err_handling_free_gpio_pmuen; - } - -set_bt_gpio: - if (!bt_name) - goto finished; - - err = gpio_request(info->bt_gpio, bt_name); - if (err < 0) { - dev_err(dev->dev, "gpio_request %s failed with err: %d\n", - bt_name, err); - goto err_handling_free_gpio_pmuen; - } - - err = gpio_direction_output(info->bt_gpio, 1); - if (err < 0) { - dev_err(dev->dev, - "gpio_direction_output %s failed with err: %d\n", - bt_name, err); - goto err_handling_free_gpio_bt; - } - -finished: - - return 0; - -err_handling_free_gpio_bt: - gpio_free(info->bt_gpio); - info->bt_gpio = -1; -err_handling_free_gpio_pmuen: - if (info->pmuen_gpio != -1) { - gpio_free(info->pmuen_gpio); - info->pmuen_gpio = -1; - } -err_handling_free_gpio_gbf: - gpio_free(info->gbf_gpio); - info->gbf_gpio = -1; -err_handling: - - return err; -} diff --git a/drivers/staging/cg2900/devices-cg2900-ux500.c b/drivers/staging/cg2900/devices-cg2900-ux500.c new file mode 100644 index 00000000000..7e7c12ce4a0 --- /dev/null +++ b/drivers/staging/cg2900/devices-cg2900-ux500.c @@ -0,0 +1,219 @@ +/* + * Copyright (C) ST-Ericsson SA 2011 + * Authors: + * Par-Gunnar Hjalmdahl (par-gunnar.p.hjalmdahl@stericsson.com) for ST-Ericsson. + * Henrik Possung (henrik.possung@stericsson.com) for ST-Ericsson. + * Josef Kindberg (josef.kindberg@stericsson.com) for ST-Ericsson. + * Dariusz Szymszak (dariusz.xd.szymczak@stericsson.com) for ST-Ericsson. + * Kjell Andersson (kjell.k.andersson@stericsson.com) for ST-Ericsson. + * Hemant Gupta (hemant.gupta@stericsson.com) for ST-Ericsson. + * License terms: GNU General Public License (GPL), version 2 + * + * Board specific device support for the Linux Bluetooth HCI H:4 Driver + * for ST-Ericsson connectivity controller. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "devices-cg2900.h" + +void dcg2900_u8500_enable_chip(struct cg2900_chip_dev *dev) +{ + struct dcg2900_info *info = dev->b_data; + + if (info->gbf_gpio == -1) + return; + + /* + * Due to a bug in CG2900 we cannot just set GPIO high to enable + * the chip. We must wait more than 100 msecs before enabling the + * chip. + * - Set PDB to low. + * - Wait for 100 msecs + * - Set PDB to high. + */ + gpio_set_value(info->gbf_gpio, 0); + schedule_timeout_uninterruptible(msecs_to_jiffies( + CHIP_ENABLE_PDB_LOW_TIMEOUT)); + + if (info->pmuen_gpio != -1) { + /* + * We must first set PMU_EN pin high and then wait 300 us before + * setting the GBF_EN high. + */ + gpio_set_value(info->pmuen_gpio, 1); + udelay(CHIP_ENABLE_PMU_EN_TIMEOUT); + } + + gpio_set_value(info->gbf_gpio, 1); +} + +void dcg2900_u8500_disable_chip(struct cg2900_chip_dev *dev) +{ + struct dcg2900_info *info = dev->b_data; + + if (info->gbf_gpio != -1) + gpio_set_value(info->gbf_gpio, 0); + if (info->pmuen_gpio != -1) + gpio_set_value(info->pmuen_gpio, 0); +} + +int dcg2900_u8500_setup(struct cg2900_chip_dev *dev, + struct dcg2900_info *info) +{ + int err = 0; + struct resource *resource; + const char *gbf_name; + const char *bt_name = NULL; + const char *pmuen_name = NULL; + + resource = platform_get_resource_byname(dev->pdev, IORESOURCE_IO, + "gbf_ena_reset"); + if (!resource) { + dev_err(dev->dev, "GBF GPIO does not exist\n"); + err = -EINVAL; + goto err_handling; + } + + info->gbf_gpio = resource->start; + gbf_name = resource->name; + + resource = platform_get_resource_byname(dev->pdev, IORESOURCE_IO, + "bt_enable"); + /* BT Enable GPIO may not exist */ + if (resource) { + info->bt_gpio = resource->start; + bt_name = resource->name; + } + + resource = platform_get_resource_byname(dev->pdev, IORESOURCE_IO, + "pmu_en"); + /* PMU_EN GPIO may not exist */ + if (resource) { + info->pmuen_gpio = resource->start; + pmuen_name = resource->name; + } + + /* Now setup the GPIOs */ + err = gpio_request(info->gbf_gpio, gbf_name); + if (err < 0) { + dev_err(dev->dev, "gpio_request %s failed with err: %d\n", + gbf_name, err); + goto err_handling; + } + + err = gpio_direction_output(info->gbf_gpio, 0); + if (err < 0) { + dev_err(dev->dev, + "gpio_direction_output %s failed with err: %d\n", + gbf_name, err); + goto err_handling_free_gpio_gbf; + } + + if (!pmuen_name) + goto set_bt_gpio; + + err = gpio_request(info->pmuen_gpio, pmuen_name); + if (err < 0) { + dev_err(dev->dev, "gpio_request %s failed with err: %d\n", + pmuen_name, err); + goto err_handling_free_gpio_gbf; + } + + err = gpio_direction_output(info->pmuen_gpio, 0); + if (err < 0) { + dev_err(dev->dev, + "gpio_direction_output %s failed with err: %d\n", + pmuen_name, err); + goto err_handling_free_gpio_pmuen; + } + +set_bt_gpio: + if (!bt_name) + goto finished; + + err = gpio_request(info->bt_gpio, bt_name); + if (err < 0) { + dev_err(dev->dev, "gpio_request %s failed with err: %d\n", + bt_name, err); + goto err_handling_free_gpio_pmuen; + } + + err = gpio_direction_output(info->bt_gpio, 1); + if (err < 0) { + dev_err(dev->dev, + "gpio_direction_output %s failed with err: %d\n", + bt_name, err); + goto err_handling_free_gpio_bt; + } + +finished: + + return 0; + +err_handling_free_gpio_bt: + gpio_free(info->bt_gpio); + info->bt_gpio = -1; +err_handling_free_gpio_pmuen: + if (info->pmuen_gpio != -1) { + gpio_free(info->pmuen_gpio); + info->pmuen_gpio = -1; + } +err_handling_free_gpio_gbf: + gpio_free(info->gbf_gpio); + info->gbf_gpio = -1; +err_handling: + + return err; +} + +/* prcmu resout1 pin is used for CG2900 reset*/ +void dcg2900_u5500_enable_chip(struct cg2900_chip_dev *dev) +{ + struct dcg2900_info *info = dev->b_data; + + clk_enable(info->lpoclk); + /* + * Due to a bug in CG2900 we cannot just set GPIO high to enable + * the chip. We must wait more than 100 msecs before enbling the + * chip. + * - Set PDB to low. + * - Wait for 100 msecs + * - Set PDB to high. + */ + prcmu_resetout(1, 0); + schedule_timeout_uninterruptible(msecs_to_jiffies( + CHIP_ENABLE_PDB_LOW_TIMEOUT)); + prcmu_resetout(1, 1); +} + +void dcg2900_u5500_disable_chip(struct cg2900_chip_dev *dev) +{ + struct dcg2900_info *info = dev->b_data; + + prcmu_resetout(1, 0); + clk_disable(info->lpoclk); +} + +int dcg2900_u5500_setup(struct cg2900_chip_dev *dev, + struct dcg2900_info *info) +{ + info->lpoclk = clk_get(dev->dev, "lpoclk"); + if (IS_ERR(info->lpoclk)) + return PTR_ERR(info->lpoclk); + + return 0; +} + diff --git a/drivers/staging/cg2900/devices-cg2900.c b/drivers/staging/cg2900/devices-cg2900.c index a0cc9aeff81..4a13094a955 100644 --- a/drivers/staging/cg2900/devices-cg2900.c +++ b/drivers/staging/cg2900/devices-cg2900.c @@ -6,6 +6,7 @@ * Josef Kindberg (josef.kindberg@stericsson.com) for ST-Ericsson. * Dariusz Szymszak (dariusz.xd.szymczak@stericsson.com) for ST-Ericsson. * Kjell Andersson (kjell.k.andersson@stericsson.com) for ST-Ericsson. + * Hemant Gupta (hemant.gupta@stericsson.com) for ST-Ericsson. * License terms: GNU General Public License (GPL), version 2 * * Board specific device support for the Linux Bluetooth HCI H:4 Driver @@ -17,6 +18,7 @@ #include #include +#include #include #include #include @@ -27,12 +29,10 @@ #include #include #include -#include -#include -#include #include #include - +#include +#include #include "cg2900.h" #include "devices-cg2900.h" @@ -158,10 +158,11 @@ static int dcg2900_init(struct cg2900_chip_dev *dev) dev_dbg(dev->dev, "No resources available\n"); goto finished; } - if (cpu_is_u8500()) - err = dcg2900_setup(dev, info); - else + + if (cpu_is_u5500()) err = dcg2900_u5500_setup(dev, info); + else + err = dcg2900_u8500_setup(dev, info); if (err) goto err_handling; @@ -217,7 +218,11 @@ static void dcg2900_exit(struct cg2900_chip_dev *dev) } } - dcg2900_disable_chip(dev); + if (cpu_is_u5500()) + dcg2900_u5500_disable_chip(dev); + else + dcg2900_u8500_disable_chip(dev); + if (info->bt_gpio != -1) gpio_free(info->bt_gpio); if (info->pmuen_gpio != -1) @@ -273,14 +278,13 @@ void dcg2900_init_platdata(struct cg2900_platform_data *data) data->init = dcg2900_init; data->exit = dcg2900_exit; - if (cpu_is_u8500()) { - data->enable_chip = dcg2900_enable_chip; - data->disable_chip = dcg2900_disable_chip; - } else { + if (cpu_is_u5500()) { data->enable_chip = dcg2900_u5500_enable_chip; data->disable_chip = dcg2900_u5500_disable_chip; + } else { + data->enable_chip = dcg2900_u8500_enable_chip; + data->disable_chip = dcg2900_u8500_disable_chip; } - data->get_power_switch_off_cmd = dcg2900_get_power_switch_off_cmd; data->uart.enable_uart = dcg2900_enable_uart; diff --git a/drivers/staging/cg2900/devices-cg2900.h b/drivers/staging/cg2900/devices-cg2900.h index eeb9e2e46b4..5ca95e1e0a1 100644 --- a/drivers/staging/cg2900/devices-cg2900.h +++ b/drivers/staging/cg2900/devices-cg2900.h @@ -29,9 +29,9 @@ struct dcg2900_info { struct regulator *regulator_wlan; }; -extern void dcg2900_enable_chip(struct cg2900_chip_dev *dev); -extern void dcg2900_disable_chip(struct cg2900_chip_dev *dev); -extern int dcg2900_setup(struct cg2900_chip_dev *dev, +extern void dcg2900_u8500_enable_chip(struct cg2900_chip_dev *dev); +extern void dcg2900_u8500_disable_chip(struct cg2900_chip_dev *dev); +extern int dcg2900_u8500_setup(struct cg2900_chip_dev *dev, struct dcg2900_info *info); extern void dcg2900_u5500_enable_chip(struct cg2900_chip_dev *dev); extern void dcg2900_u5500_disable_chip(struct cg2900_chip_dev *dev); -- cgit v1.2.3