Marcus Folkesson
7e73cefd2b
drm/sitronix/st7571-i2c: remove unneeded semicolon
...
Fix style issue reported by Kernel test robot.
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202510221125.Cg0sM4xJ-lkp@intel.com/
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20251022-st7571-semicolon-v1-1-83d322618ff4@gmail.com
2025-10-22 09:56:52 +02:00
Marcus Folkesson
eb0ed2ad33
drm/sitronix/st7571-i2c: reset position before clearing display
...
We cannot know where the write pointer is, always reset position to
(0,0) before clearing display.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://lore.kernel.org/r/20250913-st7571-reset-v1-1-ae5f58acdf8d@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-10-03 12:01:50 +02:00
Marcus Folkesson
100d457c0f
drm/st7571-i2c: add support for 2bit grayscale for XRGB8888
...
Add support for 2bit grayscale and use it for XRGB8888 when grayscale is
supported.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20250721-st7571-format-v2-6-159f4134098c@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-09-01 15:35:29 +02:00
Marcus Folkesson
e61c35157d
drm/st7571-i2c: add support for inverted pixel format
...
Depending on which display that is connected to the controller, an
"1" means either a black or a white pixel.
The supported formats (R1/R2/XRGB8888) expects the pixels
to map against (4bit):
00 => Black
01 => Dark Gray
10 => Light Gray
11 => White
If this is not what the display map against, make it possible to invert
the pixels.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20250721-st7571-format-v2-4-159f4134098c@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-09-01 15:26:44 +02:00
Marcus Folkesson
c4baa2d987
drm/st7571-i2c: correct pixel data format description
...
The comment describes the pixel data format as stated in
the st7571 datasheet, which is not necessary the same
as for the connected display.
Instead, describe the expected pixel data format which is used for
R1/R2/XRGB8888.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20250721-st7571-format-v2-1-159f4134098c@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-09-01 15:26:43 +02:00
Javier Martinez Canillas
1c936e8592
drm/sitronix/st7571-i2c: Make st7571_panel_data variables static const
...
The kernel test robot reported that sparse gives the following warnings:
make C=2 M=drivers/gpu/drm/sitronix/
CC [M] st7571-i2c.o
CHECK st7571-i2c.c
st7571-i2c.c:1027:26: warning: symbol 'st7567_config' was not declared. Should it be static?
st7571-i2c.c:1039:26: warning: symbol 'st7571_config' was not declared. Should it be static?
MODPOST Module.symvers
LD [M] st7571-i2c.ko
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202507180503.nfyD9uRv-lkp@intel.com
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Link: https://lore.kernel.org/r/20250718152534.729770-1-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-09-01 11:27:31 +02:00
Javier Martinez Canillas
a55863ba4c
drm/sitronix/st7571-i2c: Add support for the ST7567 Controller
...
The Sitronix ST7567 is a monochrome Dot Matrix LCD Controller that has SPI,
I2C and parallel interfaces. The st7571-i2c driver only has support for I2C
so displays using other transport interfaces are currently not supported.
The DRM_FORMAT_R1 pixel format and data commands are the same than what
is used by the ST7571 controller, so only is needed a different callback
that implements the expected initialization sequence for the ST7567 chip.
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250715110411.448343-6-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-07-16 12:12:39 +02:00
Javier Martinez Canillas
d9ace6d550
drm/sitronix/st7571-i2c: Add an indirection level to parse DT
...
Other Sitronix display controllers might need a different parsing DT
logic, so lets add a .parse_dt callback to struct st7571_panel_data.
Suggested-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20250715110411.448343-4-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-07-16 12:12:38 +02:00
Javier Martinez Canillas
720799d946
drm/sitronix/st7571-i2c: Log probe deferral cause for GPIO get failure
...
The driver already uses the dev_err_probe() helper (that only prints error
messages for the -EPROBE_DEFER case) when fails to get any other resource.
Also do the same when it fails to obtain the reset GPIO.
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20250715110411.448343-3-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-07-16 12:12:38 +02:00
Javier Martinez Canillas
1d043d6c00
drm/sitronix/st7571-i2c: Fix encoder callbacks function names
...
It seems the driver took some inspiration from ssd130x and some of the
functions (encoder callbacks) were not renamed to use a st7571_ prefix.
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://lore.kernel.org/r/20250715110411.448343-2-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-07-16 12:12:38 +02:00
Marcus Folkesson
9b8f32002c
drm/sitronix: move tiny Sitronix drivers to their own subdir
...
We start to have support many Sitronix displays in the tiny directory,
and we expect more to come.
Move them to their own subdirectory.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Suggested-by: Javier Martinez Canillas <javierm@redhat.com >
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250512-sitronix-v3-1-bbf6cc413698@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-05-12 10:26:40 +02:00