Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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