aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/twl6040-core.c
AgeCommit message (Collapse)Author
2011-10-12MFD: twl6040: function to query the vibra status for clientsPeter Ujfalusi
If the client only interested, if any of the vibra channels enabled, or if any of the channels are set to receive audio data via PDM. This function targets mainly the vibra driver, so it can check if it is allowed to execute effects ot not. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-12MFD: twl6040: Cache the vibra control registersPeter Ujfalusi
The vibra control register will be used from the ASoC codec driver as well. In order to avoid latency issues caused by I2C read access, cache the two control register within the core driver, so we do not need to reach out to the chip to read it back. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19MFD: twl6040: Fix power on GPIO handlingPeter Ujfalusi
Avoid requesting the audpwron gpio in case of ES1.0 revision. In the past we requested the gpio, but we did not free it up, since we made the check for the revision later. This results later checks for gpio validity to fail, leaving the gpio reserved (even after the driver has been removed). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19MFD: twl6040: Add accessor for revision IDPeter Ujfalusi
For client driver to use, if they need chip resvision information. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19MFD: twl6040: Remove global pointer for platform_devicePeter Ujfalusi
There is no need to keep global pointer for the platform device, since it is only used for dev_* prints, and the device pointer available within the twl6040 structure. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07MFD: twl6040: Remove enum for PLL trackingPeter Ujfalusi
There is no need to have two different types for tracking the selected PLL. Use only the defines, when dealing with the PLLs. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-07MFD: twl6040: Remove wrapper for threaded irq requestPeter Ujfalusi
Remove the twl6040_request_irq/free_irq inline functions, and use direct calls instead in the core driver to register the threaded irq. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-07MFD: twl6040: Demand valid interrupt configurationPeter Ujfalusi
In order to operate correctly twl6040 needs correct interrupt configuration. The slave drivers (vibra, and ASoC codec) will refuse to probe, if the interrupt configuration is not correct. In this way some checks can be removed from the code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-07MFD: twl6040: Use resource to provide irq number for slavesPeter Ujfalusi
Provide the irq number for slaves via resource on the platform device. The irq number configuration is done in the twl6040-core at probe time, so machine drivers do not need to be modified. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-04MFD: twl6040: Change platform data for soc codec driverPeter Ujfalusi
Pass twl4030_codec_data instead of the twl4030_audio_data for the ASoC codec driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-04mfd: twl6040: Add initial supportMisael Lopez Cruz
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>