video:sunxi:hdmi:Import CEC support from A10s SDK

This commit seems to have suspend/resume display logic implemented.
Logic broadcasts "turn on" message for TV when device is turned on.
TODO: Give API for user space and remove application logic from kernel.
video:sunxi:disp:Remove illegal direct dependency to hdmi module
video:Import hdmi-cec framework

Framework was found from https://github.com/ffainelli/linux-hdmi-cec

Signed-off-by: Jari Helaakoski <tekkuli@gmail.com>
hdmi-cec:Fix oops when client closes connection

Signed-off-by: Jari Helaakoski <tekkuli@gmail.com>
axp_power: change battery type from LiFe to most common LiIon

LiFe not common for tablets, mobile devices, kernel have no way
to know what battary are using, so change it to be right in most
cases
sunxi: unify sun4i and sun5i platform devices to single

100% same except i2c naming

v2 rebasing
sunxi:i2c: unify headers with name inification

sun4i-i2c and sun5i-i2c now will have same sunxi-i2c name,
patch removes many #ifdef stuff for it
sunxi:pm: Merge mach-sun[45]i/pm.

v2: rebase, rename a magic constant.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
sunxi:pm: Remove superfluous functions from pm.c and reindent.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
sunxi-sound: Merge sun5i sound support into sun4i code

I did a diff between the 2 soc/sound/sun?i dirs, then renamed differently
named files, and s/sun5i/sun4i/ and run the diff again. After this the
differences were very small. This patch adds the differences to the
sun4i code (with machine_sun4i() / machine_sun5i()) checks and drops the
entire sun5i dir.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Conflicts:
	arch/arm/configs/a12_defconfig
	arch/arm/configs/a12_nuclear_defconfig
	arch/arm/configs/a13_defconfig
	arch/arm/configs/a13_nuclear_defconfig
	arch/arm/configs/sun5i_defconfig
	sound/soc/Makefile
	sound/soc/sun4i/i2s/sun4i-i2s.c
	sound/soc/sun5i/hdmiaudio/sndhdmi.c
	sound/soc/sun5i/hdmiaudio/sun5i-hdmiaudio.c
	sound/soc/sun5i/hdmiaudio/sun5i-hdmiaudio.h
	sound/soc/sun5i/hdmiaudio/sun5i-hdmipcm.c
	sound/soc/sun5i/hdmiaudio/sun5i-hdmipcm.h
	sound/soc/sun5i/hdmiaudio/sun5i-sndhdmi.c
	sound/soc/sun5i/i2s/sndi2s.c
	sound/soc/sun5i/i2s/sun5i-i2s.c
	sound/soc/sun5i/i2s/sun5i-i2s.h
	sound/soc/sun5i/i2s/sun5i-i2sdma.c
	sound/soc/sun5i/i2s/sun5i-i2sdma.h
	sound/soc/sun5i/i2s/sun5i-sndi2s.c
	sound/soc/sun5i/spdif/sndspdif.c
	sound/soc/sun5i/spdif/sun5i_sndspdif.c
	sound/soc/sun5i/spdif/sun5i_spdif.c
	sound/soc/sun5i/spdif/sun5i_spdif.h
	sound/soc/sun5i/spdif/sun5i_spdma.c
	sound/soc/sun5i/sun5i-codec.h
sunxi:dma: unify sun[45] dma

Only unification, all changes related headers, moving mach->plat
Signed-off-by: Alexsey Shestacov <wingrime@gmail.com>
sunxi:nand: Add dma operation timeout

In some cases dma operation can hung and that hung all process try
access to that device. Timeout (20 sec) make possible exit from that
but code still need handle such return
Add support for interbyte delay in SPI transfers

Some SPI slave devices require a delay between each byte of an SPI transfer so that the slave has time to save/load the data.  This is common for slave devices that do not support DMA such as other small MCU's.

The A10/A13 devices have a mechanism to easily do this, there is a function in spi_sunxi.c that sets it up (aw_spi_set_waitclk_cnt), but no mechanism is provided to call this function.

This patch addresses this shortcoming by adding an extra field to struct spi_ioc_transfer.

Here is an example of how to include interbyte delays in an SPI transfer:

struct spi_ioc_transfer tr[2];

memset(tr, 0, sizeof tr);

tr[0].tx_buf = (unsigned long)tx;
tr[0].len = 1;
tr[0].delay_usecs = 10;

tr[1].rx_buf = (unsigned long)rx;
tr[1].len = 2;
tr[1].interbyte_usecs = 5;

if ((ret = ioctl(fd, SPI_IOC_MESSAGE(2), tr)) == -1)
{
	ERRMSG("Lacrosse: can't send spi message");
	return -2;
}

Signed-off-by: Simon Ratcliffe simon@proatomic.com.au
sunxi: Make avs compile.

Functionality not tested.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>

Conflicts:
	drivers/media/video/sun4i/sun4i_avs.c
	drivers/media/video/sun5i/sun5i_avs.c
sunxi: usb: introduce config hack to workaround lack of sunxi USB module support

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
disp: track layers created by ioctl.

When fd is closed the layers created on it should be removed.

v2: don't BOG_ON() removing not created layers.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>