aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/twl-core.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: Fix twl-core oops while calling twl_i2c_* for unbound driverIlya Yanok2011-12-201-8/+8
| | | | | | | | | Check inuse variable before trying to access twl_map to prevent dereferencing of uninitialized variable. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Cc: stable@kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds2011-11-061-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * '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 <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... 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
| * mfd: Add module.h to the implicit drivers/mfd usersPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | | | | | | | With the pending module.h cleanup, these files will fail to compile, unless they explicitly call out the include of this file. [omap-usb-host addition courtesy of Anand Gadiyar <gadiyar@ti.com>] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* | mfd: Fix twl4030 dependencies for audio codecThomas Weber2011-10-241-1/+1
|/ | | | | | | | | | | | | | | | | | | | The codec for Devkit8000 (TWL4030) was not detected except when build with CONFIG_SND_SOC_ALL_CODECS. twl-core.c still uses the CONFIG_TWL4030_CODEC for twl_has_codec(). In commit 57fe7251f5bfc4332f24479376de48a1e8ca6211 the CONFIG_TWL4030_CODEC was renamed into CONFIG_MFD_TWL4030_AUDIO, thatswhy the codec was not detected. This patch renames the CONFIG_ TWL4030_CODEC into CONFIG_MFD_TWL4030_AUDIO in twl-core.c. Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add tps65921 support from twl-coreOleg Drokin2011-07-311-0/+2
| | | | | | | | Very similar to TPS65920 List of differences: http://www.ti.com/litv/pdf/swcu066b Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: twl6040: Add initial supportMisael Lopez Cruz2011-07-041-3/+2
| | | | | | | | | | | | | | | | | | TWL6040 IC provides analog high-end audio codec functions for handset applications. It contains several audio analog inputs and outputs as well as vibrator support. It's connected to the host processor via PDM interface for audio data communication. The audio modules are controlled by internal registers that can be accessed by I2C and PDM interface. TWL6040 MFD will be registered as a child of TWL-CORE, and will have two children of its own: twl6040-codec and twl6040-vibra. This driver is based on TWL4030 and WM8350 MFD drivers. Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
* MFD: twl4030-audio: Rename platform dataPeter Ujfalusi2011-07-041-4/+4
| | | | | | | | | | | | | Allign the platform data names for twl4030 audio submodule: twl4030_audio_data: for the core MFD driver twl4030_codec_data: for ASoC codec driver twl4030_vibra_data: for the input/ForceFeedback driver To avoid breakage, change all depending drivers, files to use the new types. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add phoenix lite (twl6025) support to twl6030Graeme Gregory2011-05-261-37/+153
| | | | | | | | | | | Phoenix Lite is based on the twl6030 family of PMICs. It has mostly the same feature set of twl6030 but with small changes. The codec block has also been removed. It also has a new charger block and new features in its ADC block. VUSB handling also differs. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Reviewed-by: Mark Brown <broonie@opensource.wolfsonicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: TWL5030 version checking in twl-coreLesly A M2011-05-261-0/+62
| | | | | | | | | | Added API to get the TWL5030 Si version from the IDCODE register. It is used for enabling the workaround for TWL erratum 27. Signed-off-by: Lesly A M <leslyam@ti.com> Cc: Nishanth Menon <nm@ti.com> Cc: David Derrick <dderrick@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Enabling twl4030_wdt and pwrbutton only for TritonKeerthy2011-03-231-2/+2
| | | | | | | | | | Enabling twl4030_wdt and twl4030_pwrbutton only for Triton i.e for TWL4030 and TWL5030. This is to be excluded for Phoenix TWL6030. Tested OMAP4 blaze, OMAP2430, OMAP3630 boot up. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Balaji T K <balajitk@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* regulator: twl: add clk32kg to twl-regulatorBalaji T K2011-03-231-0/+4
| | | | | | | | | | | | In OMAP4 Blaze and Panda, 32KHz clock to WLAN is supplied from Phoenix TWL6030. The 32KHz clock state (ON/OFF) is configured in CLK32KG_CFG_[GRP, TRANS, STATE] register. This follows the same register programming model as other regulators in TWL6030. So add CLK32KG as pseudo regulator. Signed-off-by: Balaji T K <balajitk@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix twl_probe section mismatch warning in mfd/twl-core.cBryan Wu2011-01-141-1/+1
| | | | | | | | | | | | Fix the following section mismatch warning when building omap2plus_defconfig: WARNING: vmlinux.o(.data+0x47d7c): Section mismatch in reference from the variable twl_driver to the function .init.text:twl_probe() Signed-off-by: Bryan Wu <bryan.wu@canonical.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: TWL6030: OMAP4: Registering the TWL6030-usb deviceHema HK2010-12-101-5/+39
| | | | | | | | | | | | | Registering the twl6030-usb transceiver device as a child to twl6030 core. Removed the NOP transceiver init call from board file. Populated twl4030_usb_data platform data structure with the function pointers for OMAP4430 internal PHY operation to be used by twl630-usb driver. Signed-off-by: Hema HK <hemahk@ti.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* mfd: Add twl4030_bci platform_data backGrazvydas Ignotas2010-10-291-0/+17
| | | | | | | | | | Now that we have twl4030 charger driver, add back it's platform_data (which was removed by f7ea2dc59ed46dcd0f1cfaccda02211f4507207b as unused). Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix twl-core sparse warningG, Manjunath Kondaiah2010-10-291-1/+1
| | | | | | | | | | | | Fixes below sparse warning. drivers/mfd/twl-core.c:258:20: warning: symbol 'twl_map' was not declared. Should it be static? Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com> Cc: linux-arm-kernel@lists.infradead.org Cc: Tony Lindgren <tony@atomide.com> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Switch twl-core over to defines in twl.hFelipe Balbi2010-10-291-12/+9
| | | | | | | | use the new definitions on twl header for code consistency. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* ASoC: multi-component - ASoC Multi-Component SupportLiam Girdwood2010-08-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends the ASoC API to allow sound cards to have more than one CODEC and more than one platform DMA controller. This is achieved by dividing some current ASoC structures that contain both driver data and device data into structures that only either contain device data or driver data. i.e. struct snd_soc_codec ---> struct snd_soc_codec (device data) +-> struct snd_soc_codec_driver (driver data) struct snd_soc_platform ---> struct snd_soc_platform (device data) +-> struct snd_soc_platform_driver (driver data) struct snd_soc_dai ---> struct snd_soc_dai (device data) +-> struct snd_soc_dai_driver (driver data) struct snd_soc_device ---> deleted This now allows ASoC to be more tightly aligned with the Linux driver model and also means that every ASoC codec, platform and (platform) DAI is a kernel device. ASoC component private data is now stored as device private data. The ASoC sound card struct snd_soc_card has also been updated to store lists of it's components rather than a pointer to a codec and platform. The PCM runtime struct soc_pcm_runtime now has pointers to all its components. This patch adds DAPM support for ASoC multi-component and removes struct snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec or runtime PCM level basis rather than using snd_soc_socdev. Other notable multi-component changes:- * Stream operations now de-reference less structures. * close_delayed work() now runs on a DAI basis rather than looping all DAIs in a card. * PM suspend()/resume() operations can now handle N CODECs and Platforms per sound card. * Added soc_bind_dai_link() to bind the component devices to the sound card. * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove DAI link components. * sysfs entries can now be registered per component per card. * snd_soc_new_pcms() functionailty rolled into dai_link_probe(). * snd_soc_register_codec() now does all the codec list and mutex init. This patch changes the probe() and remove() of the CODEC drivers as follows:- o Make CODEC driver a platform driver o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core. o Removed all static codec pointers (drivers now support > 1 codec dev) o snd_soc_register_pcms() now done by core. o snd_soc_register_dai() folded into snd_soc_register_codec(). CS4270 portions: Acked-by: Timur Tabi <timur@freescale.com> Some TLV320aic23 and Cirrus platform fixes. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> TI CODEC and OMAP fixes Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Samsung platform and misc fixes :- Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> MPC8610 and PPC fixes. Signed-off-by: Timur Tabi <timur@freescale.com> i.MX fixes and some core fixes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> J4740 platform fixes:- Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> CC: Tony Lindgren <tony@atomide.com> CC: Nicolas Ferre <nicolas.ferre@atmel.com> CC: Kevin Hilman <khilman@deeprootsystems.com> CC: Sascha Hauer <s.hauer@pengutronix.de> CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp> CC: Kuninori Morimoto <morimoto.kuninori@renesas.com> CC: Daniel Gloeckner <dg@emlix.com> CC: Manuel Lauss <mano@roarinelk.homelinux.net> CC: Mike Frysinger <vapier.adi@gmail.com> CC: Arnaud Patard <apatard@mandriva.com> CC: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* OMAP4: PMIC: Rename twl6030_codec as twl6040_codecOlaya, Margarita2010-03-181-2/+2
| | | | | | | | | | | Correction for chips: twl6030 is Phoenix Power chip twl6040 is Phoenix Audio chip Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* mfd: Add twl6030 base addr for ID0, ID1, ID2Balaji T K2010-03-071-2/+5
| | | | | | | | | Add base address for generic slave ID0, ID1, ID2 and introduced one more entry to align RTC module number between twl4030 and twl6030 Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Disable TWL4030/5030 I2C1/I2C4 internal pull-upsMoiz Sonasath2010-03-071-0/+13
| | | | | | | | | | | | | | | | | | This patch disables TWL4030/5030 I2C1 adn I2C4(SR) internal pull-up, to use only the external HW resistor >=470 Ohm for the assured functionality in HS mode. While testing the I2C in High Speed mode, it was discovered that without a proper pull-up resistor, there is data corruption during multi-byte transfer. RTC(time_set) test case was used for testing. From the analysis done, it was concluded that ideally we need a pull-up of 1.6k Ohm(recomended) or atleast 470 Ohm or greater for assured performance in HS mode. Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Allen Pais <allen.pais@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix twl_has_pwrbutton typoEduardo Valentin2010-03-071-1/+1
| | | | | | | | | Change the typo CONFIG_INPUT_TWL4030_PWBUTTON_MODULE in the twl_has_pwrbutton definition to CONFIG_INPUT_TWL4030_PWRBUTTON_MODULE. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Remove leftover from discontinued TWL4030 battery patchChristoph Egger2010-03-071-19/+0
| | | | | | | | | | | The TWL4030_BCI_BATTERY config option originates from a patch to the omap git tree. However inclusion in linux was seemingly rejected and the functionality nears inclusion under a different name so this removes the bits of the old version that made it into the mainline kernel again. Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* OMAP4: PMIC: Add support for twl6030 codecMisael Lopez Cruz2010-02-241-3/+15
| | | | | | | | | | | | | | | | | | | | | | | In order to have TWL6030 CODEC driver as a platform driver, codec data should be passed through twl_platform_data structure. For twl6030 audio codec, the following data may be passed: - audpwron_gpio: gpio line used to power-up/down the codec. A low-to-high transition powers codec up. Setting audpwron_gpio to a negative value means that codec will use manual power sequence instead of automatic sequence - naudint_irq: irq line for audio interrupt. twl6030 drives NAUDINT line to low when an interrupt (codec ready, plug insertion/removal, etc) is detected However, codec driver can operate if any or none of them are passed. Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com> Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* mfd: Add twl6030 regulator subdevicesRajendra Nayak2009-12-141-3/+48
| | | | | | | | | | | | | | This patch adds initial support for creating twl6030 PMIC specific voltage regulators in the twl mfd driver. Board specific regulator configurations will have to be passed from respective board files. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add support for twl6030 irq frameworkBalaji T K2009-12-141-14/+106
| | | | | | | | | | | | | 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 PMIC Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Rename twl4030_ routines in twl-regulator.cRajendra Nayak2009-12-131-1/+1
| | | | | | | | | | | | This patch renames all twl4030_ functions to twl so that regulator driver can be reused by Triton - TWL4030 and Phoenix - TWL6030. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Rename twl4030_ routines in rtc-twl.cBalaji T K2009-12-131-1/+1
| | | | | | | | | | | This patch renames all twl4030_ functions to twl_ so that RTC driver can be shared between Triton and Phoenix. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Nayak Rajendra <rnayak@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Rename all twl4030_i2c*Balaji T K2009-12-131-63/+73
| | | | | | | | | | | | 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.c Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Rename twl4030* driver files to enable re-useSantosh Shilimkar2009-12-131-0/+929
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 <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>