A helper macro to make it a bit neater to define register ranges.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
iQIcBAABAgAGBQJSaizGAAoJELSic+t+oim9rCIQAJOBnpP55rjb37gRvj/aoxDZ
8Hm3EHNaztWjQ1XbUG5hxiyE8LPEk3H1r4610LjYWP63H25eLSXNpmrw0crzVyeU
oVBz9mDU6vFfZLdNrXN+j59bfW/eKcSwBNh144/w468ylThp1DlRIbFtoh8HeRME
ahbA3r0CBlwVQUrc2y8FmsLqFTtDckY55RMbujdD8qmysYNeBf3SOuvm5KZ68+x1
7gcCbrC53EpX6fvybw/yatladcmlWEV+pm9RiGrAwaJGVBp77yJFBWXwdb+jtCMi
/YkrvqQJi7bXoUoffA36y8aFxO2vUw9USGxiw/I+Cm8k3ob2FJ3pULWHHl39DbYj
8bWpcc3nLCWhgimV5S6ghlSHV6ReFz6e+z8OaSusJL9ynCTe909yDmAOWMGw+cmA
3+Isc4H2P5OnxU6Rar950qbiz8imxPAKT5I0JCuqXEvQ5XwKRdMeRtR1CzpkUW1D
Rcv/1trm2zyY67TgCjHoHmovuRLEIbIgzIUxF0zJ4rJ3giso+R2hz5gLuCoT/V4I
wx7I7d9E2nSLdejvtO6GDllomJUpVm4a68mZMn3eyAoA9oKDzkK4rVQtFATo86oQ
uakFmEIoUu1jvTF9CAqxHH3P1CyyS/rZ1+gXvqw78PifVL1SHhbtVSGOfnhhUkTW
nXzCOmwTXnr6e4TXAmrG
=PYRW
-----END PGP SIGNATURE-----
Merge tag 'range-macro' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
regmap: Helper macro for defining register ranges
A helper macro to make it a bit neater to define register ranges.
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Driver throw the warning message if dt node does not
have the info for VMBCH-Threshold and VMBCH2-Threshold.
These properties are optional property and hence it
is not mandatory to have these on DT node and in this case
it should not throw the warning message.
It creates noise from driver as follows:
[ 0.384605] tps65910 4-002d: VMBCH-Threshold not specified
[ 0.384616] tps65910 4-002d: VMBCH2-Threshold not specified
Removing the warning message from driver.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Currently probe of lpc_sch fails on Intel Poulsbo because of ACPI resource
conflicts. A solution is to set the ignore_resource_conflicts flag in the mfd cells.
Tested-by: Andreas Werner <andreas.werner@men.de>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@men.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Since the addition of continuous sampling mode and shared irq support,
the reg_lock lock can be taken with and without interrupts. This patch
uses the *_irq* variant which should be used in order to avaoid a deadlock.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Some platforms may not define CONFIG_MFD_SYSCON (or haven't syscon),
it can fix build error for these platforms.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The ams AS3722 is a compact system PMU suitable for mobile phones,
tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down
controller, 11 LDOs, RTC, automatic battery, temperature and
over-current monitoring, 8 GPIOs, ADC and a watchdog.
Add MFD core driver for the AS3722 to support core functionality.
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Florian Lobmaier <florian.lobmaier@ams.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid build breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Instead of detecting the "tc3589x" and hard-coding the number of
GPIO pins to 24, encode all the possible subtypes and set the
number of GPIO pins from the type.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This should fix the following warning at boot on OMAP5 uEVM
[ 8.783155] WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:883 __clk_enable+0x94/0xa4()
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid breakage in the future.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
'of_palmas_match_tbl' is always compiled in. Hence of_match_ptr() is
not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This registers ARIZONA_AOD_WKUP_AND_TRIG and ARIZONA_AOD_IRQ_RAW_STATUS
contain interrupt status bits and thus should be volatile. They are
correctly marked on wm5102 but not on wm5110, this patch changes this.
Furthermore volatile registers don't need defaults so remove those.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
When setting GPIO defaults we are required to make a distinction
between writing 0x0000 to the registers and leaving them untouched.
When we receive between 0x0000 and 0xFFFF (inclusive) from either
Platform Data or Device Tree, we should write the provided
configuration to the device. Conversely, when we receive >0xFFFF we
should leave the device configuration at its default setting.
This patch fixes a bug and ensures that configuration 0x0000 isn't
mistakenly written when the intention was to keep the default one.
Reported-by: Heather Lomond <heather.lomond@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
If platform data is passed when probing the device then it should take
precedence over Device Tree. This patch saves cycles in the pdata case
and prevents error messages when DT is not passed.
Reported-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Palmas device supports multiple i2c device address and the client
for these addressed are created in the driver as i2c_new_dummy().
The new devices are not getting released in error or removal path and
so it is causing resource leak.
Add the unregister of these newly created dummy devices to avoid resource
leaks.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
If Palams supports the system power controller and pm_power_off
is implemented through the Palmas driver then reset the pm_power_off
in driver remove.
This will avoid the call of Palmas driver after removal of driver.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The driver only support the device tree and sub modules are populated
through platform, the registration of sub devices through mfd_add_devices
has been removed.
Hence in remove path of the driver, it is not require to call
mfd_remove_devices.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This patch adds only of_match_table. There are no device specific
properties.
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The patch removes wakeup related code from the driver and plaftorm
data - it is already handled by i2c core using I2C_CLIENT_WAKE flag
from struct i2c_board_info. As a result MFD itself do not requires
platform data.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Move the workaround for double sending AUDIO_CODEC and AUDIO_DAC writes
into the SPI core, aiding refactoring to eliminate the ASoC custom I/O
functions and avoiding the extra writes for I2C.
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Since the conversion to regmap there has been no need for device level
locking for I/O as regmap provides locking so remove the locks.
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The devm_request_irq function allocates irq that is released
when a driver detaches. Thus, there is no reason to explicitly
call devm_free_irq in probe or remove functions.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The devm_request_irq function allocates irq that is released
when a driver detaches. Thus, there is no reason to explicitly
call devm_free_irq in probe or remove functions.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The ADC clock divider needs to be restored on resume as the register content
is lost when the ADC is powered down
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This adds a driver for the STw481x PMICs found in the Nomadik
family of platforms. This one uses pure device tree probing.
Print some of the OTP registers on boot and register a regulator
MFD child.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
We had specified the mask twice for FLL2_SYNC_BW change the first mask
definition in a bit definition to match the other fields.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Driver core sets driver data to NULL upon failure or remove.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The default value for the noise gate control register is changed in the
patch file, we need to reflect this in the defaults array, this patch
does so.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
DSPx_CONTROL_1 and DSPx_CLOCKING_1 are not volatile registers and are
incorrectly marked as such, fix this. Also add the DSP scratch
registers, which are frequently used to output debug info from the DSP
core.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
In some platforms, specially Thinkpad series, rts5249 won't be
initialized properly. So we need adjust some phy parameters to
improve the compatibility issue.
It is a little different between simulation and real chip. We have
no idea about which configuration is better before tape-out. We set
default settings according to simulation, but need to tune these
parameters after getting the real chip.
I can't explain every change in detail here. The below information is
just a rough description:
PHY_REG_REV: Disable internal clkreq_tx, enable rx_pwst
PHY_BPCR: No change, just turn the magic number to macro definitions
PHY_PCR: Change OOBS sensitivity, from 60mV to 90mV
PHY_RCR2: Control charge-pump current automatically
PHY_FLD4: Use TX cmu reference clock
PHY_RDR: Change RXDSEL from 30nF to 1.9nF
PHY_RCR1: Change the duration between adp_st and asserting cp_en from
0.32 us to 0.64us
PHY_FLD3: Adjust internal timers
PHY_TUNE: Fine tune the regulator12 output voltage
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL. It also removes unnecessary label such
as 'err_request'.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>