board-paz00.c 1004 B

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