Revert "usb: musb: allow software control of OTG mode for AM335x"

This reverts commit 5b92f8d910ad9d068dfb8c61afd006cbe94b3507.
pia-am335x-e2: fix UART4 pinmux

- fix typo in signal names

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-e2: fix led naming

- Unused LED ports of PCA9634 must not have the same name

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
regmap: add regmap_bulk_write() for register write

The bulk_write() supports the data transfer to multi
register which takes the data into cpu_endianness format
and does formatting of data to device format before
sending to device.
The transfer can be completed in single transfer or multiple
transfer based on data formatting.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
mfd: Use regmap for tps65910 register access.

Using regmap apis for accessing the device registers and
using RBTREE caching mechanims for caching registers.

Enabling caching of the registers which is used for voltage
controls. By doing this, the modify_bits operation is faster as
it does not involve the i2c register read from device, just read
from cache. This results faster set voltage operation.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

Conflicts:
	drivers/mfd/tps65910.c
mfd: Use correct variable name for tps65910 regmap config

This was the copy-paste issue in reg cache support code where
variable name for regmap config was not really starting from
the device name, it was starting from some other device name.
Fixing this so that variable name contains actual device name.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
regulator: tps65910: Sleep control through external inputs

Add support for sleep controls of different regulator through
external inputs EN1, EN2 or EN3.
Each regulator's output will be active when its external
input is high and turns to OFF/Low power mode when its
external input is low.
The configuration parameters for sleep control is provided through
board specific platform data.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
regulator: tps65910: Sleep off rails when ext sleep configured

Keep the rails OFF in sleep mode only when the rails are
controlled by external sleep control.
The devices tps65910 and tps65911, both has the sleep input.
The tps65911's sleep input is not same as tps65910's EN3 and hence
taking care of SLEEP input as separate external sleep control input.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
gpio: tps65910: Add sleep control support

The device tps65910/tps65911 supports the sleep
functionality in some of gpios. If gpio is configured
in output mode and sleep is enabled then during device
sleep state, the output of gpio becomes LOW regardless
of non-sleep output value.
Such gpio can be used to control regulator switch such
that output of regulator is off in device sleep state.

Conflict by prior application of
regulator: tps65910: Sleep control through external inputs

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Conflicts:
	include/linux/mfd/tps65910.h
mfd: Add support for tps65910 device sleep

Adding support for device sleep through the external input control
signal "SLEEP".
Changing the SLEEP signal state can switch the device into SLEEP and
ACTIVE state.
Also adding sleep configuration for different resources so that they
should be keep on during sleep state of device.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Fix tps65910 section annotations

A warning was being generated by the reference from tps65910_i2c_probe()
to tps65910_sleepinit() since the latter was annotated as __init but the
former was unannotated. Since these functions can only be called during
device init make them both __devinit, and while we're at it also annotate
tps65910_i2c_remove() __devexit for symmetry.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Commonize tps65910 regmap access through header

This change removes the read/write callback functions in favor of common
regmap accessors inside the header file. This change also makes use of
regmap_read/write for single register access which maps better onto what this
driver actually needs.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

Conflicts:
	drivers/regulator/tps65910-regulator.c
	include/linux/mfd/tps65910.h
mfd: tps65910: Add alarm interrupt of TPS65910 RTC to mfd device list

Add RTC alarm interrupt details to TPS65910 MFD device list, to support
RTC alarm events.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
rtc: tps65910: add RTC driver for TPS65910 PMIC RTC

TPS65910 PMIC is a MFD with RTC as one of the device.  Adding RTC driver
for supporting RTC device present inside TPS65910 PMIC.

Only support for RTC alarm is implemented as part of this patch.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-tps65910.c: use platform_get_irq() to get RTC irq details

As RTC driver needs only irq number from platform data, using
platform_get_irq(), instead of generic dev_get_platdata().

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-tps65910.c: fix invalid pointer access on _remove()

The tps65910_rtc data is registered as the platform driver data in
_probe(= ).  Therefore the tps65910_rtc should be used on unregistering
the rtc device.  And device pointer should be retrieved from the
platform_device structure.

This patch fixes the below oops:

 Unable to handle kernel NULL pointer dereference at virtual address 00000008
 Modules linked in: rtc_tps65910(-)
 CPU: 0    Not tainted  (3.7.0-rc7-next-20121128-g6b1f974-dirty #7)
 PC is at tps65910_rtc_alarm_irq_enable+0x20/0x2c [rtc_tps65910]
     (tps65910_rtc_alarm_irq_enable+0x20/0x2c [rtc_tps65910])
     (tps65910_rtc_remove+0x18/0x28 [rtc_tps65910])
     (platform_drv_remove+0x18/0x1c)
     (__device_release_driver+0x70/0xcc)
     (driver_detach+0xb4/0xb8)
     (bus_remove_driver+0x7c/0xc0)
     (sys_delete_module+0x148/0x21c)

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge branch 'pia335x-dev' into pia335x-e2-dev

* pia335x-dev: (46 commits)
  arm: pia-am335x: update EEPROM format doc and comments
  arm: pia-am335x-ebtft: add support for resistive touch
  arm: pia-am335x-ebtft: add LCD support
  arm: pia-am335x: add generic control for LCD gpios
  arm: pia-am335x: move gpio init further up
  video: da8xx-fb: add support for DLC0430LZG
  video: da8xx-fb: fix Newhaven Display naming
  arm: pia-am335x-ebtft: add basic support for Buzzer
  arm: pia-am335x-ebtft: add gpio names to external inputs
  arm: pia-am335x-ebtft: add spidev support for RFID
  arm: pia-am335x: restructure SPI init
  arm: pia-am335x-ebtft: add support for on board LED
  arm: pia-am335x-ebtft: add support for external inputs
  arm: pia-am335x-ebtft: don't export MMC CD
  arm: pia-am335x-ebtft: add support for RGB LED buttons
  arm: pia-am335x: restructure i2c init
  arm: pia-am335x-ebtft: add support for CD on SD card
  arm: pia-am335x: add USB support for EB_TFT
  arm: pia-am335x-ebtft: add support for CAN terminal resistor
  arm: pia-am335x: restructure CAN config, add EB_TFT support
  ...
Merge branch 'tps65910-rtc' into pia335x-dev

* tps65910-rtc:
  drivers/rtc/rtc-tps65910.c: fix invalid pointer access on _remove()
  drivers/rtc/rtc-tps65910.c: use platform_get_irq() to get RTC irq details
  rtc: tps65910: add RTC driver for TPS65910 PMIC RTC
  mfd: tps65910: Add alarm interrupt of TPS65910 RTC to mfd device list
  mfd: Commonize tps65910 regmap access through header
  mfd: Fix tps65910 section annotations
  mfd: Add support for tps65910 device sleep
  gpio: tps65910: Add sleep control support
  regulator: tps65910: Sleep off rails when ext sleep configured
  regulator: tps65910: Sleep control through external inputs
  mfd: Use correct variable name for tps65910 regmap config
  mfd: Use regmap for tps65910 register access.
  regmap: add regmap_bulk_write() for register write
am33x: Add memory addresses for crypto modules

* Add base memory addresses to the am33xx.h header file

These addresses are for the HW crypto modules including TRNG, AES, and SHA/MD5

Signed-off-by: Greg Turner <gregturner@ti.com>
am33x: Add crypto device and resource structures

* Add platform device and resource structures to devices.c
* Structures are for the AES and SHA/MD5 crypto modules
* Used in the OMAP4 crypto driver

Signed-off-by: Greg Turner <gregturner@ti.com>