aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-03-27gpio: Add Spreadtrum EIC driver supportBaolin Wang3-0/+615
The Spreadtrum digital-chip EIC controller has 4 sub-modules: debounce EIC, latch EIC, async EIC and sync EIC, and each sub-module can has multiple banks and each bank contains 8 EICs. Each EIC can only be used as input mode, and has the capability to trigger interrupts when detecting input signals. Signed-off-by: Baolin Wang <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27dt-bindings: gpio: Add Spreadtrum EIC controller documentationBaolin Wang1-0/+97
This patch adds the device tree bindings for the Spreadtrum EIC controller. The EIC can be seen as a special type of GPIO, which can only be used as input mode. Signed-off-by: Baolin Wang <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe()Wei Yongjun1-0/+2
platform_get_resource() may return NULL, add proper check to avoid potential NULL dereferencing. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun <[email protected]> [[email protected]: Fixed patch to apply on current tree] Signed-off-by: Alban Bedel <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27Merge branch 'gpio-reserved-ranges' into develLinus Walleij5-11/+167
2018-03-27pinctrl: qcom: Don't allow protected pins to be requestedStephen Boyd1-3/+62
Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues and reset the device. With a DT/ACPI property to describe the set of pins that are available for use, parse the available pins and set the irq valid bits for gpiolib to know what to consider 'valid'. This should avoid any issues with gpiolib. Furthermore, implement the pinmux_ops::request function so that pinmux can also make sure to not use pins that are unavailable. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Tested-by: Timur Tabi <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpiolib: Support 'gpio-reserved-ranges' propertyStephen Boyd3-0/+86
Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues. Add support for a DT property to describe the set of GPIOs that are available for use so that higher level OSes are able to know what pins to avoid reading/writing. Non-DT platforms can add support by directly updating the chip->valid_mask. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Tested-by: Timur Tabi <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpiolib: Change bitmap allocation to kmalloc_arrayStephen Boyd1-1/+1
We don't need to clear out these bits when we set them immediately after. Use kmalloc_array() to skip clearing the bits. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Tested-by: Timur Tabi <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpiolib: Extract mask allocation into subroutineStephen Boyd1-5/+15
We're going to use similar code to allocate and set all the bits in a mask for valid gpios to use. Extract the code from the irqchip version so it can be reused. Signed-off-by: Stephen Boyd <[email protected]> Tested-by: Timur Tabi <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27dt-bindings: gpio: Add a gpio-reserved-ranges propertyStephen Boyd1-3/+4
Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues. Introduce a DT property to describe the set of GPIOs that are available for use so that higher level OSes are able to know what pins to avoid reading/writing. Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Reviewed-by: Rob Herring <[email protected]> Tested-by: Timur Tabi <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpio: mockup: fix a potential crash when creating debugfs entriesBartosz Golaszewski1-1/+1
If we failed to create the top debugfs directory, we must not try to create the child nodes. We currently only check if gpio_mockup_dbg_dir is not NULL, but it can also contain an errno if debugfs is disabled in build options. Use IS_ERR_OR_NULL() instead. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpio: pca953x: add compatibility for pcal6524 and pcal9555aH. Nikolaus Schaller2-0/+6
The Pyra-Handheld originally used the tca6424 but recently we have replaced it by the pin and package compatible pcal6524. So let's add this to the bindings and the driver. And while we are at it, the pcal9555a does not have a compatible entry either but is already supported by the device id table. Signed-off-by: H. Nikolaus Schaller <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpio: dwapb: Add support for a bus clockPhil Edworthy1-1/+19
Enable an optional bus clock provided by DT. Signed-off-by: Phil Edworthy <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpio: Remove VLA from xra1403 driverLaura Abbott1-1/+7
The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott <[email protected]> Reviewed-by: Nandor Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpio: Remove VLA from MAX3191X driverLaura Abbott1-1/+6
The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces several a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott <[email protected]> Reviewed-and-tested-by: Lukas Wunner <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-26gpio: ws16c48: Implement get_multiple callbackWilliam Breathitt Gray1-0/+47
The WinSystems WS16C48 device provides 48 lines of digital I/O accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read, the WS16C48 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the ws16c48_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-26gpio: gpio-mm: Implement get_multiple callbackWilliam Breathitt Gray1-0/+47
The Diamond Systems GPIO-MM series of devices contain two 82C55A devices, which each feature three 8-bit ports of I/O. Since eight input lines are acquired on a single port input read, the GPIO-MM GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the gpiomm_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-26gpio: 104-idi-48: Implement get_multiple callbackWilliam Breathitt Gray1-0/+47
The ACCES I/O 104-IDI-48 series of devices provides 48 optically-isolated inputs accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read, the 104-IDI-48 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idi_48_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-26gpio: 104-dio-48e: Implement get_multiple callbackWilliam Breathitt Gray1-0/+47
The ACCES I/O 104-DIO-48E series of devices contain two Programmable Peripheral Interface (PPI) chips of type 82C55, which each feature three 8-bit ports of I/O. Since eight input lines are acquired on a single port input read, the 104-DIO-48E GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the dio48e_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-26gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacksWilliam Breathitt Gray1-0/+117
The ACCES I/O PCIe-IDIO-24 series of devices provides 24 optically-isolated digital I/O accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read -- and similarly eight output lines are set on a single port output write -- the PCIe-IDIO-24 GPIO driver may improve multiple I/O reads/writes by utilizing a get_multiple/set_multiple callbacks. This patch implements the idio_24_gpio_get_multiple function which serves as the respective get_multiple callback, and implements the idio_24_gpio_set_multiple function which serves as the respective set_multiple callback. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-26gpio: pci-idio-16: Implement get_multiple callbackWilliam Breathitt Gray1-0/+50
The ACCES I/O PCI-IDIO-16 series of devices provides 16 optically-isolated digital inputs accessed via two 8-bit ports. Since eight input lines are acquired on a single port input read, the PCI-IDIO-16 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idio_16_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-26gpio: 104-idio-16: Implement get_multiple callbackWilliam Breathitt Gray1-0/+15
The ACCES I/O 104-IDIO-16 series of devices provides 16 optically-isolated digital inputs accessed via two 8-bit ports. Since eight input lines are acquired on a single port input read, the 104-IDIO-16 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idio_16_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23Documentation: gpio: Move drivers-on-gpio.txt to driver-apiJonathan Neuschäfer4-6/+4
Move gpio/drivers-on-gpio.txt to driver-api/gpio/drivers-on-gpio.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23Documentation: gpio: Move GPIO mapping documentation to driver-apiJonathan Neuschäfer3-20/+22
Move gpio/board.txt to driver-api/gpio/board.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23Documentation: gpio: Move gpiod_* consumer documentation to driver-apiJonathan Neuschäfer3-44/+44
Move gpio/consumer.txt to driver-api/gpio/consumer.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23Documentation: gpio: Move legacy documentation to driver-apiJonathan Neuschäfer3-39/+41
Move gpio/gpio-legacy.txt to driver-api/gpio/legacy.rst and make sure it builds cleanly as ReST. Also move the legacy API reference from index.rst to legacy.rst. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23Documentation: gpio: Move driver documentation to driver-apiJonathan Neuschäfer3-41/+42
Move gpio/driver.txt to driver-api/gpio/driver.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23Documentation: gpio: Move introduction to driver-apiJonathan Neuschäfer3-4/+14
Move gpio/intro.txt to driver-api/gpio/intro.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23Documentation: driver-api: Move gpio.rst to gpio/index.rstJonathan Neuschäfer2-1/+1
To make space for more files in the GPIO section, create a Documentation/driver-api/gpio/ directory. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-23MAINTAINERS: GPIO: Add Documentation/driver-api/gpio/Jonathan Neuschäfer1-0/+1
Steer patches to Documentation/driver-api/gpio/ into the right direction. Signed-off-by: Jonathan Neuschäfer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: ks8695: Include the right headerLinus Walleij1-1/+1
This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: kempld: Include the right headerLinus Walleij1-1/+1
This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: janz-ttl: Use BIT() macroLinus Walleij1-6/+7
This makes the code more readable by using the BIT() macro. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: janz-ttl: Include the right headerLinus Walleij1-1/+1
This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: it87: Include the right headerLinus Walleij1-1/+1
This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: ich: Use BIT() macroLinus Walleij1-8/+9
Using BIT() makes (1 << foo) constructions easier to read, and also account for common mistakes where bit 31 is not working because of numbers being interpreted as negative unless specified as unsigned. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: ich: Include the right headerLinus Walleij1-2/+2
This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Refrain from using GPIOF_* flags in the driver, just use 1/0 to return direction. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: htc-gpio: Include the right headerLinus Walleij2-2/+1
This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Drop the include of <linux/gpio.h> from the platform data header as well, it serves no purpose. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: grgpio: Include the right headerLinus Walleij1-2/+1
This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: ftgpio010: Drop of_gpio.h includeLinus Walleij1-1/+0
This driver does not make use of the functions in <linux/of_gpio.h> so drop this include. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: em: Use the right includeLinus Walleij1-1/+1
The Emma Mobile (EM) GPIO driver uses the too generic include <linux/gpio.h>. It is a driver so it should just use <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: ge: Drop of_gpio.h includeLinus Walleij1-1/+0
This driver does not make use of the functions in <linux/of_gpio.h> so drop this include. Signed-off-by: Linus Walleij <[email protected]>
2018-03-19gpio: dln2: Include proper headerLinus Walleij1-4/+3
This driver has no business including <linux/gpio.h>, it is a driver so include <linux/gpio/driver.h>. GPIOF_DIR_IN/GPIOF_DIR_OUT are for consumers and should not be used in drivers to use just 1/0 instead. Signed-off-by: Linus Walleij <[email protected]>
2018-03-18Merge tag 'v4.16-rc5' into develLinus Walleij1242-8414/+13451
Linux 4.16-rc5 merged into the GPIO devel branch to resolve a nasty conflict between fixes and devel in the RCAR driver. Signed-off-by: Linus Walleij <[email protected]>
2018-03-11Linux 4.16-rc5Linus Torvalds1-1/+1
2018-03-11Merge branch 'x86-pti-for-linus' of ↵Linus Torvalds17-182/+291
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86/pti updates from Thomas Gleixner: "Yet another pile of melted spectrum related updates: - Drop native vsyscall support finally as it causes more trouble than benefit. - Make microcode loading more robust. There were a few issues especially related to late loading which are now surfacing because late loading of the IB* microcodes addressing spectre issues has become more widely used. - Simplify and robustify the syscall handling in the entry code - Prevent kprobes on the entry trampoline code which lead to kernel crashes when the probe hits before CR3 is updated - Don't check microcode versions when running on hypervisors as they are considered as lying anyway. - Fix the 32bit objtool build and a coment typo" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Fix kernel crash when probing .entry_trampoline code x86/pti: Fix a comment typo x86/microcode: Synchronize late microcode loading x86/microcode: Request microcode on the BSP x86/microcode/intel: Look into the patch cache first x86/microcode: Do not upload microcode if CPUs are offline x86/microcode/intel: Writeback and invalidate caches before updating microcode x86/microcode/intel: Check microcode revision before updating sibling threads x86/microcode: Get rid of struct apply_microcode_ctx x86/spectre_v2: Don't check microcode versions when running under hypervisors x86/vsyscall/64: Drop "native" vsyscalls x86/entry/64/compat: Save one instruction in entry_INT80_compat() x86/entry: Do not special-case clone(2) in compat entry x86/syscalls: Use COMPAT_SYSCALL_DEFINEx() macros for x86-only compat syscalls x86/syscalls: Use proper syscall definition for sys_ioperm() x86/entry: Remove stale syscall prototype x86/syscalls/32: Simplify $entry == $compat entries objtool: Fix 32-bit build
2018-03-11Merge branch 'timers-urgent-for-linus' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "Just a single fix which adds a missing Kconfig dependency to avoid unmet dependency warnings" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/atmel-st: Add 'depends on HAS_IOMEM' to fix unmet dependency
2018-03-11Merge branch 'ras-urgent-for-linus' of ↵Linus Torvalds2-2/+25
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fixes from Thomas Gleixner: "Two small fixes for RAS/MCE: - Serialize sysfs changes to avoid concurrent modificaiton of underlying data - Add microcode revision to Machine Check records. This should have been there forever, but now with the broken microcode versions in the wild it has become important" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/MCE: Serialize sysfs changes x86/MCE: Save microcode revision in machine check records
2018-03-11Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds13-17/+65
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Thomas Gleixner: "Another set of perf updates: - Fix a Skylake Uncore event format declaration - Prevent perf pipe mode from crahsing which was caused by a missing buffer allocation - Make the perf top popup message which tells the user that it uses fallback mode on older kernels a debug message. - Make perf context rescheduling work correcctly - Robustify the jump error drawing in perf browser mode so it does not try to create references to NULL initialized offset entries - Make trigger_on() robust so it does not enable the trigger before everything is set up correctly to handle it - Make perf auxtrace respect the --no-itrace option so it does not try to queue AUX data for decoding. - Prevent having different number of field separators in CVS output lines when a counter is not supported. - Make the perf kallsyms man page usage behave like it does for all other perf commands. - Synchronize the kernel headers" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix ctx_event_type in ctx_resched() perf tools: Fix trigger class trigger_on() perf auxtrace: Prevent decoding when --no-itrace perf stat: Fix CVS output format for non-supported counters tools headers: Sync x86's cpufeatures.h tools headers: Sync copy of kvm UAPI headers perf record: Fix crash in pipe mode perf annotate browser: Be more robust when drawing jump arrows perf top: Fix annoying fallback message on older kernels perf kallsyms: Fix the usage on the man page perf/x86/intel/uncore: Fix Skylake UPI event format
2018-03-11Merge branch 'locking-urgent-for-linus' of ↵Linus Torvalds1-2/+3
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "rt_mutex_futex_unlock() grew a new irq-off call site, but the function assumes that its always called from irq enabled context. Use (un)lock_irqsafe() to handle the new call site correctly" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rtmutex: Make rt_mutex_futex_unlock() safe for irq-off callsites
2018-03-11Merge tag 'dmaengine-fix-4.16-rc5' of ↵Linus Torvalds3-7/+26
git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Two small fixes are for this cycle: - fix max_chunk_size for rcar-dmac for R-Car Gen3 - fix clock resource of mv_xor_v2" * tag 'dmaengine-fix-4.16-rc5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: mv_xor_v2: Fix clock resource by adding a register clock dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3