aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2013-09-02Merge branch 'topic/api_caps' into for-linusVinod Koul1-0/+27
2013-09-02dma: replace devm_request_and_ioremap by devm_ioremap_resourceJulia Lawall1-5/+5
Use devm_ioremap_resource instead of devm_request_and_ioremap. This was done using the semantic patch scripts/coccinelle/api/devm_ioremap_resource.cocci The relevant call to platform_get_resource was manually moved down to the call to devm_ioremap_resource. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dma: ste_dma40: Fix potential null pointer dereferenceSachin Kamat1-0/+3
kcalloc can return NULL. Check the pointer before dereferencing. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dma: ste_dma40: Remove duplicate constSachin Kamat1-1/+1
'const' was added twice. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dma: imx-dma: Remove redundant NULL checkSachin Kamat1-4/+2
kfree on a NULL pointer is a no-op. Null pointer check is not necessary. Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dma: dmagengine: fix function names in commentsDaniel Mack1-2/+2
Trivial fix for function name mismatches I stumbled over. Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dma: add driver for R-Car HPB-DMACMax Filippov3-0/+662
Add support for HPB-DMAC found in Renesas R-Car SoCs, using 'shdma-base' DMA driver framework. Based on the original patch by Phil Edworthy <[email protected]>. Signed-off-by: Max Filippov <[email protected]> [Sergei: removed useless #include, sorted #include's, fixed HPB_DMA_TCR_MAX, fixed formats and removed line breaks in the dev_dbg() calls, rephrased and added IRQ # to the shdma_request_irq() failure message, added MODULE_AUTHOR(), removed '__init'/'__exit' annotations from the probe()/remove() methods, removed '__initdata' annotation from 'hpb_dmae_driver', fixed guard macro name in the header file, fixed #define ASYNCRSTR_ASRST20, added #define ASYNCRSTR_ASRST24, added the necessary runtime PM calls to the probe() and remove() methods, handled errors returned by dma_async_device_register(), beautified comments and #define's.] Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dma: k3dma: use devm_ioremap_resource() instead of devm_request_and_ioremap()Jingoo Han1-3/+3
Use devm_ioremap_resource() because devm_request_and_ioremap() is obsoleted by devm_ioremap_resource(). Signed-off-by: Jingoo Han <[email protected]> Acked-by: Zhangfei Gao <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02HID: battery: don't do DMA from stackJiri Kosina1-2/+10
Instead of using data from stack for DMA in hidinput_get_battery_property(), allocate the buffer dynamically. Cc: [email protected] Reported-by: Richard Ryniker <[email protected]> Reported-by: Alan Stern <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-02HID: roccat: add support for KonePureOptical v2Stefan Achatz3-1/+4
KonePureOptical is a KonePure with different sensor. Signed-off-by: Stefan Achatz <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-02HID: picolcd: Prevent NULL pointer dereference on _remove()Bruno Prémont2-2/+7
When picolcd is switched into bootloader mode (for FW flashing) make sure not to try to dereference NULL-pointers of feature-devices during unplug/unbind. This fixes following BUG: BUG: unable to handle kernel NULL pointer dereference at 00000298 IP: [<f811f56b>] picolcd_exit_framebuffer+0x1b/0x80 [hid_picolcd] *pde = 00000000 Oops: 0000 [#1] Modules linked in: hid_picolcd syscopyarea sysfillrect sysimgblt fb_sys_fops CPU: 0 PID: 15 Comm: khubd Not tainted 3.11.0-rc7-00002-g50d62d4 #2 EIP: 0060:[<f811f56b>] EFLAGS: 00010292 CPU: 0 EIP is at picolcd_exit_framebuffer+0x1b/0x80 [hid_picolcd] Call Trace: [<f811d1ab>] picolcd_remove+0xcb/0x120 [hid_picolcd] [<c1469b09>] hid_device_remove+0x59/0xc0 [<c13464ca>] __device_release_driver+0x5a/0xb0 [<c134653f>] device_release_driver+0x1f/0x30 [<c134603d>] bus_remove_device+0x9d/0xd0 [<c13439a5>] device_del+0xd5/0x150 [<c14696a4>] hid_destroy_device+0x24/0x60 [<c1474cbb>] usbhid_disconnect+0x1b/0x40 ... Signed-off-by: Bruno Prémont <[email protected]> Cc: [email protected] Signed-off-by: Jiri Kosina <[email protected]>
2013-09-02HID: usbhid: quirk for N-Trig DuoSense Touch ScreenVasily Titskiy2-0/+3
The DuoSense touchscreen device causes a 10 second timeout. This fix removes the delay. Signed-off-by: Vasily Titskiy <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-02HID: uhid: add devname module aliasMarcel Holtmann1-0/+1
For simple device node creation, add the devname module alias. Signed-off-by: Marcel Holtmann <[email protected]> Reviewed-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-02ACPI / LPSS: don't crash if a device has no MMIO resourcesMika Westerberg1-1/+2
Intel LPSS devices that are enumerated from ACPI have both MMIO and IRQ resources returned in their _CRS method. However, Apple Macbook Air with Haswell has LPSS devices enumerated from PCI bus instead and _CRS method returns only an interrupt number (but the device has _HID set that causes the scan handler to match it). The current ACPI / LPSS code sets pdata->dev_desc only when MMIO resource is found for the device and in case of Macbook Air it is never found. That leads to a NULL pointer dereference in register_device_clock(). Correct this by always setting the pdata->dev_desc. Reported-and-tested-by: Imre Kaloz <[email protected]> Signed-off-by: Mika Westerberg <[email protected]> Cc: 3.10+ <[email protected]> # 3.10+ Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-09-02hwrng: via - Add MODULE_DEVICE_TABLEBen Hutchings1-0/+7
via-rng currently isn't auto-loaded if built as a module. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix SHA-2 for chunks bigger than block sizeMarcelo Cerri2-2/+2
Each call to the co-processor, with exception of the last call, needs to send data that is multiple of block size. As consequence, any remaining data is kept in the internal NX context. This patch fixes a bug in the driver that causes it to save incorrect data into the context when data is bigger than the block size. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix GCM for zero length messagesMarcelo Cerri1-20/+112
The NX CGM implementation doesn't support zero length messages and the current implementation has two flaws: - When the input data length is zero, it ignores the associated data. - Even when both lengths are zero, it uses the Crypto API to encrypt a zeroed block using ctr(aes) and because of this it allocates a new transformation and sets the key for this new tfm. Both operations are intended to be used only in user context, while the cryptographic operations can be called in both user and softirq contexts. This patch replaces the nested Crypto API use and adds two special cases: - When input data and associated data lengths are zero: it uses NX ECB mode to emulate the encryption of a zeroed block using ctr(aes). - When input data is zero and associated data is available: it uses NX GMAC mode to calculate the associated data MAC. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix XCBC for zero length messagesMarcelo Cerri1-7/+77
The NX XCBC implementation doesn't support zero length messages and because of that NX is currently returning a hard-coded hash for zero length messages. However this approach is incorrect since the hash value also depends on which key is used. This patch removes the hard-coded hash and replace it with an implementation based on the RFC 3566 using ECB. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix limits to sg lists for AES-CCMFionnuala Gunter1-75/+208
This patch updates the NX driver to perform several hyper calls when necessary so that the length limits of scatter/gather lists are respected. Reviewed-by: Marcelo Cerri <[email protected]> Signed-off-by: Joy Latten <[email protected]> Signed-off-by: Fionnuala Gunter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix limits to sg lists for AES-XCBCFionnuala Gunter1-47/+66
This patch updates the NX driver to perform several hyper calls when necessary so that the length limits of scatter/gather lists are respected. Reviewed-by: Joy Latten <[email protected]> Reviewed-by: Marcelo Cerri <[email protected]> Signed-off-by: Fionnuala Gunter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix limits to sg lists for AES-GCMMarcelo Cerri1-66/+136
This patch updates the nx-aes-gcm implementation to perform several hyper calls if needed in order to always respect the length limits for scatter/gather lists. Two different limits are considered: - "ibm,max-sg-len": maximum number of bytes of each scatter/gather list. - "ibm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix limits to sg lists for AES-CTRMarcelo Cerri1-19/+31
This patch updates the nx-aes-ctr implementation to perform several hyper calls if needed in order to always respect the length limits for scatter/gather lists. Two different limits are considered: - "ibm,max-sg-len": maximum number of bytes of each scatter/gather list. - "ibm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix limits to sg lists for AES-CBCMarcelo Cerri1-23/+33
This patch updates the nx-aes-cbc implementation to perform several hyper calls if needed in order to always respect the length limits for scatter/gather lists. Two different limits are considered: - "ibm,max-sg-len": maximum number of bytes of each scatter/gather list. - "ibm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - fix limits to sg lists for AES-ECBMarcelo Cerri1-18/+30
This patch updates the nx-aes-ecb implementation to perform several hyper calls if needed in order to always respect the length limits for scatter/gather lists. Two different limits are considered: - "ibm,max-sg-len": maximum number of bytes of each scatter/gather list. - "ibm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02crypto: nx - add offset to nx_build_sg_lists()Marcelo Cerri7-9/+14
This patch includes one more parameter to nx_build_sg_lists() to skip the given number of bytes from beginning of each sg list. This is needed in order to implement the fixes for the AES modes to make them able to process larger chunks of data. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-09-02mfd: ucb1x00-core: Rewrite ucb1x00_add_dev()Lee Jones1-13/+15
Error handling is on-its-head in this function. After invoking a function we should examine the return code and return the error value if there was one. Instead, this function checks for success and goes onto provide functionality if success was received. Not so bad in a simple function like this, but in a more complex one this could end up drowning in curly brackets. Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for ↵Lee Jones1-0/+3
event name The AB8500 debugfs driver allocates memory to contain the name of a new sysfs entry, but fails to apply the proper post-allocation checks. If the device were to run out of memory, the allocation would return NULL. Without the correct checks the driver will continue to populate address NULL with the specified device name which would obviously cause a pointer dereference Oops. Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for sysfsLee Jones1-0/+3
The AB8500 debugfs driver allocates memory for a new sysfs entry, but fails to apply the proper post-allocation checks. If the device were to run out of memory, the allocation would return NULL. Without the correct checks the driver will continue to populate NULL->[show|store|...], which would obviously cause a pointer dereference Oops. Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: timberdale: Use module_pci_driverSachin Kamat1-28/+1
module_pci_driver removes some boilerplate and makes the code simple. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: timberdale: Remove redundant breakSachin Kamat1-1/+0
break after goto is unreachable. Delete it. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: timberdale: Staticize local variablesSachin Kamat1-2/+2
Local variables referenced only in this file are made static. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: ab8500-debugfs: Staticize local variablesSachin Kamat1-4/+4
Local variables referenced only in this file are made static. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: db8500-prcmu: Staticize clk_mgtSachin Kamat1-1/+1
clk_mgt is used only in this file. Make it static. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: db8500-prcmu: Use ANSI function declarationSachin Kamat1-1/+1
Silences the following warning: drivers/mfd/db8500-prcmu.c:2322:25: warning: non-ANSI function declaration of function 'prcmu_ac_sleep_req' Acked-by: Linus Walleij <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: omap-usb-host: Staticize usbhs_driver_nameSachin Kamat1-1/+1
usbhs_driver_name is used only in this file. Make it static. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-09-02mfd: 88pm805: Fix potential NULL pdata dereferenceChao Xie1-1/+1
User pass platform data to device, and platform data may be NULL. Add the check for pdata. Signed-off-by: Chao Xie <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-09-02mfd: 88pm800: Fix potential NULL pdata dereferenceChao Xie1-4/+6
User pass platform data to device, and platform data may be NULL. Add the check for pdata. Signed-off-by: Chao Xie <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-09-02Merge branch 'topic/for-asoc'Samuel Ortiz2-23/+43
2013-09-02mfd: twl6040: Use regmap for register cacheMark Brown1-13/+30
Rather then open coding a cache of the vibra control registers use the regmap cache code. Also cache the interrupt mask register, providing a small performance improvement for the interrupt code. Signed-off-by: Mark Brown <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-09-02mfd: davinci_voicecodec: Provide a regmap for register I/OMark Brown1-0/+14
This will be used to support refactoring of the ASoC CODEC driver to use a regmap. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-09-02mfd: davinci_voicecodec: Remove unused read and write functionsMark Brown1-11/+0
These functions are not referenced anywhere, nor prototyped, so just remove them. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-09-02dma: imx-sdma: Staticize sdma_driver_data structuresFabio Estevam1-6/+6
Sparse report the following warnings: drivers/dma/imx-sdma.c:330:25: warning: symbol 'sdma_imx31' was not declared. Should it be static? drivers/dma/imx-sdma.c:351:25: warning: symbol 'sdma_imx25' was not declared. Should it be static? drivers/dma/imx-sdma.c:357:25: warning: symbol 'sdma_imx35' was not declared. Should it be static? drivers/dma/imx-sdma.c:375:25: warning: symbol 'sdma_imx51' was not declared. Should it be static? drivers/dma/imx-sdma.c:395:25: warning: symbol 'sdma_imx53' was not declared. Should it be static? drivers/dma/imx-sdma.c:414:25: warning: symbol 'sdma_imx6q' was not declared. Should it be static? Make the sdma_driver_data structures static. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02pch_dma: Add MODULE_DEVICE_TABLEBen Hutchings1-0/+1
pch_dma currently isn't auto-loaded if built as a module. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dmaengine: PL08x: Add cyclic transfer supportAlban Bedel1-29/+118
Many audio interface drivers require support of cyclic transfers to work correctly, for example Samsung ASoC DMA driver. This patch adds support for cyclic transfers to the amba-pl08x driver. Signed-off-by: Alban Bedel <[email protected]> [tfiga: Rebase and slightly beautify the original patch.] Signed-off-by: Tomasz Figa <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dmaengine: PL08x: Fix reading the byte count in cctlAlban Bedel1-0/+4
There are more fields than just SWIDTH in CH_CONTROL register, so read register value must be masked in addition to shifting. Signed-off-by: Alban Bedel <[email protected]> Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dmaengine: PL08x: Add support for different maximum transfer sizeTomasz Figa1-1/+7
PL080S has separate register to store transfer size in, allowing single transfer to be much larger than in standard PL080. This patch makes the amba-pl08x driver aware of this and removes writing transfer size to reserved bits of CH_CONTROL register on PL080S, which was not a problem witn transfer sizes fitting the original bitfield of PL080, but now would overwrite other fields. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dmaengine: PL08x: Add support for PL080S variantTomasz Figa1-27/+118
PL080S is a modified version of PL080 that can be found on Samsung SoCs, such as S3C6400 and S3C6410. It has different offset of CONFIG register, separate CONTROL1 register that holds transfer size and larger maximum transfer size. Signed-off-by: Tomasz Figa <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dmaengine: PL08x: Move LLI dumping code into separate functionTomasz Figa1-17/+24
This patch refactors debugging code that dumps LLI entries by moving it into separate function, which is stubbed when VERBOSE_DEBUG is not selected. This allows us to get rid of the ugly ifdef from the body of pl08x_fill_llis_for_desc(). No functional change is introduced by this patch. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dmaengine: PL08x: Rework LLI handling to be less fragileTomasz Figa1-65/+82
Currently memory allocated for LLIs is casted to an array of structs, which is fragile and also limits the driver to a single, predefined LLI layout, while there are some variants of PL08x, which have more fields in LLI (namely PL080S with its extra CCTL2). This patch makes LLIs a sequence of 32-bit words, which is just filled with appropriate values in appropriate order and padded with required amount of dummy words (currently zero, but PL080S will make better use of this). Suggested-by: Linus Walleij <[email protected]> Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-02dmaengine: PL08x: Add support for different offset of CONFIG registerTomasz Figa1-12/+18
Some variants of PL08x (namely PL080S, found in Samsung S3C64xx SoCs) have CONFIG register at different offset. This patch makes the driver use offset from vendor data struct. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>