Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+85 -54
+77
Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml
··· 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 + };
-40
Documentation/devicetree/bindings/display/ht16k33.txt
··· 1 - Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan 2 - ------------------------------------------------------------------------------- 3 - 4 - Required properties: 5 - - compatible: "holtek,ht16k33" 6 - - reg: I2C slave address of the chip. 7 - - interrupts: Interrupt specification for the key pressed interrupt. 8 - - refresh-rate-hz: Display update interval in HZ. 9 - - debounce-delay-ms: Debouncing interval time in milliseconds. 10 - - linux,keymap: The keymap for keys as described in the binding 11 - document (devicetree/bindings/input/matrix-keymap.txt). 12 - 13 - Optional properties: 14 - - linux,no-autorepeat: Disable keyrepeat. 15 - - default-brightness-level: Initial brightness level [0-15] (default: 15). 16 - 17 - Example: 18 - 19 - &i2c1 { 20 - ht16k33: ht16k33@70 { 21 - compatible = "holtek,ht16k33"; 22 - reg = <0x70>; 23 - refresh-rate-hz = <20>; 24 - debounce-delay-ms = <50>; 25 - interrupt-parent = <&gpio4>; 26 - interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>; 27 - linux,keymap = < 28 - MATRIX_KEY(2, 0, KEY_F6) 29 - MATRIX_KEY(3, 0, KEY_F8) 30 - MATRIX_KEY(4, 0, KEY_F10) 31 - MATRIX_KEY(5, 0, KEY_F4) 32 - MATRIX_KEY(6, 0, KEY_F2) 33 - MATRIX_KEY(2, 1, KEY_F5) 34 - MATRIX_KEY(3, 1, KEY_F7) 35 - MATRIX_KEY(4, 1, KEY_F9) 36 - MATRIX_KEY(5, 1, KEY_F3) 37 - MATRIX_KEY(6, 1, KEY_F1) 38 - >; 39 - }; 40 - };
+1 -1
MAINTAINERS
··· 8141 8141 HT16K33 LED CONTROLLER DRIVER 8142 8142 M: Robin van der Gracht <robin@protonic.nl> 8143 8143 S: Maintained 8144 - F: Documentation/devicetree/bindings/display/ht16k33.txt 8144 + F: Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml 8145 8145 F: drivers/auxdisplay/ht16k33.c 8146 8146 8147 8147 HTCPEN TOUCHSCREEN DRIVER
-3
drivers/auxdisplay/Kconfig
··· 507 507 depends on PARPORT 508 508 select AUXDISPLAY 509 509 select PARPORT_PANEL 510 - 511 - config CHARLCD 512 - tristate "Character LCD core support" if COMPILE_TEST
+7 -10
drivers/auxdisplay/ht16k33.c
··· 117 117 { 118 118 struct ht16k33_fbdev *fbdev = &priv->fbdev; 119 119 120 - schedule_delayed_work(&fbdev->work, 121 - msecs_to_jiffies(HZ / fbdev->refresh_rate)); 120 + schedule_delayed_work(&fbdev->work, HZ / fbdev->refresh_rate); 122 121 } 123 122 124 123 /* ··· 401 402 return -EIO; 402 403 } 403 404 404 - if (client->irq <= 0) { 405 - dev_err(&client->dev, "No IRQ specified\n"); 406 - return -EINVAL; 407 - } 408 - 409 405 priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); 410 406 if (!priv) 411 407 return -ENOMEM; ··· 453 459 if (err) 454 460 goto err_fbdev_info; 455 461 456 - err = ht16k33_keypad_probe(client, &priv->keypad); 457 - if (err) 458 - goto err_fbdev_unregister; 462 + /* Keypad */ 463 + if (client->irq > 0) { 464 + err = ht16k33_keypad_probe(client, &priv->keypad); 465 + if (err) 466 + goto err_fbdev_unregister; 467 + } 459 468 460 469 /* Backlight */ 461 470 memset(&bl_props, 0, sizeof(struct backlight_properties));