Skip to content

Commit e582e08

Browse files
committed
Merge tag 'auxdisplay-for-linus-v5.16' of git://github.com/ojeda/linux
Pull auxdisplay updates from Miguel Ojeda: - 4-digit 7-segment and quad alphanumeric display support for the ht16k33 driver, allowing the user to display and scroll text messages, from Geert Uytterhoeven. - An assortment of fixes and cleanups from Geert Uytterhoeven. - Header cleanups from Mianhan Liu. - Whitespace cleanup from Huiquan Deng. * tag 'auxdisplay-for-linus-v5.16' of git://github.com/ojeda/linux: (26 commits) MAINTAINERS: Add DT Bindings for Auxiliary Display Drivers auxdisplay: cfag12864bfb: code indent should use tabs where possible auxdisplay: ht16k33: remove superfluous header files auxdisplay: ks0108: remove superfluous header files auxdisplay: cfag12864bfb: remove superfluous header files auxdisplay: ht16k33: Make use of device properties auxdisplay: ht16k33: Add LED support dt-bindings: auxdisplay: ht16k33: Document LED subnode auxdisplay: ht16k33: Add support for segment displays auxdisplay: ht16k33: Extract frame buffer probing auxdisplay: ht16k33: Extract ht16k33_brightness_set() auxdisplay: ht16k33: Move delayed work auxdisplay: ht16k33: Add helper variable dev auxdisplay: ht16k33: Convert to simple i2c probe function auxdisplay: ht16k33: Remove unneeded error check in keypad probe() auxdisplay: ht16k33: Use HT16K33_FB_SIZE in ht16k33_initialize() auxdisplay: ht16k33: Fix frame buffer device blanking auxdisplay: ht16k33: Connect backlight to fbdev auxdisplay: linedisp: Add support for changing scroll rate auxdisplay: linedisp: Use kmemdup_nul() helper ...
2 parents e54ffb9 + 97fbb29 commit e582e08

File tree

11 files changed

+1023
-286
lines changed

11 files changed

+1023
-286
lines changed

Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,21 @@ allOf:
1414

1515
properties:
1616
compatible:
17-
const: holtek,ht16k33
17+
oneOf:
18+
- items:
19+
- enum:
20+
- adafruit,3108 # 0.56" 4-Digit 7-Segment FeatherWing Display (Red)
21+
- adafruit,3130 # 0.54" Quad Alphanumeric FeatherWing Display (Red)
22+
- const: holtek,ht16k33
23+
24+
- const: holtek,ht16k33 # Generic 16*8 LED controller with dot-matrix display
1825

1926
reg:
2027
maxItems: 1
2128

2229
refresh-rate-hz:
2330
maxItems: 1
24-
description: Display update interval in Hertz
31+
description: Display update interval in Hertz for dot-matrix displays
2532

2633
interrupts:
2734
maxItems: 1
@@ -41,17 +48,30 @@ properties:
4148
default: 16
4249
description: Initial brightness level
4350

51+
led:
52+
type: object
53+
$ref: /schemas/leds/common.yaml#
54+
unevaluatedProperties: false
55+
4456
required:
4557
- compatible
4658
- reg
47-
- refresh-rate-hz
59+
60+
if:
61+
properties:
62+
compatible:
63+
const: holtek,ht16k33
64+
then:
65+
required:
66+
- refresh-rate-hz
4867

4968
additionalProperties: false
5069

5170
examples:
5271
- |
5372
#include <dt-bindings/interrupt-controller/irq.h>
5473
#include <dt-bindings/input/input.h>
74+
#include <dt-bindings/leds/common.h>
5575
i2c1 {
5676
#address-cells = <1>;
5777
#size-cells = <0>;
@@ -73,5 +93,11 @@ examples:
7393
<MATRIX_KEY(4, 1, KEY_F9)>,
7494
<MATRIX_KEY(5, 1, KEY_F3)>,
7595
<MATRIX_KEY(6, 1, KEY_F1)>;
96+
97+
led {
98+
color = <LED_COLOR_ID_RED>;
99+
function = LED_FUNCTION_BACKLIGHT;
100+
linux,default-trigger = "backlight";
101+
};
76102
};
77103
};

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3170,6 +3170,7 @@ F: lib/*audit.c
31703170
AUXILIARY DISPLAY DRIVERS
31713171
M: Miguel Ojeda <[email protected]>
31723172
S: Maintained
3173+
F: Documentation/devicetree/bindings/auxdisplay/
31733174
F: drivers/auxdisplay/
31743175
F: include/linux/cfag12864b.h
31753176

drivers/auxdisplay/Kconfig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ config CHARLCD
2525
This is some character LCD core interface that multiple drivers can
2626
use.
2727

28+
config LINEDISP
29+
tristate "Character line display core support" if COMPILE_TEST
30+
help
31+
This is the core support for single-line character displays, to be
32+
selected by drivers that use it.
33+
2834
config HD44780_COMMON
2935
tristate "Common functions for HD44780 (and compatibles) LCD displays" if COMPILE_TEST
3036
select CHARLCD
@@ -155,20 +161,24 @@ config IMG_ASCII_LCD
155161
depends on HAS_IOMEM
156162
default y if MIPS_MALTA
157163
select MFD_SYSCON
164+
select LINEDISP
158165
help
159166
Enable this to support the simple ASCII LCD displays found on
160167
development boards such as the MIPS Boston, MIPS Malta & MIPS SEAD3
161168
from Imagination Technologies.
162169

163170
config HT16K33
164171
tristate "Holtek Ht16K33 LED controller with keyscan"
165-
depends on FB && OF && I2C && INPUT
172+
depends on FB && I2C && INPUT
166173
select FB_SYS_FOPS
167174
select FB_SYS_FILLRECT
168175
select FB_SYS_COPYAREA
169176
select FB_SYS_IMAGEBLIT
170177
select INPUT_MATRIXKMAP
171178
select FB_BACKLIGHT
179+
select NEW_LEDS
180+
select LEDS_CLASS
181+
select LINEDISP
172182
help
173183
Say yes here to add support for Holtek HT16K33, RAM mapping 16*8
174184
LED controller driver with keyscan.

drivers/auxdisplay/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ obj-$(CONFIG_HD44780) += hd44780.o
1313
obj-$(CONFIG_HT16K33) += ht16k33.o
1414
obj-$(CONFIG_PARPORT_PANEL) += panel.o
1515
obj-$(CONFIG_LCD2S) += lcd2s.o
16+
obj-$(CONFIG_LINEDISP) += line-display.o

drivers/auxdisplay/cfag12864bfb.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
#include <linux/init.h>
1313
#include <linux/module.h>
1414
#include <linux/kernel.h>
15-
#include <linux/delay.h>
1615
#include <linux/errno.h>
1716
#include <linux/fb.h>
1817
#include <linux/mm.h>
1918
#include <linux/platform_device.h>
20-
#include <linux/string.h>
21-
#include <linux/uaccess.h>
2219
#include <linux/cfag12864b.h>
2320

2421
#define CFAG12864BFB_NAME "cfag12864bfb"
@@ -41,8 +38,8 @@ static const struct fb_var_screeninfo cfag12864bfb_var = {
4138
.yres_virtual = CFAG12864B_HEIGHT,
4239
.bits_per_pixel = 1,
4340
.red = { 0, 1, 0 },
44-
.green = { 0, 1, 0 },
45-
.blue = { 0, 1, 0 },
41+
.green = { 0, 1, 0 },
42+
.blue = { 0, 1, 0 },
4643
.left_margin = 0,
4744
.right_margin = 0,
4845
.upper_margin = 0,
@@ -70,7 +67,7 @@ static const struct fb_ops cfag12864bfb_ops = {
7067
static int cfag12864bfb_probe(struct platform_device *device)
7168
{
7269
int ret = -EINVAL;
73-
struct fb_info *info = framebuffer_alloc(0, &device->dev);
70+
struct fb_info *info = framebuffer_alloc(0, &device->dev);
7471

7572
if (!info)
7673
goto none;

0 commit comments

Comments
 (0)