OMAP4: McPDM: Add McPDM pins initialization

Audio Noise Issue may occur due to McPDM_DOUT floating while McPDM_CLK
is generated at the beginning of the Audio transfer to Audio IC (this
situation is created by OMAP4 McPDM module which need some time before
providing the data). A WA is to enable the internal pull-down on OMAP
McPDM_DOUT pin to avoid having the pin floating.

Pins initialization was added to make sure that McPDM pins initialized
correctly.

Change-Id: I04fe52b63bf72da0431099cbedcb7f9669ac4f27
Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
gccore: create a separate state for pulse skipping

When a blt has been committed enter a low latency power state

Change-Id: Ie94c15db496f3943317f74e20808fb8393e32734
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
gccore: move power off directly to module exit

In order to remove any doubts about when off state should be achieved
move the power off to the module exit.

Change-Id: I023cb9e9f275c2b6143709dd16a4a839875e6888
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
gccore: Remove Android early suspend late resume handlers

Early suspend/late resume handlers are primarily present for the purpose of getting
the screen into a low power state for Android.

On the OMAP platform the principle means of handling this is that DSSCOMP will
blank the screen.

In order to enter the lowest power state gccore should use the standard Linux
suspend/resume handlers.

Change-Id: I3dded7c5c83bc2f03048d6c8ef32fce697ab847c
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
omap_gcx: enhance to provide omap operations

In order to provide the gccore driver a function to check the state
of the prcm, we will put a function pointer in the gcx platform
device.

The previous platform device entries were not used by the gccore driver.

Change-Id: I7e3f1755261d99fe022964a2a26db6ba7f42092e
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
gccore: enable suspend handler and poll for idle status

When a system level suspend event occurs the gccore driver
will set the GCHOLD bit in the GC320 and wait for the module
to become idle.

Change-Id: I139b57ede6f42c8c08689eec21d2d8d919ea2038
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
gcx: when a surface geometry exceeds the size of the surface, return an error to avoid an mmu fault.

Change-Id: I1e8146c9b8b1c4a8e8d9024e167e4f3e39575f9c
Signed-off-by: Craig Stout <craig.stout@ti.com>
Merge "gccore: create a separate state for pulse skipping" into p-android-omap-3.0
Merge "gccore: move power off directly to module exit" into p-android-omap-3.0
Merge "gccore: Remove Android early suspend late resume handlers" into p-android-omap-3.0
Merge "omap_gcx: enhance to provide omap operations" into p-android-omap-3.0
Merge "gccore: enable suspend handler and poll for idle status" into p-android-omap-3.0
Merge "gcx: when a surface geometry exceeds the size of the surface, return an error to avoid an mmu fault." into p-android-omap-3.0
Revert "gcx: moved GC320 pixel cache flush to the end of the batch."

This reverts commit b61754229ee5f663a7445dae29b490d89d8e4f73.

Change-Id: Ia4fc5ac8764e9658885eb996995a2b4c6e39d6bc
Signed-off-by: Craig Stout <craig.stout@ti.com>
Revert "gcx: optimized programming of the destination."

This reverts commit fd2d28aabd51cd835d0339d835fb031ff4386f0e.

Change-Id: I6de8916a42f93856fefb79ed77d1818a28226a5b
Signed-off-by: Craig Stout <craig.stout@ti.com>
gccore: (work-around) attempt to power off gc320 during early suspend

Ideally we would cut clocks after each batch blit however it appears
that frequent off / on of the gc320 is still unstable. So handle
the early suspend anyway.

Change-Id: Ie47600863fcbe670bf67bc00aff8df9f462851b4
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
MFD: twl6040-codec: Add test registers definitions

Add definitions for test registers.

Change-Id: Ic046f4639781981ca2421f5b75c0c5408a3dc976
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
MFD: twl6040-codec: Add uEvent based event notification

Add initial support for a kobject event based notification mechanism
to inform userspace about TWL6040 events like handsfree overcurrent,
vibrator overcurrent, thermal event.

Since the events can be handled in other drivers apart from the MFD,
a new API (twl6040_report_event) is created so that MFD clients can
notify their events using a single kobject.

Change-Id: I07f71d1693a6eb189ca07fffeb3ebc12e539d4ae
Signed-off-by: Chris Kelly <c-kelly@ti.com>
MFD: twl6040-codec: Add register cache

Add register cache and define register operations (read, write,
set_bits, clear_bits) on cache only. So register operations
performed on I2C registers are now differentiated.

Register operations APIs exported by TWL6040 MFD are a wrapper
to its I2C counterparts at the moment.

Change-Id: I76137099e6264de9ac3213c596f662a50299aa82
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
MFD: twl6040-codec: Add register supply query APIs

Add a new set of APIs to TWL6040 MFD to query the supply of its
registers: twl6040_get_reg_supply(), twl6040_reg_is_vdd() and
twl6040_reg_is_vio().

Change-Id: Ic320ad7759c66d705f6025361cd6a296ac695dd9
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>