Skip to content

Commit

Permalink
Merge tag 'auxdisplay-for-linus-v5.11' of git://github.com/ojeda/linux
Browse files Browse the repository at this point in the history
Pull auxdisplay updates from Miguel Ojeda:
 "A bigger set of changes than usual for auxdisplay. There have been
  quite a few changes in auxdisplay thanks to a refactor by Lars
  Poeschel to share code in order to introduce a new driver.

  Summary:

   - Significant refactor work to make charlcd independent of device,
     i.e. hd44780 (Lars Poeschel)

   - New driver: lcd2s (Lars Poeschel)

   - Fixes on top of the rework while being tested in -next (Lars
     Poeschel, Dan Carpenter and kernel test robot)"

* tag 'auxdisplay-for-linus-v5.11' of git://github.com/ojeda/linux: (30 commits)
  auxdisplay: panel: Remove redundant charlcd_ops structures
  auxdisplay: panel: Fix missing print function pointer
  auxdisplay: fix platform_no_drv_owner.cocci warnings
  auxdisplay: fix use after free in lcd2s_i2c_remove()
  auxdisplay: hd44780_common: Fix build error
  auxdisplay: add a driver for lcd2s character display
  auxdisplay: lcd2s DT binding doc
  auxdisplay: charlcd: Do not print chars at end of line
  auxdisplay: Change gotoxy calling interface
  auxdisplay: charlcd: replace last device specific stuff
  auxdisplay: hd44780: Remove clear_fast
  auxdisplay: hd44780_common: Reduce clear_display timeout
  auxdisplay: Call charlcd_backlight in place
  auxdisplay: Move char redefine code to hd44780_common
  auxdisplay: cleanup unnecessary hd44780 code in charlcd
  auxdisplay: implement various hd44780_common_ functions
  auxdisplay: Move init_display to hd44780_common
  auxdisplay: Make use of enum for backlight on / off
  auxdisplay: make charlcd_backlight visible to hd44780_common
  auxdisplay: Move clear_display to hd44780_common
  ...
  • Loading branch information
torvalds committed Dec 14, 2020
2 parents 1d36dff + 351dcac commit bcc68bd
Show file tree
Hide file tree
Showing 11 changed files with 1,218 additions and 464 deletions.
58 changes: 58 additions & 0 deletions Documentation/devicetree/bindings/auxdisplay/modtronix,lcd2s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/auxdisplay/modtronix,lcd2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Modtronix engineering LCD2S Character LCD Display

maintainers:
- Lars Poeschel <poeschel@lemonage.de>

description:
The LCD2S is a Character LCD Display manufactured by Modtronix Engineering.
The display supports a serial I2C and SPI interface. The driver currently
only supports the I2C interface.

properties:
compatible:
const: modtronix,lcd2s

reg:
maxItems: 1
description:
I2C bus address of the display.

display-height-chars:
description: Height of the display, in character cells.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 4

display-width-chars:
description: Width of the display, in character cells.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 16
maximum: 20

required:
- compatible
- reg
- display-height-chars
- display-width-chars

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
lcd2s: auxdisplay@28 {
compatible = "modtronix,lcd2s";
reg = <0x28>;
display-height-chars = <4>;
display-width-chars = <20>;
};
};
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ patternProperties:
description: MiraMEMS Sensing Technology Co., Ltd.
"^mitsubishi,.*":
description: Mitsubishi Electric Corporation
"^modtronix,.*":
description: Modtronix Engineering
"^mosaixtech,.*":
description: Mosaix Technologies, Inc.
"^motorola,.*":
Expand Down
33 changes: 31 additions & 2 deletions drivers/auxdisplay/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,29 @@ menuconfig AUXDISPLAY

if AUXDISPLAY

config CHARLCD
tristate "Character LCD core support" if COMPILE_TEST
help
This is the base system for character-based LCD displays.
It makes no sense to have this alone, you select your display driver
and if it needs the charlcd core, it will select it automatically.
This is some character LCD core interface that multiple drivers can
use.

config HD44780_COMMON
tristate "Common functions for HD44780 (and compatibles) LCD displays" if COMPILE_TEST
select CHARLCD
help
This is a module with the common symbols for HD44780 (and compatibles)
displays. This is the code that multiple other modules use. It is not
useful alone. If you have some sort of HD44780 compatible display,
you very likely use this. It is selected automatically by selecting
your concrete display.

config HD44780
tristate "HD44780 Character LCD support"
depends on GPIOLIB || COMPILE_TEST
select CHARLCD
select HD44780_COMMON
help
Enable support for Character LCDs using a HD44780 controller.
The LCD is accessible through the /dev/lcd char device (10, 156).
Expand Down Expand Up @@ -154,6 +173,16 @@ config HT16K33
Say yes here to add support for Holtek HT16K33, RAM mapping 16*8
LED controller driver with keyscan.

config LCD2S
tristate "lcd2s 20x4 character display over I2C console"
depends on I2C
select CHARLCD
help
This is a driver that lets you use the lcd2s 20x4 character display
from Modtronix engineering as a console output device. The display
is a simple single color character display. You have to connect it
to an I2C bus.

config ARM_CHARLCD
bool "ARM Ltd. Character LCD Driver"
depends on PLAT_VERSATILE
Expand All @@ -167,7 +196,7 @@ config ARM_CHARLCD
menuconfig PARPORT_PANEL
tristate "Parallel port LCD/Keypad Panel support"
depends on PARPORT
select CHARLCD
select HD44780_COMMON
help
Say Y here if you have an HD44780 or KS-0074 LCD connected to your
parallel port. This driver also features 4 and 6-key keypads. The LCD
Expand Down
2 changes: 2 additions & 0 deletions drivers/auxdisplay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
#

obj-$(CONFIG_CHARLCD) += charlcd.o
obj-$(CONFIG_HD44780_COMMON) += hd44780_common.o
obj-$(CONFIG_ARM_CHARLCD) += arm-charlcd.o
obj-$(CONFIG_KS0108) += ks0108.o
obj-$(CONFIG_CFAG12864B) += cfag12864b.o cfag12864bfb.o
obj-$(CONFIG_IMG_ASCII_LCD) += img-ascii-lcd.o
obj-$(CONFIG_HD44780) += hd44780.o
obj-$(CONFIG_HT16K33) += ht16k33.o
obj-$(CONFIG_PARPORT_PANEL) += panel.o
obj-$(CONFIG_LCD2S) += lcd2s.o
Loading

0 comments on commit bcc68bd

Please sign in to comment.