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_pcd8544.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_pcd8544.c')
-rw-r--r-- | kernel/drivers/staging/fbtft/fb_pcd8544.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/kernel/drivers/staging/fbtft/fb_pcd8544.c b/kernel/drivers/staging/fbtft/fb_pcd8544.c index 15da0ec77..a6b43323f 100644 --- a/kernel/drivers/staging/fbtft/fb_pcd8544.c +++ b/kernel/drivers/staging/fbtft/fb_pcd8544.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_pcd8544" #define WIDTH 84 #define HEIGHT 48 -#define TXBUFLEN (84*6) +#define TXBUFLEN (84 * 6) #define DEFAULT_GAMMA "40" /* gamma controls the contrast in this driver */ static unsigned tc; @@ -44,11 +40,8 @@ static unsigned bs = 4; module_param(bs, uint, 0); MODULE_PARM_DESC(bs, "BS[2:0] Bias voltage level: 0-7 (default: 4)"); - static int init_display(struct fbtft_par *par) { - fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); - par->fbtftops.reset(par); /* Function set @@ -101,9 +94,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); - /* H=0 Set X address of RAM * * 7:1 1 @@ -122,25 +112,24 @@ 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 (x = 0; x < 84; x++) { for (y = 0; y < 6; y++) { *buf = 0x00; for (i = 0; i < 8; i++) - *buf |= (vmem16[(y*8+i)*84+x] ? 1 : 0) << i; + *buf |= (vmem16[(y * 8 + i) * 84 + x] ? + 1 : 0) << i; buf++; } } /* Write data */ gpio_set_value(par->gpio.dc, 1); - ret = par->fbtftops.write(par, par->txbuf.buf, 6*84); + ret = par->fbtftops.write(par, par->txbuf.buf, 6 * 84); if (ret < 0) dev_err(par->info->device, "write failed and returned: %d\n", ret); @@ -150,8 +139,6 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) static int set_gamma(struct fbtft_par *par, unsigned long *curves) { - fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); - /* apply mask */ curves[0] &= 0x7F; @@ -162,7 +149,6 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves) return 0; } - static struct fbtft_display display = { .regwidth = 8, .width = WIDTH, @@ -179,6 +165,7 @@ static struct fbtft_display display = { }, .backlight = 1, }; + FBTFT_REGISTER_DRIVER(DRVNAME, "philips,pdc8544", &display); MODULE_ALIAS("spi:" DRVNAME); |