b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | # |
| 2 | # Copyright (C) 2008-2012 OpenWrt.org |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | include $(INCLUDE_DIR)/kernel.mk |
| 10 | |
| 11 | PKG_NAME:=gpio-button-hotplug |
| 12 | PKG_RELEASE:=5 |
| 13 | PKG_LICENSE:=GPL-2.0 |
| 14 | |
| 15 | include $(INCLUDE_DIR)/package.mk |
| 16 | |
| 17 | define KernelPackage/gpio-button-hotplug |
| 18 | SUBMENU:=GPIO support |
| 19 | TITLE:=Simple GPIO Button Hotplug driver |
| 20 | FILES:=$(PKG_BUILD_DIR)/gpio-button-hotplug.ko |
| 21 | AUTOLOAD:=$(call AutoLoad,30,gpio-button-hotplug,1) |
| 22 | KCONFIG:= |
| 23 | endef |
| 24 | |
| 25 | define KernelPackage/gpio-button-hotplug/description |
| 26 | This is a replacement for the following in-kernel drivers: |
| 27 | 1) gpio_keys (KEYBOARD_GPIO) |
| 28 | 2) gpio_keys_polled (KEYBOARD_GPIO_POLLED) |
| 29 | |
| 30 | Instead of generating input events (like in-kernel drivers do) it generates |
| 31 | uevent-s and broadcasts them. This allows disabling input subsystem which is |
| 32 | an overkill for OpenWrt simple needs. |
| 33 | endef |
| 34 | |
| 35 | define Build/Compile |
| 36 | $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules |
| 37 | endef |
| 38 | |
| 39 | $(eval $(call KernelPackage,gpio-button-hotplug)) |