Refine PPM clock compensation computing algorithm.

Now it is able to refine with 5568 PPM for 24576000 Hz Mclk

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
Signed-off-by: Daniel Mack <zonque@gmail.com>
mwifiex: rename 'mlan' to 'wlan'
Thumb-2: Add local symbols to work around gas behaviour

All current versions of gas at the time of writing have issues
fixing up pc-relative instructions which reference global symbols,
due to the potential need to support symbol preemption.
Even though symbol preemption is not relevant to the Linux kernel,
there is no way to inform the tools of this, so we get the problem.

Most pc-relative forms in ARM, and all pc-relative forms in
Thumb, will cause the assembler to fail with various fixup error
messages when used to reference global symbols.

The legacy behaviour is for ADR and plain LDR instructions in ARM
which reference global symbols to be fixed up silently with no
relocation emitted.  This means that building the kernel in ARM
currently works without problems, but this behaviour may be a bug.

After discussion with Richard Earnshaw, it seems that there is
no single obvious remedy for this inconsistent behaviour,
so I conclude that there is not likely to be a comprehensive
upstream fix for a while.

A workaround which should be valid for all past and all
foreseeable future versions of gas is to express the need for
a local fixup explicitly, by declaring a shadow local symbol
for any global symbol which needs to be addressed using ADR
or any pc-relative LDR variant.

This patch implements this workaround for the one part of the
main kernel currently known to be affected.  The resulting code
builds and works correctly in ARM and Thumb.

Similar fixes may be needed in mach-specific assembler.

Signed-off-by: Dave Martin <(address hidden)>
Acked-by: Nicolas Pitre <(address hidden)>
ARM: OMAP: generic: add call to of_clk_init()

This is needed to instanciate fixed clocks in the DT.

Signed-off-by: Daniel Mack <zonque@gmail.com>
gpmc: hack
mmc clock hack
mtd: devices: elm: check for device's presence before configuration

In case the driver is not probed - due to config mismatches or errors
in the DTS files - dev_get_drvdata() returns NULL, leading to an Ooops
during boot.

Make elm_config() return an error in such cases to propagate the error
up to the user, so it can fall back to software mode.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Philip Avinash <avinashphilip@ti.com>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
ALSA: ASoC: davinci-mcasp: don't configure AFSX direction in DIT mode

AFSX won't be used in DIT mode. The related pins are AHCLKX and
the data pins.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Acked-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
ALSA: ASoC: davinci-mcasp: don't overwrite DIT settings

Channel size settings will be made at the end of
davinci_mcasp_hw_params() routine and thus overwrite frame
format settings made for DIT mode. This patch fixes this issue
by taking op_mode into account. Tested with official PSP 3.2
kernel and sii9022a HDMI transmitter.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
ALSA: ASoC: cs4271: convert to direct regmap API usage

By using the regmap API directly, we can make use of the
.write_flag_mask for SPI, which allows us to drop the strange register
hacks that were necessary so far.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ALSA: ASoC: ak4104: convert to direct regmap API usage

Signed-off-by: Daniel Mack <zonque@gmail.com>
ALSA: ASoC: ak4104: correct tranceiver enable handling

Move the enabling of the TX diode to hw_params() and disable it again in
hw_free(). This way, the diode is only switched on as long as it needs
to be.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ALSA: ASoC: Add codec driver for AK5386

Adds a driver for Asahi Kasei's AK5386 Single-ended 24-Bit 192kHz
delta-sigma ADC. The device has no control port interface but an
optional RESET/PDN GPIO pin.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ALSA: ASoC: add codec driver for TI TAS5086

This patch adds a driver for TI's TA5086 6-channel PWM processor.

This chip has a very unusual register layout, specifically because the
registers are of unequal size, and multi-byte registers require bulk
writes to take effect. Regmap does not support these kind of mappings.

Currently, the driver does not touch any of the registers >= 0x20, so
it doesn't matter, because the register map is mapped to an 8-bit array.
In case more features will be added in the future that require access
to higher registers, the entire regmap H/W I/O routines have to be
open-coded.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ALSA: ASoC: davinci-mcasp: clean up davinci_hw_common_param()

As pointed of by Vaibhav, commit 2952b27e2 ("ASoC: davinci-mcasp:
Add support for multichannel playback") duplicated the logic of
counting the active serializers. That can be avoided by shifting
the code around a bit.

Also, drop two unused defines introduced by the same commit.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Michal Bachraty <michal.bachraty@streamunlimited.com>
Cc: Vaibhav Bedia <vaibhav.bedia@ti.com>
TAS5086: add delay hack

This is only necessary for the EVM kit, not for the final hardware. At
least it seems. Dunno why.
drivers: usb: musb: re-enable host-only mode

Currently, the port%d-mode properties in DT are completely unused, and
support code for enabling host-only mode configurations is missing,
partly due to the recent rework in the musb core driver.

Fix this with the following changes:

 - store the port mode information in struct musb
 - in case of host-only mode setups, add the HCD directly from
   musb_init_controller()
 - refuse to start a gadget on a host-only configured port

Store the port mode in struct musb and handle

Signed-off-by: Daniel Mack <zonque@gmail.com>
ALSA: ASoC davinci-pcm, davinci-mcasp Clean up active_serializers As pointed of by Vaibhav, commit 2952b27e2 ("ASoC: davinci-mcasp: Add support for multichannel playback") number of active serializers can be hidden into fifo_level variable, which is set in davimci-mcasp.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
ALSA: ASoC davinci-pcm Fix DMA dst_bidx for no FIFO DMA transfer

As documented in AM335x TRM:
"Through the data port, the DMA/CPU can service all the serializers through a single address.
The McASP automatically cycles through the appropriate serializers.
For transmit operations through the data port, the DMA/CPU should write to the
same XBUF data port address to service all of the active transmit serializers.
In addition, the DMA/CPU should write to the XBUF for all active transmit
serializers"
Therefore, dst_bidx should be 0.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
ALSA: ASoC: cs4271: switch to mute_stream

Don't mute the codec if called for CAPTURE stream.

Signed-off-by: Daniel Mack <zonque@gmail.com>