2011-03-07 20:01:31 +00:00
|
|
|
/*
|
|
|
|
* arch/arm/mach-tegra/board-paz00.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 Marc Dietrich <marvin24@gmx.de>
|
|
|
|
*
|
|
|
|
* Based on board-harmony.c
|
|
|
|
* Copyright (C) 2010 Google, Inc.
|
|
|
|
*
|
|
|
|
* This software is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
|
|
* may be copied, distributed, and modified under those terms.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2014-07-24 18:08:55 +00:00
|
|
|
#include <linux/gpio/machine.h>
|
2014-07-11 07:44:49 +00:00
|
|
|
#include <linux/platform_device.h>
|
2011-08-07 19:00:52 +00:00
|
|
|
#include <linux/rfkill-gpio.h>
|
2014-07-11 07:44:49 +00:00
|
|
|
|
2011-03-07 20:01:31 +00:00
|
|
|
#include "board.h"
|
|
|
|
|
2011-08-07 19:00:52 +00:00
|
|
|
static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
|
2014-04-01 14:02:52 +00:00
|
|
|
.name = "wifi_rfkill",
|
2011-08-07 19:00:52 +00:00
|
|
|
.type = RFKILL_TYPE_WLAN,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device wifi_rfkill_device = {
|
|
|
|
.name = "rfkill_gpio",
|
|
|
|
.id = -1,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = &wifi_rfkill_platform_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2013-12-03 12:49:58 +00:00
|
|
|
static struct gpiod_lookup_table wifi_gpio_lookup = {
|
|
|
|
.dev_id = "rfkill_gpio",
|
|
|
|
.table = {
|
2015-06-30 14:15:50 +00:00
|
|
|
GPIO_LOOKUP("tegra-gpio", 25, "reset", 0),
|
|
|
|
GPIO_LOOKUP("tegra-gpio", 85, "shutdown", 0),
|
2013-12-03 12:49:58 +00:00
|
|
|
{ },
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2012-05-02 22:05:44 +00:00
|
|
|
void __init tegra_paz00_wifikill_init(void)
|
|
|
|
{
|
2013-12-03 12:49:58 +00:00
|
|
|
gpiod_add_lookup_table(&wifi_gpio_lookup);
|
2012-05-02 22:05:44 +00:00
|
|
|
platform_device_register(&wifi_rfkill_device);
|
|
|
|
}
|