Thread (20 messages) 20 messages, 3 authors, 10d ago

Re: [PATCH v3 06/10] ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys

From: sashiko-bot@kernel.org
Date: 2026-07-12 02:21:49
Also in: linux-devicetree

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The conversion to software nodes implicitly changes the default debounce interval for the keys from 0ms to 5ms.
--
--- Patch [6]: [PATCH v3 06/10] ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys ---
commit 69f758b0d4bf8ffd63c5e52869f8e01a5ad69545
Author: Dmitry Torokhov [off-list ref]

ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys

This commit switches the gpio-keys device on crag6410 to use software
nodes and properties instead of platform data. This prepares the gpio-keys
driver for the removal of legacy platform data support.
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
--- a/arch/arm/mach-s3c/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
[ ... ]
-static struct gpio_keys_button crag6410_gpio_keys[] = {
-	[0] = {
-		.code	= KEY_SUSPEND,
-		.gpio	= S3C64XX_GPL(10),	/* EINT 18 */
-		.type	= EV_KEY,
-		.wakeup	= 1,
-		.active_low = 1,
-	},
-	[1] = {
-		.code	= SW_FRONT_PROXIMITY,
-		.gpio	= S3C64XX_GPN(11),	/* EINT 11 */
-		.type	= EV_SW,
-	},
-};
[ ... ]
+static const struct property_entry crag6410_suspend_key_props[] = {
+	PROPERTY_ENTRY_U32("linux,code", KEY_SUSPEND),
+	PROPERTY_ENTRY_GPIO("gpios",
+			    SAMSUNG_GPIO_NODE('L'), 10,	/* EINT 18 */
+			    GPIO_ACTIVE_LOW),
+	PROPERTY_ENTRY_BOOL("wakeup-source"),
+	{ }
+};
[Severity: Low]
Does this conversion implicitly change the debounce interval?

In the old platform data, the debounce interval defaulted to 0 since the
struct field was zero-initialized. By not specifying a "debounce-interval"
property here, won't the gpio-keys fwnode parser apply a 5ms default to this
key?
+
+static const struct software_node crag6410_suspend_key_node = {
+	.parent = &crag6410_gpio_keys_node,
+	.properties = crag6410_suspend_key_props,
+};
+
+static const struct property_entry crag6410_prox_sw_props[] = {
+	PROPERTY_ENTRY_U32("linux,input-type", EV_SW),
+	PROPERTY_ENTRY_U32("linux,code", SW_FRONT_PROXIMITY),
+	PROPERTY_ENTRY_GPIO("gpios",
+			    SAMSUNG_GPIO_NODE('N'), 11,	/* EINT 11 */
+			    GPIO_ACTIVE_HIGH),
+	{ }
+};
[Severity: Low]
Similarly, does the proximity switch also unintentionally receive a 5ms
debounce interval because the property is omitted here?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260711-samsung-kp-v3-0-b2fcaba77aff@gmail.com?part=6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help