diff options
author | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-11 10:41:07 +0300 |
---|---|---|
committer | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-13 08:17:18 +0300 |
commit | e09b41010ba33a20a87472ee821fa407a5b8da36 (patch) | |
tree | d10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/staging/fbtft/fb_uc1701.c | |
parent | f93b97fd65072de626c074dbe099a1fff05ce060 (diff) |
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page.
During the rebasing, the following patch collided:
Force tick interrupt and get rid of softirq magic(I70131fb85).
Collisions have been removed because its logic was found on the
source already.
Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769
Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/staging/fbtft/fb_uc1701.c')
-rw-r--r-- | kernel/drivers/staging/fbtft/fb_uc1701.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/kernel/drivers/staging/fbtft/fb_uc1701.c b/kernel/drivers/staging/fbtft/fb_uc1701.c index 26d669b57..212908e39 100644 --- a/kernel/drivers/staging/fbtft/fb_uc1701.c +++ b/kernel/drivers/staging/fbtft/fb_uc1701.c @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/module.h> @@ -33,7 +29,7 @@ #define DRVNAME "fb_uc1701" #define WIDTH 102 #define HEIGHT 64 -#define PAGES (HEIGHT/8) +#define PAGES (HEIGHT / 8) /* 1: Display on/off */ #define LCD_DISPLAY_ENABLE 0xAE @@ -73,11 +69,8 @@ /* column offset for bottom view orientation */ #define SHIFT_ADDR_TOPVIEW 30 - static int init_display(struct fbtft_par *par) { - fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); - par->fbtftops.reset(par); /* softreset of LCD */ @@ -121,7 +114,7 @@ static int init_display(struct fbtft_par *par) /* advanced program control */ write_reg(par, LCD_ADV_PROG_CTRL); - write_reg(par, LCD_ADV_PROG_CTRL2|LCD_TEMPCOMP_HIGH); + write_reg(par, LCD_ADV_PROG_CTRL2 | LCD_TEMPCOMP_HIGH); /* enable display */ write_reg(par, LCD_DISPLAY_ENABLE | 1); @@ -131,8 +124,6 @@ static int init_display(struct fbtft_par *par) static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) { - fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par, "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye); - /* goto address */ /* LCD_PAGE_ADDRESS | ((page) & 0x1F), (((col)+SHIFT_ADDR_NORMAL) & 0x0F), @@ -150,25 +141,25 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) { - u16 *vmem16 = (u16 *)par->info->screen_base; + u16 *vmem16 = (u16 *)par->info->screen_buffer; u8 *buf = par->txbuf.buf; int x, y, i; int ret = 0; - fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s()\n", __func__); - for (y = 0; y < PAGES; y++) { buf = par->txbuf.buf; for (x = 0; x < WIDTH; x++) { *buf = 0x00; for (i = 0; i < 8; i++) - *buf |= (vmem16[((y*8*WIDTH)+(i*WIDTH))+x] ? 1 : 0) << i; + *buf |= (vmem16[((y * 8 * WIDTH) + + (i * WIDTH)) + x] ? + 1 : 0) << i; buf++; } /* LCD_PAGE_ADDRESS | ((page) & 0x1F), (((col)+SHIFT_ADDR_NORMAL) & 0x0F), LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */ - write_reg(par, LCD_PAGE_ADDRESS|(u8)y); + write_reg(par, LCD_PAGE_ADDRESS | (u8)y); /* LCD_PAGE_ADDRESS | ((page) & 0x1F), (((col)+SHIFT_ADDR_NORMAL) & 0x0F), LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */ @@ -189,7 +180,6 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) return ret; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -201,6 +191,7 @@ static struct fbtft_display display = { }, .backlight = 1, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "UltraChip,uc1701", &display); MODULE_ALIAS("spi:" DRVNAME); |