14 Jul, 2015
1 commit
-
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.Preparatory patch for the removal of the 'irq' argument from irq flow
handlers.Signed-off-by: Jiang Liu
Acked-by: Linus Walleij
Cc: Alexandre Courbot
Signed-off-by: Thomas Gleixner
24 Jun, 2015
1 commit
-
Pull gpio updates from Linus Walleij:
"This is the big bulk of GPIO changes queued for the v4.2 kernel
series:- a big set of cleanups to the aged sysfs interface from Johan
Hovold. To get these in, v4.1-rc3 was merged into the tree as the
first patch in that series had to go into stable. This makes the
locking much more fine-grained (get rid of the "big GPIO lock(s)"
and store states in the GPIO descriptors.- rename gpiod_[g|s]et_array() to gpiod_[g|s]et_array_value() to
avoid confusions.- New drivers for:
* NXP LPC18xx (currently LPC1850)
* NetLogic XLP
* Broadcom STB SoC's
* Axis ETRAXFS
* Zynq Ultrascale+ (subdriver)- ACPI:
* make it possible to retrieve GpioInt resources from a GPIO
device using acpi_dev_gpio_irq_get()
* merge some dependent I2C changes exploiting this.
* support the ARM X-Gene GPIO standby driver.- make it possible for the generic GPIO driver to read back the value
set registers to reflect current status.- loads of OMAP IRQ handling fixes.
- incremental improvements to Kona, max732x, OMAP, MXC, RCAR,
PCA953x, STP-XWAY, PCF857x, Crystalcove, TB10x.- janitorial (constification, checkpatch cleanups)"
* tag 'gpio-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (71 commits)
gpio: Fix checkpatch.pl issues
gpio: pcf857x: handle only enabled irqs
gpio / ACPI: Return -EPROBE_DEFER if the gpiochip was not found
GPIO / ACPI: export acpi_gpiochip_request(free)_interrupts for module use
gpio: improve error reporting on own descriptors
gpio: promote own request failure to pr_err()
gpio: Added support to Zynq Ultrascale+ MPSoC
gpio: add ETRAXFS GPIO driver
fix documentation after renaming gpiod_set_array to gpiod_set_array_value
gpio: Add GPIO support for Broadcom STB SoCs
gpio: xgene: add ACPI support for APM X-Gene GPIO standby driver
gpio: tb10x: Drop unneeded free_irq() call
gpio: crystalcove: set IRQCHIP_SKIP_SET_WAKE for the irqchip
gpio: stp-xway: Use the of_property_read_u32 helper
gpio: pcf857x: Check for irq_set_irq_wake() failures
gpio-stp-xway: Fix enabling the highest bit of the PHY LEDs
gpio: Prevent an integer overflow in the pca953x driver
gpio: omap: rework omap_gpio_irq_startup to handle current pin state properly
gpio: omap: rework omap_gpio_request to touch only gpio specific registers
gpio: omap: rework omap_x_irq_shutdown to touch only irqs specific registers
...
18 Jun, 2015
1 commit
-
Fix a race where a pending interrupt could be received and the handler
called before the handler's data has been setup, by converting to
irq_set_chained_handler_and_data().Signed-off-by: Russell King
Cc: Alexandre Courbot
Cc: Hans Ulli Kroll
Cc: Jason Cooper
Cc: Lee Jones
Cc: Linus Walleij
Cc: Thierry Reding
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/E1Z4z0H-0002Sf-P9@rmk-PC.arm.linux.org.uk
Signed-off-by: Thomas Gleixner
12 May, 2015
1 commit
-
The platform_device_id is not modified by the driver and core uses it as
const.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Linus Walleij
15 Dec, 2014
1 commit
-
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev__once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
28 Nov, 2014
1 commit
-
gpiolib's gpiod_get_direction() function returns the EINVAL error
if .get_direction callback is not defined.
The patch implements the callback for mxs chip which is useful
for debugging.Inspired by arch/arm/mach-at91/gpio.c
On the moment the patch is required to get the patch
"serial: mxs-auart: enable PPS support" working.
It is planned to introduce new mctrl_gpio helpers to avoid
gpiod_get_direction() function.Signed-off-by: Janusz Uzycki
Acked-by: Alexandre Courbot
Signed-off-by: Linus Walleij
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
27 Mar, 2014
1 commit
-
The scenario here is that someone calls enable_irq_wake() from somewhere
in the code. This will result in the lockdep producing a backtrace as can
be seen below. In my case, this problem is triggered when using the wl1271
(TI WlCore) driver found in drivers/net/wireless/ti/ .The problem cause is rather obvious from the backtrace, but let's outline
the dependency. enable_irq_wake() grabs the IRQ buslock in irq_set_irq_wake(),
which in turns calls mxs_gpio_set_wake_irq() . But mxs_gpio_set_wake_irq()
calls enable_irq_wake() again on the one-level-higher IRQ , thus it tries to
grab the IRQ buslock again in irq_set_irq_wake() . Because the spinlock in
irq_set_irq_wake()->irq_get_desc_buslock()->__irq_get_desc_lock() is not
marked as recursive, lockdep will spew the stuff below.We know we can safely re-enter the lock, so use IRQ_GC_INIT_NESTED_LOCK to
fix the spew.=============================================
[ INFO: possible recursive locking detected ]
3.10.33-00012-gf06b763-dirty #61 Not tainted
---------------------------------------------
kworker/0:1/18 is trying to acquire lock:
(&irq_desc_lock_class){-.-...}, at: [] __irq_get_desc_lock+0x48/0x88but task is already holding lock:
(&irq_desc_lock_class){-.-...}, at: [] __irq_get_desc_lock+0x48/0x88other info that might help us debug this:
Possible unsafe locking scenario:CPU0
----
lock(&irq_desc_lock_class);
lock(&irq_desc_lock_class);*** DEADLOCK ***
May be due to missing lock nesting notation
3 locks held by kworker/0:1/18:
#0: (events){.+.+.+}, at: [] process_one_work+0x134/0x4a4
#1: ((&fw_work->work)){+.+.+.}, at: [] process_one_work+0x134/0x4a4
#2: (&irq_desc_lock_class){-.-...}, at: [] __irq_get_desc_lock+0x48/0x88stack backtrace:
CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 3.10.33-00012-gf06b763-dirty #61
Workqueue: events request_firmware_work_func
[] (unwind_backtrace+0x0/0xf0) from [] (show_stack+0x10/0x14)
[] (show_stack+0x10/0x14) from [] (__lock_acquire+0x140c/0x1a64)
[] (__lock_acquire+0x140c/0x1a64) from [] (lock_acquire+0x9c/0x104)
[] (lock_acquire+0x9c/0x104) from [] (_raw_spin_lock_irqsave+0x44/0x58)
[] (_raw_spin_lock_irqsave+0x44/0x58) from [] (__irq_get_desc_lock+0x48/0x88)
[] (__irq_get_desc_lock+0x48/0x88) from [] (irq_set_irq_wake+0x20/0xf4)
[] (irq_set_irq_wake+0x20/0xf4) from [] (mxs_gpio_set_wake_irq+0x1c/0x24)
[] (mxs_gpio_set_wake_irq+0x1c/0x24) from [] (set_irq_wake_real+0x30/0x44)
[] (set_irq_wake_real+0x30/0x44) from [] (irq_set_irq_wake+0x8c/0xf4)
[] (irq_set_irq_wake+0x8c/0xf4) from [] (wlcore_nvs_cb+0x10c/0x97c)
[] (wlcore_nvs_cb+0x10c/0x97c) from [] (request_firmware_work_func+0x38/0x58)
[] (request_firmware_work_func+0x38/0x58) from [] (process_one_work+0x1c0/0x4a4)
[] (process_one_work+0x1c0/0x4a4) from [] (worker_thread+0x138/0x394)
[] (worker_thread+0x138/0x394) from [] (kthread+0xa4/0xb0)
[] (kthread+0xa4/0xb0) from [] (ret_from_fork+0x14/0x34)
wlcore: loadedCc: stable@vger.kernel.org
Signed-off-by: Marek Vasut
Acked-by: Shawn Guo
Signed-off-by: Linus Walleij
06 Nov, 2013
1 commit
-
mxs is a devicetree only platform, so there is no need to check whether we
are in dt or platform data case.Signed-off-by: Fabio Estevam
Acked-by: Shawn Guo
Signed-off-by: Linus Walleij
21 May, 2013
1 commit
-
The current driver doesn't use the set and clear registers found on the
mxs gpio controller.This leads the generic gpio controller to be using some internal value
to avoid looking up the value stored in the registers, making it behave
pretty much like a cache.This raises some coherency problem when a gpio is not modified by the
gpio controller, while it can easily be fixed by using the set and clear
registers.Signed-off-by: Maxime Ripard
Acked-by: Shawn Guo
Signed-off-by: Linus Walleij
27 Feb, 2013
1 commit
-
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()
...
29 Jan, 2013
1 commit
-
This patch adds support for IRQ_TYPE_EDGE_BOTH needed for some driver
(gpio-keys).Inspired from gpio-mxc.c
Acked-by: Shawn Guo
Signed-off-by: Gwenhael Goavec-Merou
Signed-off-by: Linus Walleij
23 Jan, 2013
1 commit
-
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() 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: Thierry Reding
Cc: Grant Likely
Cc: Linus Walleij
Acked-by: Viresh Kumar
Tested-by: Gregory CLEMENT
Acked-by: Gregory CLEMENT
Signed-off-by: Greg Kroah-Hartman
29 Nov, 2012
1 commit
-
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Grant Likely
Cc: Peter Tyser
Cc: Santosh Shilimkar
Cc: Kevin Hilman
Acked-by: Linus Walleij
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
03 Sep, 2012
1 commit
-
Remove irq_domain_add_legacy call from mach-mxs.c and have the gpio
driver adopt irqdomain support, so that we can have the mapping
between gpio and irq number available without using virtual_irq_start
and MXS_GPIO_IRQ_START.Signed-off-by: Shawn Guo
Acked-by: Linus Walleij
27 May, 2012
1 commit
-
Pull arm-soc device tree conversions (part 2) from Olof Johansson:
"These continue the device tree work from part 1, this set is for the
tegra, mxs and imx platforms, all of which have dependencies on clock
or pinctrl changes submitted earlier."Fix up trivial conflicts due to nearby changes in
drivers/{gpio/gpio,i2c/busses/i2c}-mxs.c* tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits)
ARM: dt: tegra: invert status=disable vs status=okay
ARM: dt: tegra: consistent basic property ordering
ARM: dt: tegra: sort nodes based on bus order
ARM: dt: tegra: remove duplicate device_type property
ARM: dt: tegra: consistenly use lower-case for hex constants
ARM: dt: tegra: format regs properties consistently
ARM: dt: tegra: gpio comment cleanup
ARM: dt: tegra: remove unnecessary unit addresses
ARM: dt: tegra: whitespace cleanup
ARM: dt: tegra cardhu: fix typo in SDHCI node name
ARM: dt: tegra: cardhu: register core regulator tps62361
ARM: dt: tegra30.dtsi: Add SMMU node
ARM: dt: tegra20.dtsi: Add GART node
ARM: dt: tegra30.dtsi: Add Memory Controller(MC) nodes
ARM: dt: tegra20.dtsi: Add Memory Controller(MC) nodes
ARM: dt: tegra: Add device tree support for AHB
ARM: dts: enable audio support for imx28-evk
ARM: dts: enable i2c device for imx28-evk
i2c: mxs: add device tree probe support
ARM: dts: enable mmc for imx28-evk
...
20 May, 2012
1 commit
-
It fixes the issue in gpio-generic that commit fb14921 (gpio/mxc: add
missing initialization of basic_mmio_gpio shadow variables) manged to
fix in gpio-mxc driver, so that other platform specific drivers do not
suffer from the same problem over and over again.Changes since v1:
* Turn the last parameter of bgpio_init() "bool big_endian" into
"unsigned long flags" and give those really quirky hardwares a
chance to tell that reg_set and reg_dir are unreadable.Signed-off-by: Shawn Guo
[grant.likely: Fix big-endian usage to explicitly set BBGPIOF_BIG_ENDIAN]
Signed-off-by: Grant Likely
12 May, 2012
3 commits
-
It adds device tree probe for gpio-mxs driver.
Signed-off-by: Shawn Guo
Acked-by: Linus Walleij -
It removes the use of cpu_is_xxx from gpio-mxs driver and instead use
platform_device_id to identify the device. Accordingly, mxs platform
code is changed to register gpio device with different names, and
the registeration are done in soc specific initialization functions
now, so postcore_initcall(mxs_add_mxs_gpio) gets removed.Signed-off-by: Shawn Guo
Acked-by: Linus Walleij -
It uses devm_* helpers to make the error handling of probe clean
and simple.Signed-off-by: Shawn Guo
Acked-by: Linus Walleij
07 Nov, 2011
1 commit
-
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
Revert "tracing: Include module.h in define_trace.h"
irq: don't put module.h into irq.h for tracking irqgen modules.
bluetooth: macroize two small inlines to avoid module.h
ip_vs.h: fix implicit use of module_get/module_put from module.h
nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
include: replace linux/module.h with "struct module" wherever possible
include: convert various register fcns to macros to avoid include chaining
crypto.h: remove unused crypto_tfm_alg_modname() inline
uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
pm_runtime.h: explicitly requires notifier.h
linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
miscdevice.h: fix up implicit use of lists and types
stop_machine.h: fix implicit use of smp.h for smp_processor_id
of: fix implicit use of errno.h in include/linux/of.h
of_platform.h: delete needless include
acpi: remove module.h include from platform/aclinux.h
miscdevice.h: delete unnecessary inclusion of module.h
device_cgroup.h: delete needless include
net: sch_generic remove redundant use of
net: inet_timewait_sock doesnt need
...Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
- drivers/media/dvb/frontends/dibx000_common.c
- drivers/media/video/{mt9m111.c,ov6650.c}
- drivers/mfd/ab3550-core.c
- include/linux/dmaengine.h
01 Nov, 2011
1 commit
-
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore. Make sure the modular drivers in gpio
are actually calling out for explicitly in advance.Signed-off-by: Paul Gortmaker
17 Aug, 2011
1 commit
-
As irq_to_gpio() is only being used by gpio-mxs driver, it should be
moved from mach/gpio.h into gpio-mxs.c.Signed-off-by: Shawn Guo
Signed-off-by: Sascha Hauer
20 Jul, 2011
1 commit
-
The following commit renames irq_gc_ack() to irq_gc_ack_set_bit(),
and makes gpio-mxc and gpio-mxs fail to build.659fb32d1b67476f4ade25e9ea0e2642a5b9c4b5
genirq: replace irq_gc_ack() with {set,clr}_bit variants (fwd)The patch fixed a couple of typo of comma to semicolon.
Signed-off-by: Shawn Guo
Signed-off-by: Grant Likely
07 Jun, 2011
4 commits
-
The patch converts gpio-mxs driver to use generic irq chip.
Signed-off-by: Shawn Guo
Signed-off-by: Grant Likely -
The irq_high stuff was mistakenly copied from mxc gpio driver.
The mxs gpio controller has only one irq line for each 32-pin
gpio port. The patch remove irq_high related codes.Signed-off-by: Shawn Guo
Signed-off-by: Grant Likely -
The gpio-mxs controller complies with basic_mmio_gpio library. This
patch converts the driver to use the library.Signed-off-by: Shawn Guo
Signed-off-by: Grant Likely -
The patch makes necessary changes on gpio-mxs as below to turn it
into an upstanding gpio driver.* Clean up the gpio port definition stuff
* Use readl/writel to replace mach-specific accessors
__raw_readl/__raw_writel* Change mxs_gpio_init into mxs_gpio_probe function
And it then migrates mach-mxs to the updated driver by adding
corresponding platform devices.Signed-off-by: Shawn Guo
Acked-by: Arnd Bergmann
Acked-by: Sascha Hauer
Signed-off-by: Grant Likely
06 Jun, 2011
1 commit
-
GPIO drivers are getting moved to drivers/gpio for cleanup and
consolidation. This patch moves the mxs driver. Follow up patches
will clean it up and make it a fine upstanding example of a gpio
driver.v2: Removed header file entirely and put struct definition directly
into driver. The struct isn't used anywhere else in the kernel.Signed-off-by: Grant Likely
Tested-by: Shawn Guo
Acked-by: Sascha Hauer