Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1712826 > unrolled thread

[PATCH] auxdisplay: ht16k33: Keyscan function should be optional

Started byRobin van der Gracht <robin@protonic.nl>
First post2017-08-16 12:30 +0200
Last post2017-08-18 00:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] auxdisplay: ht16k33: Keyscan function should be optional Robin van der Gracht <robin@protonic.nl> - 2017-08-16 12:30 +0200
    Re: [PATCH] auxdisplay: ht16k33: Keyscan function should be optional Rob Herring <robh@kernel.org> - 2017-08-18 00:10 +0200

#1712826 — [PATCH] auxdisplay: ht16k33: Keyscan function should be optional

FromRobin van der Gracht <robin@protonic.nl>
Date2017-08-16 12:30 +0200
Subject[PATCH] auxdisplay: ht16k33: Keyscan function should be optional
Message-ID<uf3Kh-5PQ-7@gated-at.bofh.it>
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>
---

 Documentation/devicetree/bindings/display/ht16k33.txt | 15 +++++++++------
 drivers/auxdisplay/ht16k33.c                          | 14 ++++++--------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt
index 8e5b30b87754..e2c9048ed9d4 100644
--- a/Documentation/devicetree/bindings/display/ht16k33.txt
+++ b/Documentation/devicetree/bindings/display/ht16k33.txt
@@ -4,18 +4,21 @@ Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan
 Required properties:
 - compatible:		"holtek,ht16k33"
 - reg:			I2C slave address of the chip.
-- interrupt-parent:	A phandle pointing to the interrupt controller
-			serving the interrupt for this 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.
+ - interrupt-parent:	A phandle pointing to the interrupt controller
+			serving the interrupt for this chip.
+ - 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 674a6c0cec2a..14b268388ef9 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -410,11 +410,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;
@@ -468,9 +463,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.11.0

[toc] | [next] | [standalone]


#1714427

FromRob Herring <robh@kernel.org>
Date2017-08-18 00:10 +0200
Message-ID<ufB9h-2BN-35@gated-at.bofh.it>
In reply to#1712826
On Wed, Aug 16, 2017 at 12:28:49PM +0200, Robin van der Gracht wrote:
> 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>
> ---
> 
>  Documentation/devicetree/bindings/display/ht16k33.txt | 15 +++++++++------
>  drivers/auxdisplay/ht16k33.c                          | 14 ++++++--------
>  2 files changed, 15 insertions(+), 14 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web