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