As we are using a custom boot sequence we don't need to wait for the
standard boot sequence in device init when the normal write sequence is
disabled.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Acquire the /RESET GPIO before we enable regulators and hold the device
in reset while the regulators power up in order to improve robustness
during the initial power up.
Also fix the error path so that the device is left in reset while we're
at it.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Registers which have defaults and are updated by the patch file should
have their defaults updated to match the value set by the patch file,
otherwise incorrect values will be read from the cache.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch deactivates the standard, currently noop, boot sequence
because we now have facilities in place for running a custom boot
sequence.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch adds facilities for apply a register patch contained within
the chip using the write sequencer.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Factor out the polling of the interrupt status register whilst we wait
for boot done to allow the polling to be reused in other situations.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Future updates will require us to manually apply the register patch for
wm5102.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Only the lowest three bits contain device revision for WM5102, the high
bits have been repurposed.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
If we have a directly provided 32kHz clock unconditionally enable it,
substantial chip functionality relies on it so dynamic management is
not worthwhile.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
MCLK1 is not in the AoD power domain so if it is used as the 32kHz clock
source we need to hold a runtime PM reference to keep the device from going
into low power mode.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
If no irq_flags are passed in platform data then query the interrupt
controller for the trigger type and try to use that. This provides
default operation with a wider range of hardware and will be needed
for device tree support where the interrupt flags are configured on
the interrupt controller.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
If a GPIO is specified for the chip IRQ line then request it. This
improves support for systems that do not put pins into input mode when
used as interrupts.
Also use this GPIO when the primary IRQ is in edge triggered mode to
detect if we have handled pending interrupts in order to improve
robustness.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Allow the user to configure edge triggered IRQs, though we do not yet
fully handle new interrupts occurring while an interrupt is being handled.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
regmap has a very similar looking error, help identify where the error
comes from by changing the error message.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Make sure that we don't leave the device enabled needlessly.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This untangles the final bits of the prcmu code from the platform
code:
* The IRQ_PRCMU_* definitions move from irqs-db8500.h into prcmu.c
because they are only of local significance.
* u8500_thsens_device goes into the prcmu, because it uses a PRCMU
IRQ that the platform does not see.
* IRQ_DB8500_AB8500 and IRQ_PRCMU_BASE go into the platform data
because the PRCMU does not see it.
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
[Fixed a oneliner bug]
Signed-off-by: Linus Walleij <[email protected]>
We are trying to decompose and decentralize the code in
the DB8500 PRCMU out into subdrivers. The code moved in
this patch concerns a group of functions used for
decoupling and recoupling the IRQs from the GIC. During
sleep and idle the Ux500 system will transfer all IRQ
handling to the PRCMU using these functions.
Basically we are left with the two alternatives of code
placement as:
- arch/arm/mach-ux500/pm.c - this because the code is
closely related to the GIC, and takes ownership of
some of the registers from the PRCMU related to this
PM functionality.
- drivers/mfd/db8500-prcmu-pm.c - because the code is
affecting stuff in the PRCMU register range. But then
this code needs to remap and handle GIC registers.
This patch implementation is taking the first approach.
Currently the cpuidle driver is the only piece of code
using this set of functions, but it will later also be
used by the suspend/resume code which is currently under
review.
The header file is moved to:
<linux/platform_data/arm-ux500-pm.h>
The function prototypes need to be placed in a globally
visible header since the CPUidle code is planned to move
out to drivers/cpuidle.
Acked-by: Samuel Ortiz <[email protected]>
Acked-by: Rickard Andersson <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
We cannot use a global variable stored in <mach/hardware.h> to
find the base address of the PRCMU. The real resource is already
there from the board, so use this to look up the base address
instead.
Currently the patch is kept minimal so as not to interfere with
other work being done on refactoring this driver, but at a later
point the defines using (prcmu_base + 0xnnn) need to be replaced
by pure offset defined for (0xnnn) and the base inlined with the
readl()/writel() and similar codepaths.
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This patch will make an early remapping of the PRCMU, to be
used when setting up the clocks, that will call down into parts
of the PRCMU driver before it is probed.
Going forward this will be removed like this:
- The mailbox subsystem need to be merged.
http://marc.info/?l=linux-kernel&m=136314559201983&w=2
- At this point the PRCMU clock code can be moved over to the
ux500 clock driver in drivers/clk/ux500/* and maintained
there in a decentralized manner.
- This early initcall and PRCMU base parameters become part of
the ux500_clk_init() call instead.
Cc: Suman Anna <[email protected]>
Cc: Loic Pallardy <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
'patch_regs' cannot be used uninitialized in wm8994_device_init(),
because 'patch_regs' was already guarded by 'regmap_patch'.
Thus, that's a bogus warning.
Without this patch, the build warning happens as below:
drivers/mfd/wm8994-core.c: In function 'wm8994_i2c_probe':
drivers/mfd/wm8994-core.c:595:7: warning: 'patch_regs' may be used uninitialized in this function [-Wuninitialized]
drivers/mfd/wm8994-core.c:408:14: note: 'patch_regs' was declared here
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
'data' is a pointer and hence use NULL instead of 0.
Silences the following warning:
drivers/mfd/max77686.c:49:50: warning: Using plain integer as NULL pointer
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Jonghwa Lee <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
module_i2c_driver() removes some boilerplate and makes the code
simple.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Michael Hennerich <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
When rtsx_pci_acquire_irq fails in rtsx_pci_probe, we forget to
disable an MSI (if we enabled it). This results in this warning on the
next attempt to load the module:
WARNING: at drivers/pci/msi.c:834 pci_enable_msi_block+0x2a4/0x2b0()
Hardware name: HP EliteBook 840 G1
Modules linked in: rtsx_pci(+) ...
Pid: 4056, comm: modprobe Tainted: G I 3.8.0-9405-gd895cb1-1-vanilla #1
Call Trace:
[<ffffffff81045c6a>] warn_slowpath_common+0x7a/0xc0
[<ffffffff81045cc5>] warn_slowpath_null+0x15/0x20
[<ffffffff81302544>] pci_enable_msi_block+0x2a4/0x2b0
[<ffffffffa05e335a>] rtsx_pci_probe+0x55a/0x720 [rtsx_pci]
...
So properly disable MSI in that case.
Signed-off-by: Jiri Slaby <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Move the AB8500 Kconfig fragment below the AB3100 so the
menuconfig menu gets hierarchically nested and looks nice.
Having the EZX PCAP in the middle disturbs the nice
hierarchical layout from kconfig.
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
If there is no interrupt property into stmpe node
then activate the no-irq mode by setting the irq
value to -1.
Cc: [email protected]
Signed-off-by: Gabriel Fernandez <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch allow using syscon driver from the platform data, i.e.
possibility using driver on systems without oftree support.
For search syscon device from the client drivers,
"syscon_regmap_lookup_by_pdevname" function was added.
Signed-off-by: Alexander Shiyan <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
DT node properties should not have "_". Replacing them by "-".
Signed-off-by: J Keerthy <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Add Flat Device Tree support to the AS3711 MFD driver. This patch just
allows to bind the driver to I2C devices, instantiated from the DT.
DT support for AS3711 cell drivers will be added in separate drivers.
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Reviwed-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
CONFIG_MFD_CROS_EC requires CONFIG_MFD_CORE for a couple of functions that
are declared but not defined:
ERROR: "mfd_remove_devices" [drivers/mfd/cros_ec.ko] undefined!
ERROR: "mfd_add_devices" [drivers/mfd/cros_ec.ko] undefined!
Fix it by selecting CONFIG_MFD_CORE anytime CONFIG_MFD_CROS_EC is enabled.
Signed-off-by: David Rientjes <[email protected]>
Acked-by: Simon Glass <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
To silent those:
CC [M] drivers/mfd/cros_ec_spi.o
drivers/mfd/cros_ec_spi.c: In function ‘cros_ec_spi_receive_response’:
drivers/mfd/cros_ec_spi.c:123:5: warning: format ‘%d’ expects argument of type
‘int’, but argument 4 has type ‘long int’ [-Wformat]
drivers/mfd/cros_ec_spi.c:157:3: warning: format ‘%d’ expects argument of type
‘int’, but argument 6 has type ‘long int’ [-Wformat]
drivers/mfd/cros_ec_spi.c:181:2: warning: format ‘%d’ expects argument of type
‘int’, but argument 4 has type ‘long int’ [-Wformat]
Signed-off-by: Samuel Ortiz <[email protected]>
This uses a SPI bus to talk to the ChromeOS EC. The protocol
is defined by the EC and is fairly simple, with a length byte,
checksum, command byte and version byte (to permit easy creation
of new commands).
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This uses an I2C bus to talk to the ChromeOS EC. The protocol
is defined by the EC and is fairly simple, with a length byte,
checksum, command byte and version byte (to permit easy creation
of new commands).
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Che-Liang Chiou <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This is the base EC implementation, which provides a high level
interface to the EC for use by the rest of the kernel. The actual
communcations is dealt with by a separate protocol driver which
registers itself with this interface.
Interrupts are passed on through a notifier.
A simple message structure is used to pass messages to the
protocol driver.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Che-Liang Chiou <[email protected]>
Signed-off-by: Jonathan Kliegman <[email protected]>
Signed-off-by: Luigi Semenzato <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
Signed-off-by: Vincent Palatin <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Mark writes:
extcon: arizona: Updates for v3.10
There's a bunch of different things in this series, I can split them out
if need be:
- Support for configuring the button detection circuit to reflect the
accessories supplied with the system.
- Improvements in the HPDET based detection scheme.
- Additional robustness against more pathological use cases.
- A few small standalone fixes.
The pm8921 driver has been broken for a while now, but was prevented
from compiling because the SSBI bus driver was missing. Now that SSBI
is present, pm8921 causes compile fails.
Until the pm8921 driver is fixed, mark it as BROKEN to prevent
compiles from failing.
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: David Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ASoC/extcon: arizona: Fix interaction between HPDET and headphone outputs
This patch series covers both ASoC and extcon subsystems and fixes an
interaction between the HPDET function and the headphone outputs - we
really shouldn't run HPDET while the headphone is active. The first
patch is a refactoring to make the extcon side easier.
Mark writes:
ASoC/extcon: arizona: Fix interaction between HPDET and headphone outputs
This patch series covers both ASoC and extcon subsystems and fixes an
interaction between the HPDET function and the headphone outputs - we
really shouldn't run HPDET while the headphone is active. The first
patch is a refactoring to make the extcon side easier.