From 5d1646d90e1f2cceb9f0828f4b28318cd0ec7744 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:05:51 +0200 Subject: Adding upstream version 5.10.209. Signed-off-by: Daniel Baumann --- arch/arm/mach-tegra/board-paz00.c | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 arch/arm/mach-tegra/board-paz00.c (limited to 'arch/arm/mach-tegra/board-paz00.c') diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c new file mode 100644 index 000000000..b5c990a7a --- /dev/null +++ b/arch/arm/mach-tegra/board-paz00.c @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * arch/arm/mach-tegra/board-paz00.c + * + * Copyright (C) 2011 Marc Dietrich + * + * Based on board-harmony.c + * Copyright (C) 2010 Google, Inc. + */ + +#include +#include +#include + +#include "board.h" + +static struct property_entry wifi_rfkill_prop[] __initdata = { + PROPERTY_ENTRY_STRING("name", "wifi_rfkill"), + PROPERTY_ENTRY_STRING("type", "wlan"), + { }, +}; + +static struct platform_device wifi_rfkill_device = { + .name = "rfkill_gpio", + .id = -1, +}; + +static struct gpiod_lookup_table wifi_gpio_lookup = { + .dev_id = "rfkill_gpio", + .table = { + GPIO_LOOKUP("tegra-gpio", 25, "reset", 0), + GPIO_LOOKUP("tegra-gpio", 85, "shutdown", 0), + { }, + }, +}; + +void __init tegra_paz00_wifikill_init(void) +{ + platform_device_add_properties(&wifi_rfkill_device, wifi_rfkill_prop); + gpiod_add_lookup_table(&wifi_gpio_lookup); + platform_device_register(&wifi_rfkill_device); +} -- cgit v1.2.3