Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2aa81067 authored by Olof Johansson's avatar Olof Johansson Committed by Matt Wagantall
Browse files

CHROMIUM: ARM64: add gpio.h to increase default nr



Signed-off-by: default avatarOlof Johansson <olofj@chromium.org>
Signed-off-by: default avatarDavid Riley <davidriley@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/206724
Git-commit: a98a5186344c027fb53506994ce93f7af8a79960
Git-repo: https://chromium.googlesource.com/chromiumos/third_party/kernel


[joonwoop@codeaurora.org: fixed merge conflict in arch/arm64/Kconfig.
 removed Change-Id tag from commit text.]
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent 108ad74a
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ config ARM64
	select ARCH_WANT_OPTIONAL_GPIOLIB
	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
	select ARCH_WANT_FRAME_POINTERS
	select ARCH_HAVE_CUSTOM_GPIO_H
	select ARM_AMBA
	select ARM_ARCH_TIMER
	select ARM_GIC
@@ -318,6 +319,19 @@ config HOTPLUG_CPU
	  Say Y here to experiment with turning CPUs off and on.  CPUs
	  can be controlled through /sys/devices/system/cpu.

# The GPIO number here must be sorted by descending number. In case of
# a multiplatform kernel, we just want the highest value required by the
# selected platforms.
config ARCH_NR_GPIO
        int
        default 1024 if ARCH_TEGRA
        default 256
        help
          Maximum number of GPIOs in the system.

          If unsure, leave the default value.


source kernel/Kconfig.preempt

config HZ
+32 −0
Original line number Diff line number Diff line
#ifndef _ARCH_ARM64_GPIO_H
#define _ARCH_ARM64_GPIO_H

#if CONFIG_ARCH_NR_GPIO > 0
#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
#endif

/* not all ARM64 platforms necessarily support this API ... */
#ifdef CONFIG_NEED_MACH_GPIO_H
#include <mach/gpio.h>
#endif

#ifndef __ARM64_GPIOLIB_COMPLEX
/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
#include <asm-generic/gpio.h>

/* The trivial gpiolib dispatchers */
#define gpio_get_value  __gpio_get_value
#define gpio_set_value  __gpio_set_value
#define gpio_cansleep   __gpio_cansleep
#endif

/*
 * Provide a default gpio_to_irq() which should satisfy every case.
 * However, some platforms want to do this differently, so allow them
 * to override it.
 */
#ifndef gpio_to_irq
#define gpio_to_irq	__gpio_to_irq
#endif

#endif /* _ARCH_ARM64_GPIO_H */