Skip to content

drivers: staging: fbtft: Fix fb_ssd1306 driver for 128x32 Display #6691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: rpi-6.6.y
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions drivers/staging/fbtft/fb_ssd1306.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ static void set_addr_win_64x48(struct fbtft_par *par)
write_reg(par, 0x5);
}

static void set_addr_win_128x32(struct fbtft_par *par)
{
/* Set Column Address */
write_reg(par, 0x21);
write_reg(par, 0x00);
write_reg(par, 0x7F);

/* Set Page Address */
write_reg(par, 0x22);
write_reg(par, 0x00);
write_reg(par, 0x03);
}

static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{
/* Set Lower Column Start Address for Page Addressing Mode */
Expand All @@ -144,6 +157,8 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)

if (par->info->var.xres == 64 && par->info->var.yres == 48)
set_addr_win_64x48(par);
else if (par->info->var.xres == 128 && par->info->var.yres == 32)
set_addr_win_128x32(par);
}

static int blank(struct fbtft_par *par, bool on)
Expand Down
Loading