From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Robin van der Gracht <robin@protonic.nl>,
Rob Herring <robh+dt@kernel.org>,
Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Michael Kaplan <M.KAPLAN@evva.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 1/3] dt-bindings: auxdisplay: ht16k33: Keyscan function should be optional
Date: Mon, 18 Jan 2021 13:35:36 +0100 [thread overview]
Message-ID: <20210118123538.564597-2-geert@linux-m68k.org> (raw)
In-Reply-To: <20210118123538.564597-1-geert@linux-m68k.org>
From: Robin van der Gracht <robin@protonic.nl>
Keyscan should be optional to support simple LED matrix displays (output
only).
Reported-by: Michael Kaplan <M.KAPLAN@evva.com>
Signed-off-by: Robin van der Gracht <robin@protonic.nl>
[geert: Rebased]
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
.../devicetree/bindings/display/ht16k33.txt | 11 +++++++----
drivers/auxdisplay/ht16k33.c | 14 ++++++--------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt
index d5a8b070b46779a4..3d602f5b9eb6bb74 100644
--- a/Documentation/devicetree/bindings/display/ht16k33.txt
+++ b/Documentation/devicetree/bindings/display/ht16k33.txt
@@ -4,16 +4,19 @@ Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan
Required properties:
- compatible: "holtek,ht16k33"
- reg: I2C slave address of the chip.
-- interrupts: Interrupt specification for the key pressed interrupt.
- refresh-rate-hz: Display update interval in HZ.
-- debounce-delay-ms: Debouncing interval time in milliseconds.
-- linux,keymap: The keymap for keys as described in the binding
- document (devicetree/bindings/input/matrix-keymap.txt).
Optional properties:
- linux,no-autorepeat: Disable keyrepeat.
- default-brightness-level: Initial brightness level [0-15] (default: 15).
+- Keypad
+ Supply the 'interrupts' property to enable the keyscan feature.
+ - interrupts: Interrupt specification for the key pressed interrupt.
+ - debounce-delay-ms: Debouncing interval time in milliseconds.
+ - linux,keymap: The keymap for keys as described in the binding
+ document (devicetree/bindings/input/matrix-keymap.txt).
+
Example:
&i2c1 {
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index d951d54b26f5239b..444f3b1019e3d425 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -402,11 +402,6 @@ static int ht16k33_probe(struct i2c_client *client,
return -EIO;
}
- if (client->irq <= 0) {
- dev_err(&client->dev, "No IRQ specified\n");
- return -EINVAL;
- }
-
priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
@@ -459,9 +454,12 @@ static int ht16k33_probe(struct i2c_client *client,
if (err)
goto err_fbdev_info;
- err = ht16k33_keypad_probe(client, &priv->keypad);
- if (err)
- goto err_fbdev_unregister;
+ /* Keypad */
+ if (client->irq > 0) {
+ err = ht16k33_keypad_probe(client, &priv->keypad);
+ if (err)
+ goto err_fbdev_unregister;
+ }
/* Backlight */
memset(&bl_props, 0, sizeof(struct backlight_properties));
--
2.25.1
next prev parent reply other threads:[~2021-01-18 12:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 12:35 [PATCH 0/3] auxdisplay: ht16k33: Improvement, fix, and json-schema conversion Geert Uytterhoeven
2021-01-18 12:35 ` Geert Uytterhoeven [this message]
2021-01-25 21:19 ` [PATCH 1/3] dt-bindings: auxdisplay: ht16k33: Keyscan function should be optional Miguel Ojeda
2021-01-18 12:35 ` [PATCH 2/3] dt-bindings: auxdisplay: ht16k33: Fix default-brightness-level range Geert Uytterhoeven
2021-01-25 21:20 ` Miguel Ojeda
2021-01-18 12:35 ` [PATCH 3/3] dt-bindings: auxdisplay: ht16k33: Convert to json-schema Geert Uytterhoeven
2021-01-25 21:20 ` Miguel Ojeda
2021-01-18 13:36 ` [PATCH 0/3] auxdisplay: ht16k33: Improvement, fix, and json-schema conversion robin
2021-01-23 12:47 ` Miguel Ojeda
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=20210118123538.564597-2-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=M.KAPLAN@evva.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=robh+dt@kernel.org \
--cc=robin@protonic.nl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).