Remove phsophor-gpio-keys as a standalone feature

The feature was implemented as an append to the kernel (BSP) layers in
meta-phsophor. This created a three way dance between machine layers,
BSP and meta-phosphor, when it should have been the kernel layer
providing this feature and machines could then opt in.

Fixing this means we could remove the KERNEL_DANGLING_FEATURES_WARN_ONLY
workaround.

As the feature is simply turning on a pair of kernel options without any
other impact, we can implement it by adding the options to our
defconfigs. In fact, aspeed and hpe kernel configurations enable the two
kernel options:

$ git grep CONFIG_KEYBOARD_GPIO=y
meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g4/defconfig:CONFIG_KEYBOARD_GPIO=y
meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g5/defconfig:CONFIG_KEYBOARD_GPIO=y
meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig:CONFIG_KEYBOARD_GPIO=y
meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/defconfig:CONFIG_KEYBOARD_GPIO=y

$ git grep CONFIG_INPUT_EVDEV
meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g4/defconfig:CONFIG_INPUT_EVDEV=y
meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g5/defconfig:CONFIG_INPUT_EVDEV=y
meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig:CONFIG_INPUT_EVDEV=y
meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/defconfig:CONFIG_INPUT_EVDEV=y

Other machines that wish to enable this feature should ensure it is
added to their BSP's defconfig, or add it to their machine specific
defconfig.

Change-Id: I0726836319022f96c1d13d4a0cbd73708047302c
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf b/meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf
index 0fcb971..62716cd 100644
--- a/meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf
+++ b/meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf
@@ -24,8 +24,6 @@
 
 IMAGE_BOOT_FILES += "boot.bin uEnv.txt ${KERNEL_IMAGETYPE}-zynq-zc702.dtb"
 
-KERNEL_FEATURES_remove = "phosphor-gpio-keys"
-
 # Overwrite flash offsets
 FLASH_UBOOT_OFFSET = "0"
 FLASH_KERNEL_OFFSET = "6144"
diff --git a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/phosphor-gpio-keys.cfg b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/phosphor-gpio-keys.cfg
deleted file mode 100644
index f5c01be..0000000
--- a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/phosphor-gpio-keys.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG_INPUT_KEYBOARD=y
-# CONFIG_INPUT_LEDS is not set
-# CONFIG_INPUT_MOUSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_KEYBOARD_ATKBD is not set
-CONFIG_KEYBOARD_GPIO=y
-# CONFIG_INPUT_MOUSE is not set
diff --git a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/phosphor-gpio-keys.scc b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/phosphor-gpio-keys.scc
deleted file mode 100644
index 78961af..0000000
--- a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/phosphor-gpio-keys.scc
+++ /dev/null
@@ -1,2 +0,0 @@
-define KFEATURE_DESCRIPTION "Enable gpio-keys"
-kconf non-hardware phosphor-gpio-keys.cfg
diff --git a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.7.bb b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.7.bb
index 8f5a627..0e57afd 100644
--- a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.7.bb
+++ b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.7.bb
@@ -4,9 +4,6 @@
 SRCREV="1ca49db2b4baf304d29396a603d0308770797a5c"
 require linux-obmc.inc
 
-SRC_URI += "file://phosphor-gpio-keys.scc"
-SRC_URI += "file://phosphor-gpio-keys.cfg"
-
 # OpenBMC loads in kernel features via other mechanisms so this check
 # in the kernel-yocto.bbclass is not required
 KERNEL_DANGLING_FEATURES_WARN_ONLY="1"
diff --git a/meta-ibm/meta-fsp2/recipes-kernel/linux/linux-fsp2.inc b/meta-ibm/meta-fsp2/recipes-kernel/linux/linux-fsp2.inc
index 2eb7f58..37ae6ab 100644
--- a/meta-ibm/meta-fsp2/recipes-kernel/linux/linux-fsp2.inc
+++ b/meta-ibm/meta-fsp2/recipes-kernel/linux/linux-fsp2.inc
@@ -28,5 +28,4 @@
 inherit kernel
 require recipes-kernel/linux/linux-yocto.inc
 
-KERNEL_FEATURES_remove = "phosphor-gpio-keys"
 INSANE_SKIP_kernel-vmlinux = "ldflags"
diff --git a/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed/phosphor-gpio-keys.cfg b/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed/phosphor-gpio-keys.cfg
deleted file mode 100644
index f5c01be..0000000
--- a/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed/phosphor-gpio-keys.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG_INPUT_KEYBOARD=y
-# CONFIG_INPUT_LEDS is not set
-# CONFIG_INPUT_MOUSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_KEYBOARD_ATKBD is not set
-CONFIG_KEYBOARD_GPIO=y
-# CONFIG_INPUT_MOUSE is not set
diff --git a/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed/phosphor-gpio-keys.scc b/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed/phosphor-gpio-keys.scc
deleted file mode 100644
index 78961af..0000000
--- a/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed/phosphor-gpio-keys.scc
+++ /dev/null
@@ -1,2 +0,0 @@
-define KFEATURE_DESCRIPTION "Enable gpio-keys"
-kconf non-hardware phosphor-gpio-keys.cfg
diff --git a/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed_%.bbappend
index 7401a18..d8bbccf 100644
--- a/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed_%.bbappend
+++ b/meta-phosphor/aspeed-layer/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -1,7 +1,5 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI += "file://phosphor-gpio-keys.scc"
-SRC_URI += "file://phosphor-gpio-keys.cfg"
 SRC_URI += "file://phosphor-vlan.scc"
 SRC_URI += "file://phosphor-vlan.cfg"
 
diff --git a/meta-phosphor/conf/distro/include/phosphor-base.inc b/meta-phosphor/conf/distro/include/phosphor-base.inc
index b1b3885..af2e6ef 100644
--- a/meta-phosphor/conf/distro/include/phosphor-base.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-base.inc
@@ -117,9 +117,6 @@
 
 include conf/distro/include/openbmc-phosphor/${MACHINE}.inc
 
-KERNEL_FEATURES_append = " phosphor-gpio-keys"
-KERNEL_FEATURES_remove_qemuall = " phosphor-gpio-keys"
-
 IMAGE_CLASSES_append = " image_types_phosphor phosphor-rootfs-postcommands"
 IMAGE_CLASSES_append_npcm7xx = " image_types_phosphor_nuvoton"
 
diff --git a/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton/phosphor-gpio-keys.cfg b/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton/phosphor-gpio-keys.cfg
deleted file mode 100644
index f5c01be..0000000
--- a/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton/phosphor-gpio-keys.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG_INPUT_KEYBOARD=y
-# CONFIG_INPUT_LEDS is not set
-# CONFIG_INPUT_MOUSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_KEYBOARD_ATKBD is not set
-CONFIG_KEYBOARD_GPIO=y
-# CONFIG_INPUT_MOUSE is not set
diff --git a/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton/phosphor-gpio-keys.scc b/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton/phosphor-gpio-keys.scc
deleted file mode 100644
index 78961af..0000000
--- a/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton/phosphor-gpio-keys.scc
+++ /dev/null
@@ -1,2 +0,0 @@
-define KFEATURE_DESCRIPTION "Enable gpio-keys"
-kconf non-hardware phosphor-gpio-keys.cfg
diff --git a/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton_%.bbappend b/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton_%.bbappend
index 3d0bbb7..e73d00f 100644
--- a/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton_%.bbappend
+++ b/meta-phosphor/nuvoton-layer/recipes-kernel/linux/linux-nuvoton_%.bbappend
@@ -1,8 +1,5 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI += "file://phosphor-gpio-keys.scc"
-SRC_URI += "file://phosphor-gpio-keys.cfg"
-
 # OpenBMC loads in kernel features via other mechanisms so this check
 # in the kernel-yocto.bbclass is not required
 KERNEL_DANGLING_FEATURES_WARN_ONLY="1"
diff --git a/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi/phosphor-gpio-keys.cfg b/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi/phosphor-gpio-keys.cfg
deleted file mode 100644
index f5c01be..0000000
--- a/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi/phosphor-gpio-keys.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG_INPUT_KEYBOARD=y
-# CONFIG_INPUT_LEDS is not set
-# CONFIG_INPUT_MOUSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_KEYBOARD_ATKBD is not set
-CONFIG_KEYBOARD_GPIO=y
-# CONFIG_INPUT_MOUSE is not set
diff --git a/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi/phosphor-gpio-keys.scc b/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi/phosphor-gpio-keys.scc
deleted file mode 100644
index 78961af..0000000
--- a/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi/phosphor-gpio-keys.scc
+++ /dev/null
@@ -1,2 +0,0 @@
-define KFEATURE_DESCRIPTION "Enable gpio-keys"
-kconf non-hardware phosphor-gpio-keys.cfg
diff --git a/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
index 71e208c..72d991c 100644
--- a/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
+++ b/meta-phosphor/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -1,4 +1 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://phosphor-gpio-keys.scc"
-SRC_URI += "file://phosphor-gpio-keys.cfg"