Re: [PATCH] video: fbdev: ssd1307fb: Added support to Column offset
From: Andy Shevchenko
Date: Wed May 13 2020 - 11:03:45 EST
On Wed, May 13, 2020 at 2:51 PM Rodrigo Rolim Mendes de Alencar
<455.rodrigo.alencar@xxxxxxxxx> 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)
> - 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