2011-03-08 03:01:31 +07: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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2016-01-25 16:03:48 +07:00
|
|
|
#include <linux/property.h>
|
2014-07-25 01:08:55 +07:00
|
|
|
#include <linux/gpio/machine.h>
|
2014-07-11 14:44:49 +07:00
|
|
|
#include <linux/platform_device.h>
|
|
|
|
|
2011-03-08 03:01:31 +07:00
|
|
|
#include "board.h"
|
|
|
|
|
2016-01-25 16:03:48 +07:00
|
|
|
static struct property_entry __initdata wifi_rfkill_prop[] = {
|
|
|
|
PROPERTY_ENTRY_STRING("name", "wifi_rfkill"),
|
|
|
|
PROPERTY_ENTRY_STRING("type", "wlan"),
|
|
|
|
{ },
|
|
|
|
};
|
|
|
|
|
2011-08-08 02:00:52 +07:00
|
|
|
static struct platform_device wifi_rfkill_device = {
|
|
|
|
.name = "rfkill_gpio",
|
|
|
|
.id = -1,
|
|
|
|
};
|
|
|
|
|
2013-12-03 19:49:58 +07:00
|
|
|
static struct gpiod_lookup_table wifi_gpio_lookup = {
|
|
|
|
.dev_id = "rfkill_gpio",
|
|
|
|
.table = {
|
2015-06-30 21:15:50 +07:00
|
|
|
GPIO_LOOKUP("tegra-gpio", 25, "reset", 0),
|
|
|
|
GPIO_LOOKUP("tegra-gpio", 85, "shutdown", 0),
|
2013-12-03 19:49:58 +07:00
|
|
|
{ },
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2012-05-03 05:05:44 +07:00
|
|
|
void __init tegra_paz00_wifikill_init(void)
|
|
|
|
{
|
2016-03-29 18:52:23 +07:00
|
|
|
platform_device_add_properties(&wifi_rfkill_device, wifi_rfkill_prop);
|
2013-12-03 19:49:58 +07:00
|
|
|
gpiod_add_lookup_table(&wifi_gpio_lookup);
|
2012-05-03 05:05:44 +07:00
|
|
|
platform_device_register(&wifi_rfkill_device);
|
|
|
|
}
|