From: sashiko-bot@kernel.org
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, devicetree@vger.kernel.org,
dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2 01/11] dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding
Date: Thu, 09 Jul 2026 05:05:59 +0000 [thread overview]
Message-ID: <20260709050601.18EF31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-samsung-kp-v2-1-3c6ed4c9b3b6@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Driver fails to probe and skips keymap parsing when using the newly introduced compact device tree binding.
- [Low] Suboptimal workaround for schema validation when importing matrix-keymap.yaml properties.
--
--- Patch [1]: [PATCH v2 01/11] dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding ---
commit b727e1653e0c43f9e2d755869527a44de705430f
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding
The binding with a sub-node per each key is very verbose and is hard to
use with static device properties. Allow standard matrix keymap binding
in addition to the verbose one.
> diff --git a/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml b/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml
> --- a/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml
> +++ b/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml
> @@ -37,6 +37,10 @@ properties:
>
> wakeup-source: true
>
> + keypad,num-columns: true
> + keypad,num-rows: true
> + linux,keymap: true
> +
[Severity: Low]
Is it necessary to manually declare these properties?
Since they are already defined in matrix-keymap.yaml, using
unevaluatedProperties: false at the end of the schema instead of
additionalProperties: false should allow them to be evaluated
automatically without explicitly listing them here.
> linux,input-no-autorepeat:
> type: boolean
> description:
[ ... ]
> @@ -81,12 +85,33 @@ patternProperties:
> - keypad,row
> - linux,code
>
> +dependencies:
> + linux,keymap: [ "keypad,num-columns", "keypad,num-rows" ]
> +
> required:
> - compatible
> - reg
> - interrupts
> - - samsung,keypad-num-columns
> - - samsung,keypad-num-rows
> +
> +allOf:
> + - $ref: input.yaml#
> + - $ref: matrix-keymap.yaml#
> + - if:
> + required:
> + - linux,keymap
> + then:
> + properties:
> + samsung,keypad-num-columns: false
> + samsung,keypad-num-rows: false
[Severity: High]
Will this cause the samsung-keypad driver to fail to probe when using
the new compact binding?
If a device tree drops the legacy properties as mandated here,
samsung_keypad_parse_dt() in drivers/input/keyboard/samsung-keypad.c
will fail to probe the device:
samsung_keypad_parse_dt() {
...
of_property_read_u32(np, "samsung,keypad-num-rows", &num_rows);
of_property_read_u32(np, "samsung,keypad-num-columns", &num_cols);
if (!num_rows || !num_cols) {
dev_err(dev, "number of keypad rows/columns not specified\n");
return ERR_PTR(-EINVAL);
}
...
}
Additionally, will the driver skip parsing the linux,keymap property
entirely?
The driver currently sizes the keymap based on the child node count, which
is zero for the compact matrix binding:
samsung_keypad_parse_dt() {
...
keymap_data = devm_kzalloc(dev, sizeof(*keymap_data), GFP_KERNEL);
...
key_count = of_get_child_count(np);
keymap_data->keymap_size = key_count;
...
}
This causes matrix_keypad_build_keymap() to bypass parsing the linux,keymap
property, resulting in an empty keymap.
Does the driver need a corresponding update to support this binding change?
> + patternProperties:
> + '^key-[0-9a-z]+$': false
> + else:
> + properties:
> + keypad,num-columns: false
> + keypad,num-rows: false
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-samsung-kp-v2-0-3c6ed4c9b3b6@gmail.com?part=1
next prev parent reply other threads:[~2026-07-09 5:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 4:52 [PATCH v2 00/11] Remove support for platform data from samsung keypad Dmitry Torokhov
2026-07-09 4:52 ` [PATCH v2 01/11] dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding Dmitry Torokhov
2026-07-09 5:05 ` sashiko-bot [this message]
2026-07-09 17:56 ` Conor Dooley
2026-07-09 4:53 ` [PATCH v2 02/11] Input: samsung-keypad - handle " Dmitry Torokhov
2026-07-09 5:06 ` sashiko-bot
2026-07-09 4:53 ` [PATCH v2 03/11] ARM: s3c: register and attach software nodes for Samsung gpio_chips Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 04/11] ARM: s3c: crag6410: switch keypad device to software properties Dmitry Torokhov
2026-07-09 5:09 ` sashiko-bot
2026-07-09 4:53 ` [PATCH v2 05/11] Input: samsung-keypad - remove support for platform data Dmitry Torokhov
2026-07-09 5:04 ` sashiko-bot
2026-07-09 4:53 ` [PATCH v2 06/11] ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 07/11] regulator: wm831x: support software node in platform data Dmitry Torokhov
2026-07-09 5:03 ` sashiko-bot
2026-07-09 4:53 ` [PATCH v2 08/11] ARM: s3c: crag6410: convert PMIC to software properties Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 09/11] regulator: wm831x: remove legacy DVS platform data Dmitry Torokhov
2026-07-09 5:10 ` sashiko-bot
2026-07-09 4:53 ` [PATCH v2 10/11] ARM: s3c: crag6410: convert remaining GPIO lookup tables to property entries Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 11/11] ARM: s3c: crag6410: convert basic-mmio-gpio and LEDs to software properties Dmitry Torokhov
2026-07-09 8:10 ` [PATCH v2 00/11] Remove support for platform data from samsung keypad Bartosz Golaszewski
2026-07-10 19:41 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260709050601.18EF31F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.