diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 12:14:01 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 12:14:01 -0800 |
commit | caa59428971d5ad81d19512365c9ba580d83268c (patch) | |
tree | cd9615719bad9a97f02bb5bc1021396a1b484762 /drivers/staging/fbtft/fbtft-core.c | |
parent | b2064617c74f301dab1448f1f9c8dbb3c8021058 (diff) | |
parent | 0a441275018b69deffd35bc22a84fd51c54d7d85 (diff) | |
download | linux-caa59428971d5ad81d19512365c9ba580d83268c.tar.bz2 |
Merge tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/iio driver updates from Greg KH:
"Here is the big staging and iio driver patchsets for 4.11-rc1.
We almost broke even this time around, with only a few thousand lines
added overall, as we removed the old and obsolete i4l code, but added
some new drivers for the RPi platform, as well as adding some new IIO
drivers.
All of these have been in linux-next for a while with no reported
issues"
* tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (669 commits)
Staging: vc04_services: Fix the "space prohibited" code style errors
Staging: vc04_services: Fix the "wrong indent" code style errors
staging: octeon: Use net_device_stats from struct net_device
Staging: rtl8192u: ieee80211: ieee80211.h - style fix
Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fix
Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fix
Staging: rtl8192u: ieee80211: ieee80211_module.c - style fix
Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fix
Staging: rtl8192u: r8192U.h - style fix
Staging: rtl8192u: r8192U_core.c - style fix
Staging: rtl8192u: r819xU_cmdpkt.c - style fix
staging: rtl8192u: blank lines aren't necessary before a close brace '}'
staging: rtl8192u: Adding space after enum and struct definition
staging: rtl8192u: Adding space after struct definition
Staging: ks7010: Add required and preferred spaces around operators
Staging: ks7010: ks*: Remove redundant blank lines
Staging: ks7010: ks*: Add missing blank lines after declarations
staging: visorbus, replace init_timer with setup_timer
staging: vt6656: rxtx.c Removed multiple dereferencing
staging: vt6656: Alignment match open parenthesis
...
Diffstat (limited to 'drivers/staging/fbtft/fbtft-core.c')
-rw-r--r-- | drivers/staging/fbtft/fbtft-core.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index bbe89c9c4fb9..7c8af29cdb75 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -32,7 +32,6 @@ #include <linux/backlight.h> #include <linux/platform_device.h> #include <linux/spinlock.h> -#include <linux/dma-mapping.h> #include <linux/of.h> #include <linux/of_gpio.h> #include <video/mipi_display.h> @@ -41,15 +40,9 @@ #include "internal.h" static unsigned long debug; -module_param(debug, ulong, 0); +module_param(debug, ulong, 0000); MODULE_PARM_DESC(debug, "override device debug level"); -#ifdef CONFIG_HAS_DMA -static bool dma = true; -module_param(dma, bool, 0); -MODULE_PARM_DESC(dma, "Use DMA buffer"); -#endif - void fbtft_dbg_hex(const struct device *dev, int groupsize, void *buf, size_t len, const char *fmt, ...) { @@ -337,10 +330,10 @@ static void fbtft_reset(struct fbtft_par *par) if (par->gpio.reset == -1) return; fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__); - gpio_set_value(par->gpio.reset, 0); - udelay(20); - gpio_set_value(par->gpio.reset, 1); - mdelay(120); + gpio_set_value_cansleep(par->gpio.reset, 0); + usleep_range(20, 40); + gpio_set_value_cansleep(par->gpio.reset, 1); + msleep(120); } static void fbtft_update_display(struct fbtft_par *par, unsigned int start_line, @@ -668,7 +661,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, int vmem_size, i; s16 *init_sequence = display->init_sequence; char *gamma = display->gamma; - unsigned long *gamma_curves = NULL; + u32 *gamma_curves = NULL; /* sanity check */ if (display->gamma_num * display->gamma_len > @@ -836,17 +829,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, #endif if (txbuflen > 0) { -#ifdef CONFIG_HAS_DMA - if (dma) { - dev->coherent_dma_mask = ~0; - txbuf = dmam_alloc_coherent(dev, txbuflen, - &par->txbuf.dma, GFP_DMA); - } else -#endif - { - txbuf = devm_kzalloc(par->info->device, - txbuflen, GFP_KERNEL); - } + txbuf = devm_kzalloc(par->info->device, txbuflen, GFP_KERNEL); if (!txbuf) goto alloc_fail; par->txbuf.buf = txbuf; @@ -975,8 +958,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info) fbtft_sysfs_init(par); if (par->txbuf.buf) - sprintf(text1, ", %zu KiB %sbuffer memory", - par->txbuf.len >> 10, par->txbuf.dma ? "DMA " : ""); + sprintf(text1, ", %zu KiB buffer memory", par->txbuf.len >> 10); if (spi) sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num, spi->chip_select, spi->max_speed_hz / 1000000); |