Skip to content

Commit 66615c4

Browse files
committed
Merge tag 'auxdisplay-for-linus-v5.12' of git://github.com/ojeda/linux
Pull auxdisplay updates from Miguel Ojeda: "A set of auxdisplay fixes and improvements from Geert Uytterhoeven, and one from Robin van der Gracht that got lost a long time ago" * tag 'auxdisplay-for-linus-v5.12' of git://github.com/ojeda/linux: auxdisplay: Fix duplicate CHARLCD config symbol auxdisplay: ht16k33: Fix refresh rate handling dt-bindings: auxdisplay: ht16k33: Convert to json-schema dt-bindings: auxdisplay: ht16k33: Fix default-brightness-level range dt-bindings: auxdisplay: ht16k33: Keyscan function should be optional
2 parents a2590d6 + b456164 commit 66615c4

5 files changed

Lines changed: 85 additions & 54 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/auxdisplay/holtek,ht16k33.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Holtek HT16K33 RAM mapping 16*8 LED controller with keyscan
8+
9+
maintainers:
10+
- Robin van der Gracht <robin@protonic.nl>
11+
12+
allOf:
13+
- $ref: "/schemas/input/matrix-keymap.yaml#"
14+
15+
properties:
16+
compatible:
17+
const: holtek,ht16k33
18+
19+
reg:
20+
maxItems: 1
21+
22+
refresh-rate-hz:
23+
maxItems: 1
24+
description: Display update interval in Hertz
25+
26+
interrupts:
27+
maxItems: 1
28+
29+
debounce-delay-ms:
30+
maxItems: 1
31+
description: Debouncing interval time in milliseconds
32+
33+
linux,keymap: true
34+
35+
linux,no-autorepeat:
36+
description: Disable keyrepeat
37+
38+
default-brightness-level:
39+
minimum: 1
40+
maximum: 16
41+
default: 16
42+
description: Initial brightness level
43+
44+
required:
45+
- compatible
46+
- reg
47+
- refresh-rate-hz
48+
49+
additionalProperties: false
50+
51+
examples:
52+
- |
53+
#include <dt-bindings/interrupt-controller/irq.h>
54+
#include <dt-bindings/input/input.h>
55+
i2c1 {
56+
#address-cells = <1>;
57+
#size-cells = <0>;
58+
59+
ht16k33: ht16k33@70 {
60+
compatible = "holtek,ht16k33";
61+
reg = <0x70>;
62+
refresh-rate-hz = <20>;
63+
interrupt-parent = <&gpio4>;
64+
interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
65+
debounce-delay-ms = <50>;
66+
linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>,
67+
<MATRIX_KEY(3, 0, KEY_F8)>,
68+
<MATRIX_KEY(4, 0, KEY_F10)>,
69+
<MATRIX_KEY(5, 0, KEY_F4)>,
70+
<MATRIX_KEY(6, 0, KEY_F2)>,
71+
<MATRIX_KEY(2, 1, KEY_F5)>,
72+
<MATRIX_KEY(3, 1, KEY_F7)>,
73+
<MATRIX_KEY(4, 1, KEY_F9)>,
74+
<MATRIX_KEY(5, 1, KEY_F3)>,
75+
<MATRIX_KEY(6, 1, KEY_F1)>;
76+
};
77+
};

Documentation/devicetree/bindings/display/ht16k33.txt

Lines changed: 0 additions & 40 deletions
This file was deleted.

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8141,7 +8141,7 @@ F: net/hsr/
81418141
HT16K33 LED CONTROLLER DRIVER
81428142
M: Robin van der Gracht <robin@protonic.nl>
81438143
S: Maintained
8144-
F: Documentation/devicetree/bindings/display/ht16k33.txt
8144+
F: Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml
81458145
F: drivers/auxdisplay/ht16k33.c
81468146

81478147
HTCPEN TOUCHSCREEN DRIVER

drivers/auxdisplay/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,3 @@ config PANEL
507507
depends on PARPORT
508508
select AUXDISPLAY
509509
select PARPORT_PANEL
510-
511-
config CHARLCD
512-
tristate "Character LCD core support" if COMPILE_TEST

drivers/auxdisplay/ht16k33.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv)
117117
{
118118
struct ht16k33_fbdev *fbdev = &priv->fbdev;
119119

120-
schedule_delayed_work(&fbdev->work,
121-
msecs_to_jiffies(HZ / fbdev->refresh_rate));
120+
schedule_delayed_work(&fbdev->work, HZ / fbdev->refresh_rate);
122121
}
123122

124123
/*
@@ -402,11 +401,6 @@ static int ht16k33_probe(struct i2c_client *client,
402401
return -EIO;
403402
}
404403

405-
if (client->irq <= 0) {
406-
dev_err(&client->dev, "No IRQ specified\n");
407-
return -EINVAL;
408-
}
409-
410404
priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
411405
if (!priv)
412406
return -ENOMEM;
@@ -459,9 +453,12 @@ static int ht16k33_probe(struct i2c_client *client,
459453
if (err)
460454
goto err_fbdev_info;
461455

462-
err = ht16k33_keypad_probe(client, &priv->keypad);
463-
if (err)
464-
goto err_fbdev_unregister;
456+
/* Keypad */
457+
if (client->irq > 0) {
458+
err = ht16k33_keypad_probe(client, &priv->keypad);
459+
if (err)
460+
goto err_fbdev_unregister;
461+
}
465462

466463
/* Backlight */
467464
memset(&bl_props, 0, sizeof(struct backlight_properties));

0 commit comments

Comments
 (0)