diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
commit | 449fcf3ab0baf3dde9952385e6789f2ca10c3980 (patch) | |
tree | 180f10c2cdd63836e47725cddc8850ca7144091a /drivers/staging/fbtft | |
parent | 3c073991eb417b6f785ddc6afbbdc369eb84aa6a (diff) | |
parent | c14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 (diff) | |
download | linux-stable-449fcf3ab0baf3dde9952385e6789f2ca10c3980.tar.gz linux-stable-449fcf3ab0baf3dde9952385e6789f2ca10c3980.tar.bz2 linux-stable-449fcf3ab0baf3dde9952385e6789f2ca10c3980.zip |
Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the "big" staging and IIO driver update for 4.15-rc1.
Lots and lots of little changes, almost all minor code cleanups as the
Outreachy application process happened during this development cycle.
Also happened was a lot of IIO driver activity, and the typec USB code
moving out of staging to drivers/usb (same commits are in the USB tree
on a persistent branch to not cause merge issues.)
Overall, it's a wash, I think we added a few hundred more lines than
removed, but really only a few thousand were modified at all.
All of these have been in linux-next for a while. There might be a
merge issue with Al's vfs tree in the pi433 driver (take his changes,
they are always better), and the media tree with some of the odd
atomisp cleanups (take the media tree's version)"
* tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
staging: lustre: add SPDX identifiers to all lustre files
staging: greybus: Remove redundant license text
staging: greybus: add SPDX identifiers to all greybus driver files
staging: ccree: simplify ioread/iowrite
staging: ccree: simplify registers access
staging: ccree: simplify error handling logic
staging: ccree: remove dead code
staging: ccree: handle limiting of DMA masks
staging: ccree: copy IV to DMAable memory
staging: fbtft: remove redundant initialization of buf
staging: sm750fb: Fix parameter mistake in poke32
staging: wilc1000: Fix bssid buffer offset in Txq
staging: fbtft: fb_ssd1331: fix mirrored display
staging: android: Fix checkpatch.pl error
staging: greybus: loopback: convert loopback to use generic async operations
staging: greybus: operation: add private data with get/set accessors
staging: greybus: loopback: Fix iteration count on async path
staging: greybus: loopback: Hold per-connection mutex across operations
staging: greybus/loopback: use ktime_get() for time intervals
staging: fsl-dpaa2/eth: Extra headroom in RX buffers
...
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r-- | drivers/staging/fbtft/fb_ra8875.c | 10 | ||||
-rw-r--r-- | drivers/staging/fbtft/fb_ssd1331.c | 8 | ||||
-rw-r--r-- | drivers/staging/fbtft/fb_uc1611.c | 2 | ||||
-rw-r--r-- | drivers/staging/fbtft/fb_uc1701.c | 2 | ||||
-rw-r--r-- | drivers/staging/fbtft/fbtft-bus.c | 24 |
5 files changed, 26 insertions, 20 deletions
diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c index a899614ce829..6d1cad85957b 100644 --- a/drivers/staging/fbtft/fb_ra8875.c +++ b/drivers/staging/fbtft/fb_ra8875.c @@ -253,7 +253,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...) static int write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len) { u16 *vmem16; - __be16 *txbuf16 = par->txbuf.buf; + __be16 *txbuf16; size_t remain; size_t to_copy; size_t tx_array_size; @@ -267,10 +267,10 @@ static int write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len) remain = len / 2; vmem16 = (u16 *)(par->info->screen_buffer + offset); tx_array_size = par->txbuf.len / 2; - txbuf16 = par->txbuf.buf + 1; - tx_array_size -= 2; - *(u8 *)(par->txbuf.buf) = 0x00; - startbyte_size = 1; + txbuf16 = par->txbuf.buf + 1; + tx_array_size -= 2; + *(u8 *)(par->txbuf.buf) = 0x00; + startbyte_size = 1; while (remain) { to_copy = min(tx_array_size, remain); diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c index 9aa9864fcf30..e4a759b54ba0 100644 --- a/drivers/staging/fbtft/fb_ssd1331.c +++ b/drivers/staging/fbtft/fb_ssd1331.c @@ -26,7 +26,13 @@ static int init_display(struct fbtft_par *par) par->fbtftops.reset(par); write_reg(par, 0xae); /* Display Off */ - write_reg(par, 0xa0, 0x70 | (par->bgr << 2)); /* Set Colour Depth */ + + /* Set Column Address Mapping, COM Scan Direction and Colour Depth */ + if (par->info->var.rotate == 180) + write_reg(par, 0xa0, 0x60 | (par->bgr << 2)); + else + write_reg(par, 0xa0, 0x72 | (par->bgr << 2)); + write_reg(par, 0x72); /* RGB colour */ write_reg(par, 0xa1, 0x00); /* Set Display Start Line */ write_reg(par, 0xa2, 0x00); /* Set Display Offset */ diff --git a/drivers/staging/fbtft/fb_uc1611.c b/drivers/staging/fbtft/fb_uc1611.c index 48e3b3fd9fed..8eb5e7f10fb5 100644 --- a/drivers/staging/fbtft/fb_uc1611.c +++ b/drivers/staging/fbtft/fb_uc1611.c @@ -225,7 +225,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) u8 *buf8 = par->txbuf.buf; u16 *buf16 = par->txbuf.buf; int line_length = par->info->fix.line_length; - int y_start = (offset / line_length); + int y_start = offset / line_length; int y_end = (offset + len - 1) / line_length; int x, y, i; int ret = 0; diff --git a/drivers/staging/fbtft/fb_uc1701.c b/drivers/staging/fbtft/fb_uc1701.c index b78045fe5393..78899a172c7e 100644 --- a/drivers/staging/fbtft/fb_uc1701.c +++ b/drivers/staging/fbtft/fb_uc1701.c @@ -127,7 +127,7 @@ 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_buffer; - u8 *buf = par->txbuf.buf; + u8 *buf; int x, y, i; int ret = 0; diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 2a8eef15c439..a263bce260c9 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -11,33 +11,33 @@ * *****************************************************************************/ -#define define_fbtft_write_reg(func, type, modifier) \ +#define define_fbtft_write_reg(func, buffer_type, data_type, modifier) \ void func(struct fbtft_par *par, int len, ...) \ { \ va_list args; \ int i, ret; \ int offset = 0; \ - type *buf = (type *)par->buf; \ + buffer_type *buf = (buffer_type *)par->buf; \ \ if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) { \ va_start(args, len); \ for (i = 0; i < len; i++) { \ - buf[i] = (type)va_arg(args, unsigned int); \ + buf[i] = modifier((data_type)va_arg(args, unsigned int)); \ } \ va_end(args); \ - fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, type, buf, len, "%s: ", __func__); \ + fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, buffer_type, buf, len, "%s: ", __func__); \ } \ \ va_start(args, len); \ \ if (par->startbyte) { \ *(u8 *)par->buf = par->startbyte; \ - buf = (type *)(par->buf + 1); \ + buf = (buffer_type *)(par->buf + 1); \ offset = 1; \ } \ \ - *buf = modifier((type)va_arg(args, unsigned int)); \ - ret = fbtft_write_buf_dc(par, par->buf, sizeof(type) + offset, 0); \ + *buf = modifier((data_type)va_arg(args, unsigned int)); \ + ret = fbtft_write_buf_dc(par, par->buf, sizeof(data_type) + offset, 0); \ if (ret < 0) \ goto out; \ len--; \ @@ -48,18 +48,18 @@ void func(struct fbtft_par *par, int len, ...) \ if (len) { \ i = len; \ while (i--) \ - *buf++ = modifier((type)va_arg(args, unsigned int)); \ + *buf++ = modifier((data_type)va_arg(args, unsigned int)); \ fbtft_write_buf_dc(par, par->buf, \ - len * (sizeof(type) + offset), 1); \ + len * (sizeof(data_type) + offset), 1); \ } \ out: \ va_end(args); \ } \ EXPORT_SYMBOL(func); -define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, ) -define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16) -define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, ) +define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, ) +define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16) +define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, ) void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) { |