mirror of https://gitee.com/openkylin/linux.git
A set of auxdisplay fixes and improvements from Geert Uytterhoeven.
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmArjR4ACgkQGXyLc2ht IW2ipw/7BD0YPmDDyLfDebdBlm5in63kiIkzZBLyT9Wj/GkPEd+KrzFBcNupyL5J wWsNgO9UqwEAXmWYWh3idtXCZGDzWQrdvmibahtFyjco3UwSQLeZkhXCL5ZpIjO+ mwHIUJbs1SXYcSbY+uk2cLOW5FLw/wGiTj//LFdrFov4F3Sxj2ngdqd1mvMKrY19 2gZwzUMB+tFoagFw6q+SUD5O2s/fU/zTO4OIORvQYQY3ohW9VGjCNRw862mD4faU 9WjuJFZQcRA+AaW/6TYgGSUG0cVBV9uahPBSFvrE/Hyd+uiHQNI8GGiAPBccp5jo SCy6dd7MJoYj8m1cy0P3NHDkh4ZUCUtf476YH+ngQzxJcwy0e0OdxnYVdug5whDn MsCnD2O32lXgHS0+q7w79KAGFOfszUg4hKLXQCwrvU5Ie1ANcM6+ZvCqdWqppzVi cefuN2Rux8Ic4dcqYF0XtEQQ6doMOQwctS4xSSvBRa4BYoI50sK6r9UaxpVhodw7 52bKJpEQGsbfZpVs/eJEUINeiFNnb0+Uy02d8VB4MNaIlKhPd4xjskAKfbtgW9Vm wH/cp9IHAKYI2+ruOyPnW+5SEMizwe8knH/AlJwNg48w9d2H1/vEufM3HHRHhy5H GPoQJAStNd3yXEPhIDoaNAEhVGqa3/En8RxaWNBIQftswTkNJlw= =zJEN -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
66615c4ee2
|
@ -0,0 +1,77 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/auxdisplay/holtek,ht16k33.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Holtek HT16K33 RAM mapping 16*8 LED controller with keyscan
|
||||
|
||||
maintainers:
|
||||
- Robin van der Gracht <robin@protonic.nl>
|
||||
|
||||
allOf:
|
||||
- $ref: "/schemas/input/matrix-keymap.yaml#"
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: holtek,ht16k33
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
refresh-rate-hz:
|
||||
maxItems: 1
|
||||
description: Display update interval in Hertz
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
debounce-delay-ms:
|
||||
maxItems: 1
|
||||
description: Debouncing interval time in milliseconds
|
||||
|
||||
linux,keymap: true
|
||||
|
||||
linux,no-autorepeat:
|
||||
description: Disable keyrepeat
|
||||
|
||||
default-brightness-level:
|
||||
minimum: 1
|
||||
maximum: 16
|
||||
default: 16
|
||||
description: Initial brightness level
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- refresh-rate-hz
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
i2c1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ht16k33: ht16k33@70 {
|
||||
compatible = "holtek,ht16k33";
|
||||
reg = <0x70>;
|
||||
refresh-rate-hz = <20>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
|
||||
debounce-delay-ms = <50>;
|
||||
linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>,
|
||||
<MATRIX_KEY(3, 0, KEY_F8)>,
|
||||
<MATRIX_KEY(4, 0, KEY_F10)>,
|
||||
<MATRIX_KEY(5, 0, KEY_F4)>,
|
||||
<MATRIX_KEY(6, 0, KEY_F2)>,
|
||||
<MATRIX_KEY(2, 1, KEY_F5)>,
|
||||
<MATRIX_KEY(3, 1, KEY_F7)>,
|
||||
<MATRIX_KEY(4, 1, KEY_F9)>,
|
||||
<MATRIX_KEY(5, 1, KEY_F3)>,
|
||||
<MATRIX_KEY(6, 1, KEY_F1)>;
|
||||
};
|
||||
};
|
|
@ -1,40 +0,0 @@
|
|||
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).
|
||||
|
||||
Example:
|
||||
|
||||
&i2c1 {
|
||||
ht16k33: ht16k33@70 {
|
||||
compatible = "holtek,ht16k33";
|
||||
reg = <0x70>;
|
||||
refresh-rate-hz = <20>;
|
||||
debounce-delay-ms = <50>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
|
||||
linux,keymap = <
|
||||
MATRIX_KEY(2, 0, KEY_F6)
|
||||
MATRIX_KEY(3, 0, KEY_F8)
|
||||
MATRIX_KEY(4, 0, KEY_F10)
|
||||
MATRIX_KEY(5, 0, KEY_F4)
|
||||
MATRIX_KEY(6, 0, KEY_F2)
|
||||
MATRIX_KEY(2, 1, KEY_F5)
|
||||
MATRIX_KEY(3, 1, KEY_F7)
|
||||
MATRIX_KEY(4, 1, KEY_F9)
|
||||
MATRIX_KEY(5, 1, KEY_F3)
|
||||
MATRIX_KEY(6, 1, KEY_F1)
|
||||
>;
|
||||
};
|
||||
};
|
|
@ -8141,7 +8141,7 @@ F: net/hsr/
|
|||
HT16K33 LED CONTROLLER DRIVER
|
||||
M: Robin van der Gracht <robin@protonic.nl>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/display/ht16k33.txt
|
||||
F: Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml
|
||||
F: drivers/auxdisplay/ht16k33.c
|
||||
|
||||
HTCPEN TOUCHSCREEN DRIVER
|
||||
|
|
|
@ -507,6 +507,3 @@ config PANEL
|
|||
depends on PARPORT
|
||||
select AUXDISPLAY
|
||||
select PARPORT_PANEL
|
||||
|
||||
config CHARLCD
|
||||
tristate "Character LCD core support" if COMPILE_TEST
|
||||
|
|
|
@ -117,8 +117,7 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv)
|
|||
{
|
||||
struct ht16k33_fbdev *fbdev = &priv->fbdev;
|
||||
|
||||
schedule_delayed_work(&fbdev->work,
|
||||
msecs_to_jiffies(HZ / fbdev->refresh_rate));
|
||||
schedule_delayed_work(&fbdev->work, HZ / fbdev->refresh_rate);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -402,11 +401,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 +453,12 @@ static int ht16k33_probe(struct i2c_client *client,
|
|||
if (err)
|
||||
goto err_fbdev_info;
|
||||
|
||||
/* 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));
|
||||
|
|
Loading…
Reference in New Issue