ARM: OMAP: remoteproc: request timers for DRA7xx DSP1 processor

The GPTimer #3 is chosen as the BIOS tick source for the DRA7xx
DSP1 processor, so add this timer data to be able to successfully
boot and run a DSP1 image configured with this timer. The timers
are optional, but are mandatory to support device management features
such as power management and watchdog support. The timer value also
needs to be unique from the ones used by other processors so that
they can be run simultaneously.

Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/rpmsg: remove depends on CONFIG_EXPERIMENTAL

The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Ohad Ben-Cohen <ohad@wizery.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
[s-anna@ti.com: cherry-pick commit '860514e' from upstream]
Signed-off-by: Suman Anna <s-anna@ti.com>
Revert "hack: staging: ti-soc-thermal: Compute trend to determine cooling action"

This reverts commit dff911633257e1a73ffa86f72dbe093d1dac8b15.

Reason: Appropriate fix found. Band gap mask counter_delay value to be set
        with polling_delay on creating thermal zone.
	Fix has to come through p-ti-linux-3.8.y

Change-Id: I5cc4462502d0077da64c6d18b1dc6e310974016b
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
defconfig: omap2plus: Enable Switch class support

Enable GPIO Switch class support.

HDMI hpd in Android Kernel uses Switch class.

We see the following error if switch class support is not enabled

drivers/built-in.o: In function `hdmi_hotplug_detect_worker':
drivers/video/omap2/dss/hdmi_panel.c:555: undefined reference to `switch_set_state'
drivers/video/omap2/dss/hdmi_panel.c:505: undefined reference to `switch_set_state'
drivers/built-in.o: In function `hdmi_panel_init':
drivers/video/omap2/dss/hdmi_panel.c:740: undefined reference to `switch_dev_register'
drivers/video/omap2/dss/hdmi_panel.c:744: undefined reference to `switch_set_state'
drivers/video/omap2/dss/hdmi_panel.c:758: undefined reference to `switch_dev_unregister'
drivers/built-in.o: In function `hdmi_panel_exit':
drivers/video/omap2/dss/hdmi_panel.c:768: undefined reference to `switch_dev_unregister'

correct fix is to move the common hdmi code and drivers/switch to p-ti-linux-3.8.y and
enable switch class support there too.{Since this driver is already upstreamed}

Change-Id: I289a3dac0b81f51af0fb0d44639ef85b7cd8cd11
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
ASoC: tlv320aic3x: Add TDM support

TDM support is achieved using DSP transfer mode and setting a
programmable offset which specifies where data begins with
respect to the frame sync.

It requires 256-clock mode if CODEC is master (not currently
supported in the driver). No additional dependency if CODEC
is slave.

Change-Id: I20c1af486184ff92f63d99d3010573910b17df7d
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: io: Use devm_regmap_* function

Use regmap's devm_* functions to ensure cleanup occurs properly.

Change-Id: I03214eac4e878327edf05a1d8995e8b3c4266bfa
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: core: Allow setting CODEC conf by DT/OF node

Extend CODEC configuration to allow passing DT/OF node or the dev_name.
Previously, it was possible only via dev_name.

Change-Id: I8e43418705878aa9b0868930e9d366718b3bfeef
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: dapm: Fix duplicated prefix of DAI link routes

Routes constructed automatically by DAPM for DAI links have source
and sink names already prefixed. All other routes added directly by
CODECs need name prefix.

When each individual route is parsed, there is no way to identify
if they still need name prefix based only in the route itself.
So a new argument is passed to explicitly say that DAI link automatic
routes don't need name prefix.

Change-Id: I0c4f99ede6cc642497c83ca72c96e224b89d2e38
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: core: Get dev from runtime data

Get dev pointer for dev_err() from runtime data instead of
codec in preparation for DAI-multicodec support.

Change-Id: I224538a4a9a97cbc3784d8f3e52d19966149a7f2
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: core: Refactor CODEC DAI probe/remove

Refactor CODEC DAI probe and remove in preparation for DAI-multicodec
support.

Change-Id: I5645f8644fb7e6da79c9f948965a6d9264db14fb
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: core: Refactor DAI widgets linking

Refactor DAI widgets linking in preparation for DAI-multicodec
support.

Change-Id: I80c6406987eec477101dfd4353bd62d628a34548
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: core: Refactor CODEC/CODEC_DAI search

Refactor CODEC and CODEC DAI search in preparation for DAI-multicodec.
Dedicated functions for CODEC/CODEC_DAI search are added.

Previous implementation unnecessarily kept searching for a matching CODEC
in the remaining register CODECS even if it was already found.

Change-Id: Ic47d874bb3544b16a4f769104aaca543a6cf0d02
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: core: Refactor ac97 CODEC registration

CODEC registration specific function is added in preparation for
DAI-multicodec support.

Change-Id: I468093825739daa8ef89a8985ef74a453302b0fe
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: core: Refactor dai link and aux dev init

Separate DAI link and aux dev initialization in preparation for
DAI multicodec support, since aux dev will remain using single
codecs but DAI links will be able to support multiple codecs.

Change-Id: I8fcb5c49fc761ecd564cbccf8d10aa0ccb2fa86e
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: pcm: Refactor DAI compatibility

CPU DAI and CODEC compatibility is now checked outside snd_pcm_open()
in preparation for DAI multicodec support.

Change-Id: I598c56cbd5665ffab5b145b9d84a44e56ee18534
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: Add support for DAI multicodec

Add support for DAI links composed of a single CPU DAI and multiple
CODECs. Sound cards have to pass the CODECs array in the corresponding
DAI link through a new 'snd_soc_dai_link_codec' struct. Each CODEC in
this array is described in the same manner single CODEC DAIs are
(either DT/OF node or codec_name).

CPU DAI in a multicodec DAI link can have more channels than what each
CODEC has. The number of channels each CODEC is responsible for is
machine specific, hence it's fixed up in machine drivers in a similar
way to what DPCM does.

Change-Id: I9921265628763dac6ed3b935f068c09de0a031d8
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: DRA7: dra7-evm: Add support for multichannel

DRA7 EVM features a multichannel output that consists of McASP6 connected
to three instances of tlv320aic3106 in the JAMR3 board. This DAI link
is configured in TDM mode, and each stereo CODEC instance receives two
channels of the stream.

               i2s
  McASP3  o-----------o  tlv320aic3106

                   +--o  tlv320aic3106 (Instance A)
              tdm  |
  McASP6  o--------|--o  tlv320aic3106 (Instance B)
                   |
                   +--o  tlv320aic3106 (Instance C)

dra7-evm can record up to 4 channels from a stereo auxiliary input and
two mono line-in/mics.

Change-Id: I0e5c5f28c240d1757553b0ae6fa96ee3ab22ece4
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ARM: dts: dra7-evm: Add multichannel sound support

Enable multichannel support through McASP6 and 3 tlv320aic3106 instances
available in JAMR3 board. The analog codecs can take up to 6 slots of the
TDM bus, although the bus itself is configured to support up to 8 slots.

Max BCLK frequency supported by tlv320aic3106 codec is 14.2857MHz, so
8 slots is the upper limit in order to support 32-bits/sample, 44.1kHz.

Change-Id: Icf3e1813c1bcb04e5c639ab2a575094d2a91d8a2
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ARM: dts: DRA7xx: Add DATA port to McASP6 node and enable FIFO

Update McASP6 node to use the DATA port and enable the FIFO by
setting the tx-num-evt and rx-num-evt to 8.

Change-Id: I046be36e4bb97d1da8444e17a8c65652e662f148
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
ASoC: utils: Prevent overwriting hostless PCM params

Hostless mode support declares its own PCM hardware parameters
which are set at the start of streams marked as no_host_mode.
This parameters may be overwritten if the platform driver is
the dummy driver provided by ASoC utils, this can be prevented
during dummy platform driver open() callback.

Change-Id: I1d548c376d28b08ee00e17ddaa34d1810a70f638
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>