Age | Commit message (Collapse) | Author | Files | Lines |
|
Fix :
gpio/gpio-pxa.c:605: ERROR: space required after that ',' (ctx:VxV)
gpio/gpio-pxa.c:672: ERROR: space prohibited after that open parenthesis '('
Signed-off-by: Laurent Navet <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix :
gpio/gpio-pca953x.c:150: ERROR: else should follow close brace '}'
Signed-off-by: Laurent Navet <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix :
gpio/gpio-omap.c:697: ERROR: space required before the open parenthesis '('
Signed-off-by: Laurent Navet <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix :
gpio/gpio-mvebu.c:120: ERROR: space required before the open parenthesis '('
gpio/gpio-mvebu.c:136: ERROR: space required before the open parenthesis '('
gpio/gpio-mvebu.c:154: ERROR: space required before the open parenthesis '('
gpio/gpio-mvebu.c:404: ERROR: space required before the open parenthesis '('
gpio/gpio-mvebu.c:476: ERROR: "(foo*)" should be "(foo *)"
gpio/gpio-mvebu.c:480: ERROR: "(foo*)" should be "(foo *)"
gpio/gpio-mvebu.c:484: ERROR: "(foo*)" should be "(foo *)"
gpio/gpio-mvebu.c:512: ERROR: space prohibited after that '!' (ctx:BxW)
gpio/gpio-mvebu.c:518: ERROR: space prohibited after that '!' (ctx:BxW)
gpio/gpio-mvebu.c:518: ERROR: space required before the open brace '{'
gpio/gpio-mvebu.c:563: ERROR: space prohibited after that '!' (ctx:BxW)
gpio/gpio-mvebu.c:570: ERROR: trailing whitespace
gpio/gpio-mvebu.c:577: ERROR: space required before the open parenthesis '('
gpio/gpio-mvebu.c:635: ERROR: space prohibited after that '!' (ctx:BxW)
Signed-off-by: Laurent Navet <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix :
gpio/gpiolib-of.c:64: ERROR: code indent should use tabs where possible
Signed-off-by: Laurent Navet <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use the wrapper functions for getting and setting the driver data
using spi_device instead of using dev_{get|set}_drvdata with
&spi->dev, so we can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use the wrapper functions for getting and setting the driver data
using spi_device instead of using dev_{get|set}_drvdata with
&spi->dev, so we can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
dev_err() is more preferred than printk().
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use devm_kzalloc() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use devm_kzalloc() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use devm_kzalloc() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use devm_kzalloc() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use devm_kzalloc() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use devm_kzalloc() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <[email protected]>
Reviewed-by: Thierry Reding <[email protected]>
Acked-by: Tony Prisk <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Update the Emma Mobile GPIO driver to make use of devm
functions. This simplifies the error handling and makes
the code more compact.
Signed-off-by: Magnus Damm <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Lynxpoint gpio driver uses X86 specific io-ports to control gpios
Signed-off-by: Mathias Nyman <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
It is more readable for humans to use double-bang (!!) to convert the value
to pure boolean before it is returned.
Signed-off-by: Mika Westerberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The E6xx (TunnelCreek) CPUs have 9 GPIO lines in the resume well. Update
the resume functions to allow for more than 8 GPIO lines, using the core
functions as a template.
Cc: Grant Likely <[email protected]>
Cc: Linus Walleij <[email protected]>
Signed-off-by: Darren Hart <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Signed-off-by: Nikolay Balandin <[email protected]>
Acked-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The irq domain was implemented but the device tree
node was not transmitted to irq_domain_add_simple().
Cc: [email protected]
Signed-off-by: Gabriel Fernandez <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Set it once is enough, and it's done in vprbrd_gpiob_set() which is called by
vprbrd_gpiob_direction_output().
Signed-off-by: Axel Lin <[email protected]>
Tested-by: Lars Poeschel <[email protected]>
Acked-by: Lars Poeschel <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Stop checking for pin availability in direction and get functions.
These functions can be called repeatedly, so checking every time is
bad for performance. Now that requesting GPIO pins is no longer
optional, checking for availability at pin request time is enough.
Signed-off-by: Jean Delvare <[email protected]>
Cc: Peter Tyser <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Linus Walleij <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Per Documentation/gpio.txt, gpio_request callbacks should return 0 on
success or a negative value on error. So it is not clear what was
meant by letting ichx_gpio_request return 1 in some cases, nor how a
caller would interpret it.
Align the code with the comment above it and consider pins as
available by default.
Signed-off-by: Jean Delvare <[email protected]>
Cc: Grant Likely <[email protected]>
Acked-by: Peter Tyser <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
These functions have been introduced by commit 10a8c383 (irq: introduce
entry and exit functions for chained handlers) in asm/mach/irq.h. This
patch moves them to linux/irqchip/chained_irq.h so that generic irqchip
drivers do not rely on architecture specific header files.
Signed-off-by: Catalin Marinas <[email protected]>
Tested-by: Marc Zyngier <[email protected]>
Cc: Russell King <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Rob Herring <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pinctrl fixes from Linus Walleij:
"Here are a few pinctrl fixes for the v3.9 rc series:
- Usecount bounds checking so we do not go below zero on mux
usecounts.
- Loop range checking in GPIO ranges in the DT range parser.
- Proper print in debugfs for pinconf state.
- Fix compilation bug in generic pinconf code.
- Minor bugfixes to abx500 and mvebu drivers."
* tag 'pinctrl-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinmux: forbid mux_usecount to be set at UINT_MAX
pinctrl: mvebu: fix checking for SoC specific controls
pinctrl: generic: Fix compilation error
pinctrl: Print the correct information in debugfs pinconf-state file
pinctrl: abx500: Fix checking if pin use AlternateFunction register
gpio: fix wrong checking condition for gpio range
|
|
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers
From Kukjin Kim <[email protected]>:
Here is support pinctrl-exynos5250 and that already got ack from Linus Walleij.
* 'next/pinctrl-exynos' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: EXYNOS: skip wakeup interrupt registration for exynos5250 if pinctrl is enabled
gpio: samsung: skip gpiolib registration if pinctrl support is enabled for exynos5250
pinctrl: exynos: add exynos5250 SoC specific data
Signed-off-by: Arnd Bergmann <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers
From Kukjin Kim <[email protected]>:
Here is finish the irq rework for s3c2412, s3c2440 and s3c2442 into the new
structure and eint0 to 3 on the s3c2412.
* 'next/irq-s3c24xx' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
gpio: samsung: fixes build warning with s3c2410_defconfig
ARM: S3C24XX: handle s3c2412 eints using new infrastructure
ARM: S3C24XX: add soc_is_s3c2412 option
ARM: S3C24XX: include first 4 bits of the eint register in irq mapping
ARM: S3C24XX: transform s3c2412 irqs into new structure
ARM: S3C24XX: modify s3c2412 irq init to initialize all irqs
ARM: S3C24XX: move s3c2412 irq init to common code
ARM: S3C24XX: use samsung_sync_wakemask in s3c2412 pm
ARM: S3C24XX: transform s3c2440 irqs into new structure
ARM: S3C24XX: transform s3c2442 irqs into new structure
ARM: S3C24XX: integrate s3c2440 irqs into common init
ARM: S3C24XX: move s3c2440 irqs to common irq code
ARM: S3C24XX: create dedicated irq init functions for s3c2440 and s3c2442
ARM: S3C24XX: move s3c244x irq init to common irq code
Signed-off-by: Arnd Bergmann <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into pinmux-base
|
|
Pull ARM SoC fixes from Arnd Bergmann:
"These bug fixes are for the largest part for mvebu/kirkwood, which saw
a few regressions after the clock infrastructure was enabled, and for
OMAP, which showed a few more preexisting bugs with the new
multiplatform support.
Other small fixes are for imx, mxs, tegra, spear and socfpga"
* tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
ARM: spear3xx: Use correct pl080 header file
Arm: socfpga: pl330: Add #dma-cells for generic dma binding support
ARM: multiplatform: Sort the max gpio numbers.
ARM: imx: fix typo "DEBUG_IMX50_IMX53_UART"
ARM: imx: pll1_sys should be an initial on clk
arm: mach-orion5x: fix typo in compatible string of a .dts file
arm: mvebu: fix address-cells in mpic DT node
arm: plat-orion: fix address decoding when > 4GB is used
arm: mvebu: Reduce reg-io-width with UARTs
ARM: Dove: add RTC device node
arm: mvebu: enable the USB ports on Armada 370 Reference Design board
ARM: dove: drop "select COMMON_CLK_DOVE"
rtc: rtc-mv: Add support for clk to avoid lockups
gpio: mvebu: Add clk support to prevent lockup
ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency
ARM: mxs: cfa10049: Fix fb initialisation function
ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ"
ARM: OMAP: RX-51: add missing USB phy binding
clk: Tegra: Remove duplicate smp_twd clock
...
|
|
The kirkwood SoC GPIO cores use the runit clock. Add code to
clk_prepare_enable() runit, otherwise there is a danger of locking up
the SoC by accessing the GPIO registers when runit clock is not
ticking.
Reported-by: Simon Baatz <[email protected]>
Signed-off-by: Andrew Lunn <[email protected]>
Tested-by: Simon Baatz <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jason Cooper <[email protected]>
|
|
Add the pl061_gpio_request() to request pinctrl. Create the logic
between pl061 gpio driver and pinctrl (pinctrl-single) driver.
While a gpio pin is requested, it will request pinctrl driver to
set that pin with gpio function mode. So pinctrl driver should
append .gpio_request_enable() in pinmux_ops.
Signed-off-by: Haojian Zhuang <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Drop the support of irq generic chip. Now support irqdomain instead.
Although set_wake() is defined in irq generic chip & it is not really
used in pl061 gpio driver. Drop it at the same time.
Signed-off-by: Haojian Zhuang <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Add gpio offset into "gpio-range-cells" property. It's used to support
sparse pinctrl range in gpio chip.
Signed-off-by: Haojian Zhuang <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
If index++ calculates from 0, the checking condition of "while
(index++)" fails & it doesn't check any more. It doesn't follow
the loop that used at here.
Replace it by endless loop at here. Then it keeps parsing
"gpio-ranges" property until it ends.
Signed-off-by: Haojian Zhuang <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Update the Emma Mobile GPIO driver to add DT support.
The patch simply adds a two-cell xlate function and
updates the probe code to allow configuration via DT
using the "ngpios" property plus OF id in the same
style as gpio-mvebu.c. The code is also adjusted to
use postcore_initcall() to force early setup.
Signed-off-by: Magnus Damm <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
For OMAP devices, if a gpio is being used as an interrupt source but has
not been requested by calling gpio_request(), a call to request_irq()
may cause the kernel hang because the gpio bank may be disabled and
hence the register access will fail. To prevent such hangs, test for
this case and warn if this is detected.
Signed-off-by: Jon Hunter <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Acked-by: Kevin Hilman <[email protected]>
Tested-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Currently the OMAP GPIO driver uses a legacy mapping for the GPIO IRQ
domain. This is not necessary because we do not need to assign a
specific interrupt number to the GPIO IRQ domain. Therefore, convert
the OMAP GPIO driver to use a linear mapping instead.
Please note that this also allows to simplify the logic in the OMAP
gpio_irq_handler() routine, by using irq_find_mapping() to obtain the
virtual irq number from the GPIO bank and bank index.
Reported-by: Linus Walleij <[email protected]>
Signed-off-by: Jon Hunter <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Acked-by: Kevin Hilman <[email protected]>
Tested-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Doing this removes the dependence of this driver on the
msm_iomap.h and cpu.h mach include headers provied by MSM. This
is necessary to support single zImage work in the future and
allows us to remove cpu.h entirely and brings us closer to
removing msm_iomap.h.
Cc: Grant Likely <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Tested-by: Rohit Vaswani <[email protected]>
Acked-by: Rohit Vaswani <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: David Brown <[email protected]>
|
|
exynos5250
Skip exynos5250 gpiolib registration if pinctrl support for exynos5250
is enabled.
Signed-off-by: Thomas Abraham <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
|
|
commit 7b45ed96 ("ARM: S3C24XX: handle s3c2412 eints using new
infrastructure") introduced build warning and this patch fixes
that:
drivers/gpio/gpio-samsung.c: In function 's3c24xx_gpiolib_fbank_to_irq':
drivers/gpio/gpio-samsung.c:1126:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
Reported-by: kbuild test robot <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
|
|
The s3c2412 handles the eints 0 to 3 different than all the other SoCs
of the 24xx range. These eints must be acked and masked in the regular
bits as well as the bits 0 to 3 of the eint registers, which are unused
on the other SoCs.
This of course can be realized using the new infrastructure with the
eint bits in the main register being the parent interrupts of the
same bits in the eint register.
The s3c2412 therefore gets its own IRQ_EINT0 to 4 constants that
reside in the newly created gap before IRQ_EINT4. gpio-samsung, as the
only user of these is modified to return the correct values when
handling gpio_to_irq requests on s3c2412 based machines.
Due to lack of hardware this is compile tested only, but should
hopefully work as intended.
Signed-off-by: Heiko Stuebner <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
|
|
Tegra only supports, and always enables, device tree. Remove all ifdefs
and runtime checks for DT support from the driver.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
ichx_gpio_check_available() returns either 0 or -ENXIO depending on whether
the given GPIO is available or not. However, callers of this function treat
the return value as boolean:
...
if (!ichx_gpio_check_available(gpio, nr))
return -ENXIO;
which erroneusly fails when the GPIO is available and not vice versa.
Fix this by making the function return boolean as expected by the callers.
Signed-off-by: Mika Westerberg <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
This comment applies to gpio_to_chip(), not gpiod_to_chip().
Signed-off-by: Alexandre Courbot <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Constify descriptor parameter of gpiod_* functions for those that
should obviously not modify it. This includes value or direction get,
cansleep, and IRQ number query.
Signed-off-by: Alexandre Courbot <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Some functions dereferenced their GPIO descriptor argument without
checking its validity first, potentially leading to an oops when given
an invalid argument.
This patch also makes gpio_get_value() more resilient when given an
invalid GPIO, returning 0 instead of silently crashing.
Signed-off-by: Alexandre Courbot <[email protected]>
Cc: Ryan Mallon <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Convert to the much saner new idr interface.
Signed-off-by: Tejun Heo <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Cc: Grant Likely <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Pull GPIO changes from Grant Likely:
"This branch contains the usual set of individual driver improvements
and bug fixes, as well as updates to the core code. The more notable
changes include:
- Internally add new API for referencing GPIOs by gpio_desc instead
of number. Eventually this will become a public API
- ACPI GPIO binding support"
* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux: (33 commits)
arm64: select ARCH_WANT_OPTIONAL_GPIOLIB
gpio: em: Use irq_domain_add_simple() to fix runtime error
gpio: using common order: let 'static const' instead of 'const static'
gpio/vt8500: memory cleanup missing
gpiolib: Fix locking on gpio debugfs files
gpiolib: let gpio_chip reference its descriptors
gpiolib: use descriptors internally
gpiolib: use gpio_chips list in gpiochip_find_base
gpiolib: use gpio_chips list in sysfs ops
gpiolib: use gpio_chips list in gpiochip_find
gpiolib: use gpio_chips list in gpiolib_sysfs_init
gpiolib: link all gpio_chips using a list
gpio/langwell: cleanup driver
gpio/langwell: Add Cloverview ids to pci device table
gpio/lynxpoint: add chipset gpio driver.
gpiolib: add missing braces in gpio_direction_show
gpiolib-acpi: Fix error checks in interrupt requesting
gpio: mpc8xxx: don't set IRQ_TYPE_NONE when creating irq mapping
gpiolib: remove gpiochip_reserve()
arm: pxa: tosa: do not use gpiochip_reserve()
...
|