aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/linux/modules/multiplexer.mk
blob: 135fc62c6dd2f4b3817989a66eca032d760ee79e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

MENU_TITLE:=Multiplexer Support

define KernelPackage/mux-core
  SUBMENU:=$(MENU_TITLE)
  TITLE:=Multiplexer Support
  KCONFIG:=CONFIG_MULTIPLEXER
  FILES:=$(LINUX_DIR)/drivers/mux/mux-core.ko
  AUTOLOAD:=$(call AutoLoad,25,mux-core,1)
endef

define KernelPackage/mux-core/description
  Kernel module for multiplexer support
endef

$(eval $(call KernelPackage,mux-core))

define KernelPackage/mux-gpio
  SUBMENU:=$(MENU_TITLE)
  TITLE:=GPIO-controlled Multiplexer controller
  KCONFIG:=CONFIG_MUX_GPIO
  DEPENDS:=@GPIO_SUPPORT kmod-mux-core
  FILES:=$(LINUX_DIR)/drivers/mux/mux-gpio.ko
  AUTOLOAD:=$(call AutoLoad,25,mux-gpio,1)
endef

define KernelPackage/mux-gpio/description
  Kernel modules for GPIO-controlled Multiplexer controller
endef

$(eval $(call KernelPackage,mux-gpio))
Atom">var = $1; $val = $2; next if $var eq 'ALL'; if ($val eq 'y') { $type = "bool"; } elsif ($val eq 'm') { $type = "tristate"; } elsif ($val =~ /^".*"$/) { $type = "string"; } elsif ($val =~ /^\d+$/) { $type = "int"; } else { warn "WARNING: no type found for symbol CONFIG_$var=$val\n"; next; } } elsif (/^# CONFIG_BUSYBOX_(.*) is not set/) { $var = "BUSYBOX_$1"; $val = 'n'; $type = "bool"; } else { # We don't want to preserve a record of deselecting # packages because we may want build them in the SDK. # non-package configs however may be important to preserve # the same compilation settings for packages that get # recompiled in the SDK. # Also we want avoid preserving image generation settings # because we set those while in ImageBuilder next if /^(# )?CONFIG_PACKAGE/; next if /^(# )?CONFIG_TARGET/; if (/^# CONFIG_(.*) is not set/) { $var = $1; $val = 'n'; $type = "bool"; } } if (($var ne '') && ($type ne '') && ($val ne '')) { print <<EOF; config $var $type default $val EOF } }