Thread (4 messages) flat view 4 messages, 4 authors, 2020-05-13

Re: [PATCH] video: fbdev: ssd1307fb: Added support to Column offset

From: Andy Shevchenko <hidden>
Date: 2020-05-13 15:03:44
Also in: lkml

On Wed, May 13, 2020 at 2:51 PM Rodrigo Rolim Mendes de Alencar
[off-list ref] wrote:
This patch provides support for displays like VGM128064B0W10,
which requires a column offset of 2, i.e., its segments starts
in SEG2 and ends in SEG129.
You forgot
1) version of the patch (series) to be bumped
2) Cc to fbdev maintainer (I did here FYI)
quoted hunk ↗ jump to hunk
-       ret = ssd1307fb_write_cmd(par->client, 0x0);
+       ret = ssd1307fb_write_cmd(par->client, par->col_offset);
        if (ret < 0)
                return ret;

-       ret = ssd1307fb_write_cmd(par->client, par->width - 1);
+       ret = ssd1307fb_write_cmd(par->client, par->col_offset + par->width - 1);
        if (ret < 0)
                return ret;
@@ -626,6 +627,9 @@ static int ssd1307fb_probe(struct i2c_client *client)
        if (device_property_read_u32(dev, "solomon,page-offset", &par->page_offset))
                par->page_offset = 1;

+       if (of_property_read_u32(node, "solomon,col-offset", &par->col_offset))
+               par->col_offset = 0;
This won't work on non-OF systems, but easy to fix: simple see around
and do in the same way.
        if (device_property_read_u32(dev, "solomon,com-offset", &par->com_offset))
                par->com_offset = 0;
-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help