7f8279ce04589a2e0f29b865c3af40609b0ea08d |
|
23-Jan-2014 |
Lee Jones <lee.jones@linaro.org> |
mfd: wm8994-core: Naturalise cross-architecture discrepancies If we compile the WM8994 for a 64bit architecture we receive the following warnings: drivers/mfd/wm8994-core.c: In function ‘wm8994_i2c_probe’: drivers/mfd/wm8994-core.c:639:19: warning: cast from pointer to integer of different size wm8994->type = (int)of_id->data; ^ Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
ad59de489bf4c81b90b25fb9017f0e6d141f5415 |
|
18-Nov-2013 |
Geert Uytterhoeven <geert@linux-m68k.org> |
mfd: wolfson: Constify struct mfd_cell where possible As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting refcounting pointers in original mfd_cell arrays"), the "cell" parameter of mfd_add_devices() is "const" again. Hence make all cell data passed to mfd_add_devices() const where possible. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
b5f90240e1ef0568a8c666da3c3be4c6a682c5a6 |
|
06-Sep-2013 |
Mark Brown <broonie@linaro.org> |
mfd: wm8994: Inline register I/O functions Since the register I/O functions are all simple wrappers for the regmap equivalents inline them to provide a small code size saving and an example of good practice. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
ebe38f80b290fe6d86404d0b21eae479d4aeb21f |
|
17-Jul-2013 |
Mark Brown <broonie@linaro.org> |
mfd: wm8994: Remove check for active audio in runtime suspend Since enabling VMID takes a runtime PM reference there is no need to suppress suspend when doing a runtime suspend. Similarly the digital inputs and outputs are DAPM widgets and therefore the ASoC core will be holding a reference for them. This used to be required when integration with system suspend was being bodged. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
4dd0b2ba1d8c96d18c4a5624b167e267671d047f |
|
17-Jul-2013 |
Mark Brown <broonie@linaro.org> |
mfd: wm8994: Remove unneeded check for JACKDET The jack detection code holds runtime PM references when required so there is no need for suspend to do any checks. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
da002d8924a49e8d8e289d07d46339e12dd56899 |
|
01-Jul-2013 |
Mark Brown <broonie@linaro.org> |
mfd: wm8994: Remove duplicate check for active JACKDET Probably the result of a mismerge or rebase failing to notice that the hunk had already been applied. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
f3799e93720b8b722944d86f7a2a0599f5a9d716 |
|
17-May-2013 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Reset device during probe Ensure that the device is in a known good state. This should have little practical impact as the runtime PM will reset the device shortly after probe but it's neater. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
20fb277250816d6c3ff326552be0fea4173fd8ca |
|
11-Apr-2013 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Add some OF properties Add properties for some of the more important bits of platform data and fill out the binding document. Not all of the current platform data is suitable for the sort of fixed configuration that is done using DT, some of it should have runtime mechanisms added instead and some is unlikely to ever be used in practical systems. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
39aa3b5a59ab1baff809821ed1db9682a8245656 |
|
11-Apr-2013 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Add device ID data to WM8994 OF device IDs We can actually read this back from the device but we use this when registered using standard I2C board data registration so make sure it's there for OF too. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
6394678e6e563b196122e911daa911973f9cf7ab |
|
22-Mar-2013 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Don't use system PM operations For realistic systems the power management is controlled entirely via runtime PM - if the device is not runtime suspended then the suspend will abort without doing anything as functionality such as accessory detection or audio bypass will require the device to be enabled while if the device is runtime suspended it is already in the lowest power state. This means that system suspend is redundant and can be removed which avoids issues with attempting to double disable the regulators. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
222bc784dcdc62d9402c580502d579914dbf07bc |
|
20-Feb-2013 |
Jingoo Han <jg1.han@samsung.com> |
mfd: wm8994: Silence bogus warning in wm8994_device_init() '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 <jg1.han@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
f1c68e4dd455eeaf30647a52595a7daf62fc5492 |
|
08-Jan-2013 |
Sachin Kamat <sachin.kamat@linaro.org> |
mfd: wm8994: Use devm_regulator_bulk_get API devm_regulator_bulk_get is device managed and saves some cleanup and exit code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
d54e17f9f1d14706e6df1d5509e7eb5878bcd766 |
|
27-Nov-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Make current device behaviour the default As the wm8994 series of devices are now very mature make the current behaviour of the devices the default behaviour, any future revisions are likely to have only minor updates. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
4740f73fe5388ab5d22d552d2a0dacc62418a70c |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
mfd: remove use of __devexit CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
a73e5df16b52a12f5210b20484e74c45ae25d04c |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
mfd: remove use of __devinitconst CONFIG_HOTPLUG is going away as an option so __devinitconst is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
f791be492f76dea7b0641ed227a60eeb2fa7e255 |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
mfd: remove use of __devinit CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
84449216b01f9c2b4c9b1882f9d6abba07b7b7ca |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
mfd: remove use of __devexit_p CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
a8a8fc287dd7497b3adb2f2952513849ab6506eb |
|
08-Oct-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Store platform data in device This is better style as platform data is supposed to be discardable after init (though hotplug usually prevents this) and will ease implementation of device tree property bindings. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
fee546ce8cfd9dea1f53175f627e17ef5ff05df4 |
|
22-Nov-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Add support for WM1811 rev E This is supported identically to the previous revisions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
19afa16f973c1f75bf3a7e70a0f79bcd7232f2b7 |
|
05-Oct-2012 |
Andi Kleen <ak@linux.intel.com> |
sections: fix section conflicts in drivers/mfd Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
0848c94fb4a5cc213a7fb0fb3a5721ad6e16f096 |
|
11-Sep-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: core: Push irqdomain mapping out into devices Currently the MFD core supports remapping MFD cell interrupts using an irqdomain but only if the MFD is being instantiated using device tree and only if the device tree bindings use the pattern of registering IPs in the device tree with compatible properties. This will be actively harmful for drivers which support non-DT platforms and use this pattern for their DT bindings as it will mean that the core will silently change remapping behaviour and it is also limiting for drivers which don't do DT with this particular pattern. There is also a potential fragility if there are interrupts not associated with MFD cells and all the cells are omitted from the device tree for some reason. Instead change the code to take an IRQ domain as an optional argument, allowing drivers to take the decision about the parent domain for their interrupts. The one current user of this feature is ab8500-core, it has the domain lookup pushed out into the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
9282a7b9f058ec9e086ecdb53464b151ecf323fe |
|
23-Aug-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Update WM1811 register patches for latest evaluation Further evaluation of the device has yielded some improvements to the device configuration. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
55692af5eb587f7592d6c2713e1e0eeaab0f6c31 |
|
11-Sep-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: core: Push irqdomain mapping out into devices Currently the MFD core supports remapping MFD cell interrupts using an irqdomain but only if the MFD is being instantiated using device tree and only if the device tree bindings use the pattern of registering IPs in the device tree with compatible properties. This will be actively harmful for drivers which support non-DT platforms and use this pattern for their DT bindings as it will mean that the core will silently change remapping behaviour and it is also limiting for drivers which don't do DT with this particular pattern. There is also a potential fragility if there are interrupts not associated with MFD cells and all the cells are omitted from the device tree for some reason. Instead change the code to take an IRQ domain as an optional argument, allowing drivers to take the decision about the parent domain for their interrupts. The one current user of this feature is ab8500-core, it has the domain lookup pushed out into the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
1a2017b7143d9d0ec1b75078e76c6f55a2e55d17 |
|
29-Jun-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Also restore wm8994 GPIO IRQ masks after reset This ensures that if we are using a GPIO as a wake source it continues to function while we're suspended. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
ed393dcd419fd2a00d33cd169dded7303e1c0968 |
|
29-Jun-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Use regcache_sync_region() to sync wm8994 GPIO registers on suspend Now we have regcache sync region we can use it to do a more efficient sync of the pin configuration after we reset the device during suspend. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
78a27cd3e891e8da343942aec10c926eaffabd63 |
|
11-Jun-2012 |
Chris Rattray <crattray@opensource.wolfsonmicro.com> |
mfd: Restore wm8994 pin configuration after reset during suspend Ensure that we leave the device with the pins in the expected configuration if we leave it in reset over suspend, avoiding any interoperation problems with other devices in the system. Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
ceb57d27e28a8f979cbfd6391b7da6da51484059 |
|
07-May-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Convert wm8994 to module_i2c_driver() Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
cc7a727941193e3e59be2e9f6522eb78bc7ee909 |
|
07-May-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Read CUST_ID from the wm8994 device Read CUST_ID from the device and log it for diagnostics. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
ee42b3aa3791263a6cca36856b306cd1ae897ebf |
|
18-Feb-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Add __devinit and __devexit annotations for probe and remove Fixes warnings and needed for correctness. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
d2cb87c23e8514ca49c85adc5924999927bb9494 |
|
20-Feb-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Test for jack detection when deciding if wm8994 should suspend The jack detection on WM1811 is often required during system suspend, add it as another check when deciding if we should suspend. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
ee67b0cd5ed69953a6306efabd6e9e23bff09178 |
|
06-Feb-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: We don't need to runtime resume by default This is the default state that the runtime PM infrastructure expects so instead just kick the runtime PM core to suspend us if we're not doing anything (as is default). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
a0cc0209abb9fe2b9ab71aa41be70eddd0cbdd61 |
|
28-Feb-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Improve performance of later WM1811 revisions Apply tunings from earlier silicon revisions to revisions up to D and also tweak an additional setting for improved DC servo performance. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
9db4249fa0fb808ea0c27dfe0fcedc1884ebfb5a |
|
30-Jan-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Convert to devm_regmap_init() Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
462835e4a7f898662cc30064a33177af4823ef9d |
|
21-Jan-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd/ASoC: Convert WM8994 driver to use regmap patches Early revisions of several of the WM8994 variants have register updates to improve performance. Move these over to using the regmap patch system instead of open coding them in the audio driver. Since the regmap init is done by the MFD the code is moved there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
abc0cceaeeab6d3101f4d9492063a4e4ae813b85 |
|
21-Jan-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add __devinit and __devexit annotations in wm8994 The wm8994_device_init() and wm8994_device_exit() functions were not annotated as device init and exit functions, meaning they shouldn't reference __devinitdata. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Oritz <sameo@linux.intel.com>
|
027d676650e690c6bcb479d96fb601e91213ee56 |
|
18-Feb-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: wm8994: Add __devinit and __devexit annotations for probe and remove Fixes warnings and needed for correctness. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
e7c248a049c2aac21bded0b0722caee6f0e57256 |
|
20-Feb-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Test for jack detection when deciding if wm8994 should suspend The jack detection on WM1811 is often required during system suspend, add it as another check when deciding if we should suspend. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
3befc925cb658227fb207f20e6719987f7ee3190 |
|
09-Jan-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Put WM8994 into cache only mode when suspending This is required by the ASoC driver for very low power modes where the device is fully idle but we want to update controls. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
73fe6b2bc9dac9906bbe59475a681194db780370 |
|
30-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add WM1811A device ID to wm8994 driver The WM1811A is a variant of the WM1811 with pin configuration changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
35ca98423a4c61decc20cd1d1e78a7fd7111e4db |
|
22-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add basic device tree binding for wm8994 Add a placeholder device tree binding for the wm8994 driver. At present the binding is essentially null as none of the platform data is supported, and at least some of that will depend on the pending regulator bindings. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
289aabdaf943f3676a16908e2c3cc1a1f9877ccb |
|
03-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Disable more pulls on WM8994 Disable more pulls by default on WM8994 for a small current saving. Since some designs do leave SPKMODE floating provide platform data to allow that to be left enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
42ab84fb0a3db786567158bf0006a35131714eb5 |
|
25-Oct-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Convert wm8994 to devm_kzalloc() Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
b5488b6e868454fb10d23278de5038cda98b13ab |
|
05-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Update wm8994 active device checks for WM1811 This didn't go in as part of the original MFD patch for WM1811 due to cross tree issues. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
a3462490b4d354c94031bfe644c65d374fc04aa6 |
|
01-Dec-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Test for jack detection when deciding if wm8994 should suspend The jack detection on WM1811 is often required during system suspend, add it as another check when deciding if we should suspend. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
7ed5849c2861faf9c13f027868f635bd782a50e5 |
|
01-Dec-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Mark WM1811 GPIO6 register volatile for later revisions For later chip revisions the WM1811 GPIO6 register is always volatile so store the device revision when initialising the driver and then check at runtime if we're running on a newer device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
71d171847df47110fa686f60a57543aaf91be3b9 |
|
30-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add WM1811A device ID to wm8994 driver The WM1811A is a variant of the WM1811 with pin configuration changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
443e67ed8d40c0e08619f087da4332dbbff47954 |
|
30-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Correct revision display for WM1811 revision D As WM1811 revision C was transparent to software the revision IDs for subsequent revisions are one less than they would normally be. Correct for this in log messages. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
346978980a781a5b434c48531cf29cadf5b83999 |
|
03-Dec-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Initialise WM8994 register cache after reading chip ID registers The different devices handled by the WM8994 can be distinguished using their ID registers so we don't need to rely on the user having registered the device correctly. Instead do the initial regmap setup with a minimal configuration only supporting physical I/O and then configure the cache once we have identified the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
c3f1386171a100d27d9fb978f474a6a330888af5 |
|
25-Oct-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Enable register cache for wm8994 devices As part of this we provide information about the registers that exist in the device to the regmap core, drop the small amount of cache that the core had been using and let regmap do the sync. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
be79cf2fd258bf4566d8abf28b8c3ac3b985b1b4 |
|
25-Oct-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Don't hard code the reset value for WM8994 devices Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
26c34c25e54b4a352596d88c6e44a239dab8e1c5 |
|
03-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Disable more pulls on WM8994 Disable more pulls by default on WM8994 for a small current saving. Since some designs do leave SPKMODE floating provide platform data to allow that to be left enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
2fa33494676636f3455daddda33b7c3d5d932f2f |
|
25-Oct-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Convert wm8994 to devm_kzalloc() Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
cf763c2e606e9e427ed854c470911e816be1101e |
|
22-Nov-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add basic device tree binding for wm8994 Add a placeholder device tree binding for the wm8994 driver. At present the binding is essentially null as none of the platform data is supported, and at least some of that will depend on the pending regulator bindings. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
5f40c6b6508b622ea03c6b32c57b2e26eba2e4f1 |
|
13-Aug-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add more checks for WM8994 being active during suspend Enhancements to the WM8994 audio driver and new features on more modern devices in the series mean that we can no longer rely on VMID being active as an indication that the device is active. Add further checks for digital paths and microphone detection. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
881de67046f424fc3a6e05b1c681c12afd94e802 |
|
22-Aug-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Allow WM8994 LDO enable pulls to be disabled In systems where the LDO enables are always driven (for example, being connected to an always on supply rail or a GPIO which is driven by the CPU even in suspend) then we can disable the pull downs on the LDO for a small power savings. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
b1f43bf3a52b085b786adf0b719712df574955f9 |
|
24-May-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add WM1811 support The WM1811 is mostly register compatible with the WM8994 and WM8958, providing a high performance audio hub CODEC in a small form factor suitable for ultra compact system designs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
d6c645fc00777a6f8a7df1f580065ec30c71be7b |
|
17-Jun-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Convert WM8994 to use new register map API Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
f85dbda076a11c18b396f8acfff929e53159e56d |
|
17-Jun-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Fix error handling if BUG() isn't enabled in WM8994 Even if we would've BUG()ed we should still tidy up after ourselves if that isn't enabled in the kernel config. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
98ae1ccaf62d5006884e01159bf7a63174b0fc03 |
|
07-Jun-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Fix WM8994 IRQ register cache restore on resume When the byte swap was factored out into the per-register I/O functions the register restore for the IRQ mask cache (which we use and store in CPU native format for the interrupt handler) was not updated to do a byte swap when it uses the bulk I/O. Fix this by writing the cache out one register at a time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
a2495bc727e2dd8421fb85c80e38f9a4a4c1e58e |
|
02-Jun-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Restructure wm8994-core device revision handling Switch on the device type before revision since anything we do here will be device as well as revision specific. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
316b6cc081b112546842d44ded21512bd8454a85 |
|
18-Mar-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Push byte swaps out of wm8994 bulk read path For consistency with the write path push byte swaps of the WM8994 register data out of the bulk read data path into the per-register APIs. The only user of the bulk register read is the interrupt code which is updated to do the swaps itself part of this patch. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
07e73fbb2d52434e6b61019326f35040357e8efb |
|
17-Mar-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Constify WM8994 write path Allow const buffers to be passed in without type safety issues. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
4277163c2a451fd8db0883cde5e55cf61a70fe85 |
|
17-Mar-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Push byte swap out of WM8994 bulk I/O For bulk I/O it is both convenient and more sensible to pre-swap the data rather than doing the swap as part of the I/O operation so move the byte swaps we're currently doing into the core write function into the register based functions, giving the bulk write function a straight pass through to the chip. This leaves reads inconsistent, this will be addressed as a followup patch. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
334e9ab8f9bb90ddf1eff0b07609961a628064b6 |
|
17-Mar-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Avoid copying data in WM8994 I2C write As well as providing a trivial performance optimisation this also avoids allocating a copy of the message on the stack which is beneficial when doing large transfers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
aad343107b4c153dd9f3ffc3d0f32558a25438e9 |
|
17-Mar-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Staticise WM8994 PM ops They're not exported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
e93c53870c6d77c40de8981da238af947d6aa084 |
|
10-Mar-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add WM8994 bulk register write operation Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
f40dff9edbf1daa14068542d60ae22df78e8c74a |
|
21-Feb-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Put WM8994 into reset when suspending Ensure that the chip is in the lowest power mode possible when suspended by performing a soft reset on it. On early silicon revisions the lowest power modes can't be entered without using reset so we can't achieve equivalent results within the individual drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
77bd70e9009eab6dbdef3ee08afe87ab26df8dac |
|
04-Feb-2011 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Don't suspend WM8994 if the CODEC is not suspended ASoC supports keeping the audio subsysetm active over suspend in order to support use cases such as audio passthrough from a cellular modem with the main CPU suspended. Ensure that we don't power down the CODEC when this is happening by checking to see if VMID is up and skipping suspend and resume when it is. If the CODEC has suspended then it'll turn VMID off before the core suspend() gets called. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
d450f19eea0c3f64d60dc37655bae03b2455e5bb |
|
26-Nov-2010 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Implement runtime PM for WM8994 core driver Allow the WM8994 to completely power off, including disabling the LDOs if they are software controlled, when it goes idle. The CODEC subdevice controls activity for the MFD as a whole. If the GPIOs need to be used while the device is active runtime PM should be disabled for the device by machine specific code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
559e0df6b3ffbc218a11bb9dada5320a217cb7a6 |
|
31-Aug-2010 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add initial WM8958 support The WM8958 is a derivative of the WM8994 which is register compatible with the addition of some extra features, mostly in the CODEC side. The major change visible at the MFD level is that rather than a single DBVDD supply we now have three separate DBVDDs so we must request and enable a different set of supplies. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
|
d0a11693967295772d2a7c22b6b37eb20684e709 |
|
09-Aug-2010 |
Axel Lin <axel.lin@gmail.com> |
mfd: Fix incorrect kfree(i2c) in wm8994-core i2c_driver probe The i2c_client received in probe() should not be kfree()'d. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
fccbd21f333638a33efb6fc65fff58d1bc2a90bd |
|
04-Aug-2010 |
Axel Lin <axel.lin@gmail.com> |
mfd: Fix wm8994_device_init() return value wm8994_device_init() will return 0 in the case of kzalloc fail in current implementation. This patch fixes the return value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
c9fbf7e070bbf9cc7adc1420df87706c62cb04ed |
|
26-Mar-2010 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add WM8994 interrupt controller support The WM8994 has an interrupt controller which supports interrupts for both CODEC and GPIO portions of the chip. Support this using genirq, while allowing for systems that do not have an interrupt hooked up. Wrapper functions are provided for the IRQ request and free to simplify the code in consumer drivers when handling cases where IRQs are not set up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
|
5a0e3ad6af8660be21ca98a971cd00f331318c05 |
|
24-Mar-2010 |
Tejun Heo <tj@kernel.org> |
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit 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 allmodconfig 8. 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>
|
7731074ab21745cde00578148ce760df107eaf27 |
|
07-Feb-2010 |
Joonyoung Shim <jy0922.shim@samsung.com> |
mfd: Fix WM8994 error handling This patch fixes wrong goto statement for error handling on probe. Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
9e50108668a70a9927257298bd4e679300124420 |
|
29-Jan-2010 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
mfd: Add initial WM8994 support The WM8994 is a highly integrated ultra low power audio hub CODEC. Since it includes on-board regulators and GPIOs it is represented as a multi-function device, though the overwhelming majority of the functionality is provided by the ASoC CODEC driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|