2 * Customer code to add GPIO control during WLAN start/stop
3 * Copyright (C) 1999-2011, Broadcom Corporation
5 * Unless you and Broadcom execute a separate written software license
6 * agreement governing use of this software, this software is licensed to you
7 * under the terms of the GNU General Public License version 2 (the "GPL"),
8 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
9 * following added to such license:
11 * As a special exception, the copyright holders of this software give you
12 * permission to link this software with independent modules, and to copy and
13 * distribute the resulting executable under terms of your choice, provided that
14 * you also meet, for each linked independent module, the terms and conditions of
15 * the license of that module. An independent module is a module which is not
16 * derived from this software. The special exception does not apply to any
17 * modifications of the software.
19 * Notwithstanding the above, under no circumstances may you combine this
20 * software in any way with any other Broadcom software provided under a license
21 * other than the GPL, without Broadcom's express prior written consent.
23 * $Id: dhd_custom_gpio.c,v 1.2.42.1 2010-10-19 00:41:09 Exp $
26 #include <linux/kernel.h>
27 #include <linux/platform_device.h>
28 #include <linux/module.h>
29 #include <linux/rfkill.h>
30 #include <linux/init.h>
31 #include <linux/slab.h>
32 #include <linux/delay.h>
33 #include <linux/interrupt.h>
34 #include <linux/rfkill-wlan.h>
38 int bcm_wlan_get_oob_irq(void)
40 return rockchip_wifi_get_oob_irq();
44 void bcm_wlan_power_on(int flag)
47 printk("======== PULL WL_REG_ON HIGH! ========\n");
48 rockchip_wifi_power(1);
50 rockchip_wifi_set_carddetect();
52 printk("======== PULL WL_REG_ON HIGH! (flag = %d) ========\n", flag);
53 rockchip_wifi_power(1);
58 void bcm_wlan_power_off(int flag)
61 printk("======== Card detection to remove SDIO card! ========\n");
62 rockchip_wifi_power(0);
64 printk("======== PULL WL_REG_ON LOW! (flag = %d) ========\n", flag);
65 rockchip_wifi_power(0);
69 #endif /* CUSTOMER_HW */