summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/solomon/ssd130x.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2022-04-06 20:29:55 +0300
committerJavier Martinez Canillas <javierm@redhat.com>2022-04-07 16:26:02 +0300
commitb0daaa5cfaa561477b8d3d10fb0697a2cce0c2ba (patch)
tree5cea3bda56de2981a6a7ce6eddbd19aafac9ce65 /drivers/gpu/drm/solomon/ssd130x.h
parent97a40c23cda5d64a1c5e968e448435084ebc8c9b (diff)
downloadlinux-b0daaa5cfaa561477b8d3d10fb0697a2cce0c2ba.tar.xz
drm/ssd130x: Support page addressing mode
On the SINO WEALTH SH1106, which is mostly compatible with the SSD1306, only the basic page addressing mode is supported. This addressing mode is not as easy to use compared to the currently supported horizontal addressing mode, as the page address has to be set prior to writing out each page, and each page must be written out separately as a result. Also, there is no way to force the column address to wrap around early, thus the column address must also be reset for each page to be accurate. Add support for this addressing mode, with a flag to choose it. This flag is designed to be set from the device info data structure, but can be extended to be explicitly forced on through a device tree property if such a need arises. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220406172956.3953-4-wens@kernel.org
Diffstat (limited to 'drivers/gpu/drm/solomon/ssd130x.h')
-rw-r--r--drivers/gpu/drm/solomon/ssd130x.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/solomon/ssd130x.h b/drivers/gpu/drm/solomon/ssd130x.h
index cd21cdccb566..f5b062576fdf 100644
--- a/drivers/gpu/drm/solomon/ssd130x.h
+++ b/drivers/gpu/drm/solomon/ssd130x.h
@@ -24,6 +24,7 @@ struct ssd130x_deviceinfo {
u32 default_dclk_frq;
int need_pwm;
int need_chargepump;
+ bool page_mode_only;
};
struct ssd130x_device {
@@ -38,6 +39,7 @@ struct ssd130x_device {
const struct ssd130x_deviceinfo *device_info;
+ unsigned page_address_mode : 1;
unsigned area_color_enable : 1;
unsigned com_invdir : 1;
unsigned com_lrremap : 1;