summaryrefslogtreecommitdiff
path: root/arch/arm/mach-sa1100/collie.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-08-18 19:50:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-08-18 19:50:40 -0700
commitbd5f485f3f026225b86573e559af0b7254ef4184 (patch)
tree92b9cabbbefe9b8cee634769676b9b97238cdfc7 /arch/arm/mach-sa1100/collie.c
parent6eb1ea5ff48d647deb67c58b7a0e97bbf4de088a (diff)
parentacf1efa9485fda84f332c8fbbe7b4453dbec183a (diff)
downloadlinux-master.tar.gz
linux-master.zip
Merge tag 'soc-arm-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/socHEADmaster
Pull ARM SoC platform updates from Arnd Bergmann: "The 32-bit Arm platforms are a bit more interesting this time: I refreshed an earlier series to mark code as deprecated that does have the tendency of getting in the way of cleanups and new features but has close to zero users. Among these are: - 22 of the remaining 28 legacy board files that predate the current devicetree based descriptions, using old chips from Intel and Marvell. The remaining six board files are for TI OMAP1 and Samsung s3c64xx chips and all still have known users. - support for Cortex-M3/M4/M7 and ARM1136r0 CPU cores and the 25 machines based on these. These all use devicetree but the CPU support causes disproportional work. Most of them are just reference boards, the notable exceptions being the Nokia N800/N810 tablet and the Buglabs BUG platform. - be8, be32, oabi and iwmmxt userspace binaries, which were mostly associated with the platforms now scheduled for removal and are increasingly problematic to support with modern toolchains. Nothing is actually removed at this point, to ensure that any remaining users continue to have the 7.3-LTS for a while longer. Patches for removal are currently being tested. Other updates include a continued work to convert GPIO number based interfaces to descriptors, a patch to restore little-endian mode on the one Arm platform (ixp4xx) that only worked in big-endian mode recently, and some minor cleanups and bugfixes" * tag 'soc-arm-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (41 commits) MAINTAINERS: Drop redundant lists from various Samsung entries ARM: tegra: Replace __ASSEMBLY__ with __ASSEMBLER__ ARM: tegra: Fix OF node reference leaks in IRQ init ARM: lpc32xx: remove a few manually populated OF devices ARM: lpc32xx: only run SoC init on LPC32xx hardware firmware: imx: scu: manage mailbox channels and global handle ARM: sa1100: h3xxx: convert gpio-keys to use software nodes ARM: sa1100: collie: convert gpio-keys to use software nodes ARM: sa1100: assabet: convert gpio-keys to use software nodes gpio: sa1100: register software node for GPIO controller ARM: ixp4xx: Relax endianness ARM: replace linux/gpio.h inclusions soc: imx9: devm_kasprintf error handling ARM: mark mv78xx0 support as deprecated ARM: mark axxia platform as deprecated ARM: mark Cortex-M3/M4/M7 based boards as deprecated ARM: mark footbridge as deprecated ARM: mark RiscPC as deprecated ARM: mark mach-sa1100 as deprecated ARM: orion5x: mark all board files as deprecated ...
Diffstat (limited to 'arch/arm/mach-sa1100/collie.c')
-rw-r--r--arch/arm/mach-sa1100/collie.c76
1 files changed, 47 insertions, 29 deletions
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 466d755d5702..d1931f51c900 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -27,10 +27,11 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/timer.h>
-#include <linux/gpio_keys.h>
+#include <linux/gpio/property.h>
#include <linux/input.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
#include <linux/gpio/machine.h>
+#include <linux/property.h>
#include <linux/power/gpio-charger.h>
#include <video/sa1100fb.h>
@@ -228,43 +229,57 @@ struct platform_device collie_locomo_device = {
.resource = locomo_resources,
};
-static struct gpio_keys_button collie_gpio_keys[] = {
- {
- .type = EV_PWR,
- .code = KEY_RESERVED,
- .gpio = COLLIE_GPIO_ON_KEY,
- .desc = "On key",
- .wakeup = 1,
- .active_low = 1,
- },
- {
- .type = EV_PWR,
- .code = KEY_WAKEUP,
- .gpio = COLLIE_GPIO_WAKEUP,
- .desc = "Sync",
- .wakeup = 1,
- .active_low = 1,
- },
+static const struct software_node collie_gpio_keys_node = {
+ .name = "collie-gpio-keys",
};
-static struct gpio_keys_platform_data collie_gpio_keys_data = {
- .buttons = collie_gpio_keys,
- .nbuttons = ARRAY_SIZE(collie_gpio_keys),
+static const struct property_entry collie_on_key_props[] = {
+ PROPERTY_ENTRY_U32("linux,code", KEY_RESERVED),
+ PROPERTY_ENTRY_GPIO("gpios", &sa1100_gpiochip_node,
+ COLLIE_GPIO_ON_KEY, GPIO_ACTIVE_LOW),
+ PROPERTY_ENTRY_STRING("label", "On key"),
+ PROPERTY_ENTRY_U32("linux,input-type", EV_PWR),
+ PROPERTY_ENTRY_BOOL("wakeup-source"),
+ { }
};
-static struct platform_device collie_gpio_keys_device = {
- .name = "gpio-keys",
- .id = -1,
- .dev = {
- .platform_data = &collie_gpio_keys_data,
- },
+static const struct software_node collie_on_key_node = {
+ .parent = &collie_gpio_keys_node,
+ .properties = collie_on_key_props,
+};
+
+static const struct property_entry collie_wakeup_key_props[] = {
+ PROPERTY_ENTRY_U32("linux,code", KEY_WAKEUP),
+ PROPERTY_ENTRY_GPIO("gpios", &sa1100_gpiochip_node,
+ COLLIE_GPIO_WAKEUP, GPIO_ACTIVE_LOW),
+ PROPERTY_ENTRY_STRING("label", "Sync"),
+ PROPERTY_ENTRY_U32("linux,input-type", EV_PWR),
+ PROPERTY_ENTRY_BOOL("wakeup-source"),
+ { }
+};
+
+static const struct software_node collie_wakeup_key_node = {
+ .parent = &collie_gpio_keys_node,
+ .properties = collie_wakeup_key_props,
+};
+
+static const struct software_node * const collie_gpio_keys_swnodes[] __initconst = {
+ &collie_gpio_keys_node,
+ &collie_on_key_node,
+ &collie_wakeup_key_node,
+ NULL
+};
+
+static const struct platform_device_info collie_gpio_keys_dev_info __initconst = {
+ .name = "gpio-keys",
+ .id = PLATFORM_DEVID_NONE,
+ .swnode = &collie_gpio_keys_node,
};
static struct platform_device *devices[] __initdata = {
&collie_locomo_device,
&colliescoop_device,
&collie_power_device,
- &collie_gpio_keys_device,
};
static struct mtd_partition collie_partitions[] = {
@@ -384,6 +399,9 @@ static void __init collie_init(void)
printk(KERN_WARNING "collie: Unable to register LoCoMo device\n");
}
+ software_node_register_node_group(collie_gpio_keys_swnodes);
+ platform_device_register_full(&collie_gpio_keys_dev_info);
+
sa11x0_register_lcd(&collie_lcd_info);
sa11x0_register_mtd(&collie_flash_data, collie_flash_resources,
ARRAY_SIZE(collie_flash_resources));