17 Dec, 2012
1 commit
-
Pull MFS update from Samuel Ortiz:
"This is the MFD patch set for the 3.8 merge window.We have several new drivers, most of the time coming with their sub
devices drivers:- Austria Microsystem's AS3711
- Nano River's viperboard
- TI's TPS80031, AM335x TS/ADC,
- Realtek's MMC/memstick card reader
- Nokia's retuWe also got some notable cleanups and improvements:
- tps6586x got converted to IRQ domains.
- tps65910 and tps65090 moved to the regmap IRQ API.
- STMPE is now Device Tree aware.
- A general twl6040 and twl-core cleanup, with moves to the regmap
I/O and IRQ APIs and a conversion to the recently added PWM
framework.
- sta2x11 gained regmap support.Then the rest is mostly tiny cleanups and fixes, among which we have
Mark's wm5xxx and wm8xxx patchset."Far amount of annoying but largely trivial conflicts. Many due to
__devinit/exit removal, others due to one or two of the new drivers also
having come in through another tree.* tag 'mfd-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (119 commits)
mfd: tps6507x: Convert to devm_kzalloc
mfd: stmpe: Update DT support for stmpe driver
mfd: wm5102: Add readback of DSP status 3 register
mfd: arizona: Log if we fail to create the primary IRQ domain
mfd: tps80031: MFD_TPS80031 needs to select REGMAP_IRQ
mfd: tps80031: Add terminating entry for tps80031_id_table
mfd: sta2x11: Fix potential NULL pointer dereference in __sta2x11_mfd_mask()
mfd: wm5102: Add tuning for revision B
mfd: arizona: Defer patch initialistation until after first device boot
mfd: tps65910: Fix wrong ack_base register
mfd: tps65910: Remove unused data
mfd: stmpe: Get rid of irq_invert_polarity
mfd: ab8500-core: Fix invalid free of devm_ allocated data
mfd: wm5102: Mark DSP memory regions as volatile
mfd: wm5102: Correct default for LDO1_CONTROL_2
mfd: arizona: Register haptics devices
mfd: wm8994: Make current device behaviour the default
mfd: tps65090: MFD_TPS65090 needs to select REGMAP_IRQ
mfd: Fix stmpe.c build when OF is not enabled
mfd: jz4740-adc: Use devm_kzalloc
...
22 Nov, 2012
1 commit
-
The irqs are enabled one-by-one in pm core resume_noirq phase.
This leads to situation where the twl4030 primary interrupt
handler (PIH) is enabled before the chained secondary handlers
(SIH). As the PIH cannot clear the pending interrupt, and
SIHs have not been enabled yet, a flood of interrupts hangs
the device.Fixed the issue by setting the SIH irqs with IRQF_EARLY_RESUME
flags, so they get enabled before the PIH.Signed-off-by: Kalle Jokiniemi
Acked-by: Kevin Hilman
Signed-off-by: Samuel Ortiz
21 Nov, 2012
2 commits
-
To facilitate upcoming cleanup in twl stack.
No functional changes.Acked-by: Tero Kristo
Signed-off-by: Peter Ujfalusi
Signed-off-by: Samuel Ortiz -
Since the twl-core has been converted to use regmap it is no longer needed
to allocate bigger buffer for data when writing to twl.CC: Grant Likely
CC: Alessandro Zummo
Acked-by: Linus Walleij
Acked-by: Tero Kristo
Signed-off-by: Peter Ujfalusi
Signed-off-by: Samuel Ortiz
10 May, 2012
1 commit
-
Most of the interrupts that come through this line should trigger
wakeups:
power button
RTC alarm
power available
usb plug/unplugso mark the interrupt as a wakeup interrupt.
This is particularly important for when the interrupt arrives during
the late suspend phase. Without this setting it will be ignored.Signed-off-by: NeilBrown
Acked-by: Kevin Hilman
Signed-off-by: Samuel Ortiz
22 Mar, 2012
4 commits
-
Since a structure device is available now, use the dev_ macros instead
of the pr_ ones.Clean some badly formatted comments.
Remove some unused variables.
Move some variable to the place they belong.
Clean some badly wrapped lines.
Align variable definition
Add missing braces in if-then-else block.
Add blank line for better readability.
Move stuff here and there...Conflicts:
drivers/mfd/twl-core.c
Signed-off-by: Benoit Cousson
Cc: Felipe Balbi
Signed-off-by: Samuel Ortiz -
__ffs() will be far faster than the for loop used.
Signed-off-by: Felipe Balbi
Signed-off-by: Samuel Ortiz -
twl4030 is using a two level irq controllers infrastruture.
So far, only the first level was using dynamic irq_desc allocation
to be able to have irq_domain support for device tree.
There is a need to allocate separate irq_descs for the SIH too to
avoid hacking the first level with interrupts from the second level.Add an irq_base parameter to allow the caller to provide the base from
pdata or from dynamic allocation.Affect TWL4030_NR_IRQS to the twl-core IRQs only.
Moreover that will allow the extraction of the of_node pointer for further
Device Tree conversion.Signed-off-by: Felipe Balbi
Signed-off-by: Benoit Cousson
Signed-off-by: Samuel Ortiz -
During DT adaptation, the irq_alloc_desc was added into twl-core, but
due to the rather different and weird IRQ management required by the twl4030,
it is much better to have a different approach for it.
The issue is that twl4030 uses a two level IRQ mechanism but handles all the
PWR interrupts as part of the twl-core interrupt range. It ends up with a
range of 16 interrupts total for CORE and PWR.The other twl4030 functionalities already have a dedicated driver and thus
their IRQs and irqdomain can and should be defined localy.twl6030 is using a single level IRQ controller and thus does not require any
trick.Move the irq_alloc_desc and irq_domain_add_legacy in twl4030-irq and
twl6030-irq.Allocate together CORE and PWR IRQs for twl4030-irq.
Conflicts:
drivers/mfd/twl-core.c
Signed-off-by: Benoit Cousson
Acked-by: Felipe Balbi
Signed-off-by: Samuel Ortiz
07 Mar, 2012
1 commit
-
Signed-off-by: Felipe Contreras
Signed-off-by: Samuel Ortiz
09 Jan, 2012
2 commits
-
overwriten -> overwritten
Signed-off-by: NeilBrown
Signed-off-by: Samuel Ortiz -
As tertiary interrupts are handled by handle_twl4030_sih calling
handle_nested_irq, they do not need their own separate irq thread.
So mark them as 'nested_thread' interrupts to avoid the extra thread
creation.Tested on GTA04 Pheonux.
Signed-off-by: NeilBrown
Tested-by: Felipe Contreras
Signed-off-by: Samuel Ortiz
21 Dec, 2011
2 commits
-
irq_set_chained_handler sets 'desc->handle_irq'.
However this irq is called by handle_nested_irq from handle_twl4030_pih,
and that uses action->thread_fn.So the handled set with irq_set_chained_handler is never called.
So change to use request_threaded_irq instead - that sets the correct field.
Tested on GTA04 Phoenux.
Signed-off-by: NeilBrown
Tested-by: Felipe Contreras
Signed-off-by: Samuel Ortiz -
As the interrupt source is only cleared by the threaded interrupt
service routine, we need to make the base interrupt IRQF_ONESHOT.
Without this, the first interrupt from the TWL4030 cause the CPU to
enter an infinite loop trying to handle to interrupt but never
clearing it.Signed-off-by: NeilBrown
Tested-by: Felipe Contreras
Signed-off-by: Samuel Ortiz
24 Oct, 2011
7 commits
-
IRQF_DISABLED is a NOOP and is scheduled for removal.
Signed-off-by: Samuel Ortiz
-
Threads from twl4030's children will be called
nested in the context of the demultiplexing
handler on twl4030-irq.c.Signed-off-by: Felipe Balbi
Reviewed-by: Mark Brown
Signed-off-by: Samuel Ortiz -
... and do all the synchronization with the
hardware during bus_sync_unlock. We can now
remove all the workqueues.Signed-off-by: Felipe Balbi
Reviewed-by: Mark Brown
Signed-off-by: Samuel Ortiz -
... we can do the synchronization with the
hardware when calling bus_sync_unlock as
we're supposed to. While at that, also make
variable names uniform on all functions.Signed-off-by: Felipe Balbi
Reviewed-by: Mark Brown
Signed-off-by: Samuel Ortiz -
... and use threaded IRQ infrastructure. Later
patches will come dropping both workqueues and
setting the nested thread flag.Signed-off-by: Felipe Balbi
Reviewed-by: Mark Brown
Signed-off-by: Samuel Ortiz -
For doing that, drop the locking and change that
to a mutex.Signed-off-by: Felipe Balbi
Reviewed-by: Mark Brown
Signed-off-by: Samuel Ortiz -
trivial patch, no functional changes.
Signed-off-by: Felipe Balbi
Reviewed-by: Mark Brown
Signed-off-by: Samuel Ortiz
27 Mar, 2011
2 commits
-
Converted with coccinelle.
Signed-off-by: Thomas Gleixner
Acked-by: Mark Brown
Signed-off-by: Samuel Ortiz -
irq_desc checking in a function which is called with that irq
descriptor locked, is pointless. Equally pointless as the irq desc
check in the interrupt service routine. The driver sets those lines
up, so that cant go away magically.Remove the open coded handler magic and use the proper accessor.
No need to fiddle with irq_desc in the type setting function. The
original value is in irq_data and the core code stores the new setting
when the return value is 0.This driver needs to be converted to threaded interrupts and buslock.
Signed-off-by: Thomas Gleixner
Signed-off-by: Samuel Ortiz
14 Jan, 2011
1 commit
-
The genirq core is being updated to pass struct irq_data to irq_chip
operations. Update the TWL4030 driver to the new APIs.Signed-off-by: Mark Brown
Signed-off-by: Samuel Ortiz
29 Oct, 2010
2 commits
-
Fixes following sparse warnings for twl4030 and twl6030 irq files.
drivers/mfd/twl4030-irq.c:783:5: warning: symbol 'twl4030_init_irq' was not
declared. Should it be static?
drivers/mfd/twl4030-irq.c:863:5: warning: symbol 'twl4030_exit_irq' was not
declared. Should it be static?
drivers/mfd/twl4030-irq.c:873:5: warning: symbol 'twl4030_init_chip_irq' was
not declared. Should it be static?drivers/mfd/twl6030-irq.c:226:5: warning: symbol 'twl6030_init_irq' was not
declared. Should it be static?
drivers/mfd/twl6030-irq.c:290:5: warning: symbol 'twl6030_exit_irq' was not
declared. Should it be static?Signed-off-by: G, Manjunath Kondaiah
Cc: linux-arm-kernel@lists.infradead.org
Cc: Tony Lindgren
Cc: Nishanth Menon
Signed-off-by: Samuel Ortiz -
The chip TRM documentation contradicts itself about this bit, page 174
of swcu050e says bit should be 0 for clear-on-read behavior, while
page 487 says it should be 1. Testing shows it should be 1, so set
the .set_cor flag accordingly. This is needed for upcoming BCI
charging driver to function.Signed-off-by: Grazvydas Ignotas
Acked-by: Tony Lindgren
Signed-off-by: Samuel Ortiz
08 Oct, 2010
1 commit
-
The twl irqchip uses the dummy irq chip ack functions, which is NULL
now. Switch it over to use irq_ack.Reported-and-tested-by: Grazvydas Ignotas
Signed-off-by: Thomas Gleixner
04 Oct, 2010
1 commit
-
struct irq_data is the preferred name for the data associated to an
interrupt in the core code.Signed-off-by: Thomas Gleixner
Reviewed-by: Ingo Molnar
28 May, 2010
1 commit
-
Fix the names of twl5031 specific sih modules to match
the documentation.Signed-off-by: Ilkka Koskinen
Signed-off-by: Samuel Ortiz
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
01 Jan, 2010
1 commit
-
Commit 239007b844 ("genirq: Convert irq_desc.lock to raw_spinlock")
seems to have missed this driver, leaving it to use the normal spin-lock
functions for the irq descriptor lock, which is now a raw lock.Reported-and-compile-tested-by: Stephen Rothwell
Signed-off-by: Linus Torvalds
14 Dec, 2009
5 commits
-
This patch adds support for phoenix interrupt framework. New iInterrupt
status register A, B, C are introduced in Phoenix and are cleared on write.
Due to the differences in interrupt handling with respect to TWL4030,
twl6030-irq.c is created for TWL6030 PMICSigned-off-by: Rajendra Nayak
Signed-off-by: Balaji T K
Signed-off-by: Santosh Shilimkar
Reviewed-by: Tony Lindgren
Signed-off-by: Samuel Ortiz -
This patch renames function names like twl4030_i2c_write_u8,
twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8
and also common variable in twl-core.cSigned-off-by: Rajendra Nayak
Signed-off-by: Balaji T K
Signed-off-by: Santosh Shilimkar
Acked-by: Kevin Hilman
Signed-off-by: Samuel Ortiz -
The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030
for OMAP3. The common modules like RTC, Regulator creates opportunity
to re-use the most of the code from twl4030.This patch renames few common drivers twl4030* files to twl* to enable
the code re-use.Signed-off-by: Rajendra Nayak
Signed-off-by: Balaji T K
Signed-off-by: Santosh Shilimkar
Acked-by: Kevin Hilman
Signed-off-by: Samuel Ortiz -
Signed-off-by: Alan Cox
Signed-off-by: Samuel Ortiz -
TWL5031 introduces two new interrupts in PIH. Moreover, BCI
has changed remarkably and, thus, it's disabled when TWL5031
is in use.Signed-off-by: Ilkka Koskinen
Signed-off-by: Samuel Ortiz
17 Sep, 2009
1 commit
-
Signed-off-by: Joe Perches
Signed-off-by: Samuel Ortiz
05 Aug, 2009
1 commit
-
The TWL4030 IRQ handler has a bug which leads to spinlock lock-up. It is
calling the 'unmask' function in a process context. :The mask/unmask/ack
functions are only designed to be called from the IRQ handler code,
or the proper API interfaces found in linux/interrupt.h.Also there is no need to have IRQ chaining mechanism. The right way to
handle this is to claim the parent interrupt as a standard interrupt
and arrange for handle_twl4030_pih to take care of the rest of the devices.Mail thread on this issue can be found at:
http://marc.info/?l=linux-arm-kernel&m=124629940123396&w=2Signed-off-by: Russell King
Tested-by: Santosh Shilimkar
Acked-by: Tony Lindgren
Signed-off-by: Samuel Ortiz
18 Jun, 2009
1 commit
-
The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t) have
been kept around for migration reasons. After more than two years it's
time to remove them finally.This patch cleans up one of the remaining users. When all such patches
hit mainline we can remove the defines and typedefs finally.Impact: cleanup
Convert the last remaining users and remove the typedef.
Signed-off-by: Thomas Gleixner
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Samuel Ortiz
05 Apr, 2009
1 commit
-
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.Signed-off-by: Tobias Klauser
Signed-off-by: Samuel Ortiz