blob: b5c990a7a5af5b34d7e2e2ed0ba0e72e7b017863 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-only
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * arch/arm/mach-tegra/board-paz00.c
4 *
5 * Copyright (C) 2011 Marc Dietrich <marvin24@gmx.de>
6 *
7 * Based on board-harmony.c
8 * Copyright (C) 2010 Google, Inc.
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00009 */
10
11#include <linux/property.h>
12#include <linux/gpio/machine.h>
13#include <linux/platform_device.h>
14
15#include "board.h"
16
17static struct property_entry wifi_rfkill_prop[] __initdata = {
18 PROPERTY_ENTRY_STRING("name", "wifi_rfkill"),
19 PROPERTY_ENTRY_STRING("type", "wlan"),
20 { },
21};
22
23static struct platform_device wifi_rfkill_device = {
24 .name = "rfkill_gpio",
25 .id = -1,
26};
27
28static struct gpiod_lookup_table wifi_gpio_lookup = {
29 .dev_id = "rfkill_gpio",
30 .table = {
31 GPIO_LOOKUP("tegra-gpio", 25, "reset", 0),
32 GPIO_LOOKUP("tegra-gpio", 85, "shutdown", 0),
33 { },
34 },
35};
36
37void __init tegra_paz00_wifikill_init(void)
38{
39 platform_device_add_properties(&wifi_rfkill_device, wifi_rfkill_prop);
40 gpiod_add_lookup_table(&wifi_gpio_lookup);
41 platform_device_register(&wifi_rfkill_device);
42}