hid: Add a driver for HID alphanumeric display

This driver allow using HID alphanumeric display that support the
ASCII character set as framebuffer device in text mode.

Change-Id: Ie851dde425c7a46e780a2abd82d0397a1dcad245
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1695
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
hid: Add a driver for the BGU-Handset

This driver allow controlling the BGU-Handset via sysfs.
It provides controls for the outputs as well as system controls to
reset the device or setting it in programming mode.

Signed-off-by: Dirk Leber <dirk.leber@avionic-design.de>
Change-Id: Id80ddb713b9e6c8acdb4d00d62acdf4f77f7faa0
Reviewed-on: http://review.adnet.avionic-design.de/1713
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
arm: tegra: medcom-wide: Add HID_BGU to defconfig

Signed-off-by: Dirk Leber <dirk.leber@avionic-design.de>
Change-Id: Ied9a92a144c0382d52a9ff18ba2b8fdf23549b49
Reviewed-on: http://review.adnet.avionic-design.de/1714
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
arm: tegra: medcom-wide: Add HID_DISPLAY to defconfig

Signed-off-by: Dirk Leber <dirk.leber@avionic-design.de>
Change-Id: I49961a4be7a31ff757f5b175831c3755baf491fe
Reviewed-on: http://review.adnet.avionic-design.de/1696
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
media: tegra: vi: Fix the line size rounding with planar formats

When outputing planar formats the width must be a mutiple of 8, so
properly round up to the next multiple of 8.

Change-Id: Ib62ea69f0ca058c700415b49d2ac4415756e0cfd
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1832
Reviewed-by: Julian Scheel <julian@jusst.de>
media: tegra: vi: Add support for high and low active H/VSYNC

The HSYNC and VSYNC can be configured for low active as well as high
active signals. Note that the driver used to claim to support only
high active, but in fact the VI was configured for low active.

Change-Id: If8956bc9a7c94c6114f74dd9987c0e2d7f0699c8
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1833
Reviewed-by: Julian Scheel <julian@jusst.de>
media: video: mt9v126: Fix the H/VSYNC polarity

The external HSYNC and VSYNC are low active, not high active.

Change-Id: Id720ab8b3cb5c2aa51d01a3ff308214fb900a158
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1834
Reviewed-by: Julian Scheel <julian@jusst.de>
media: video: mt9v126: Fix the reported field type in interlaced mode

In interlaced mode the sensor is outputting one field after the other,
so it should report the field format as V4L2_FIELD_SEQ_TB instead of
V4L2_FIELD_INTERLACED.

Change-Id: I7d2844b310be1fd05b3448daaeb649a6401c2c87
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1836
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
media: video: mt9v126: Allow reporting the video standard

Some video input need to known the standard used for the video signal.
So add a simple implementation that report PAL in interlaced mode and
UNKNOWN in progressive mode.

Change-Id: I7633f96e185534439ce802efa77bf7bdb8ead72b
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1837
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
watchdog: tegra: Properly implement the watchdog on T20

The T20 watchdog is a bit particular, the timer must be setup for
continuous operation with overflow interrupt enabled. If the interrupt
flag is still set (from a previous interrupt) when the overflow
interrupt occurs the CPU is rested.

The current implementation for T20 would only clear the interrupt flag
in the interrupt handler and simply ignore the pings from the
userspace daemon.

Fix this by simply clearing the interrupt flag in the ping function.
We also need to set the interrupt trigger to raising edge, instead of
level high, to avoid an interrupt flood as the interrupt flag isn't
cleared in the handler.

Change-Id: If698ea82d0a612701d05ebb6caa2027d87ed7225
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1845
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
watchdog: tegra: Ping the watchdog on write()

Writing some data to the device should ping the watchdog.

Change-Id: Ica7f76a73642b7b6bef4a7d0bd2212de549f4acf
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1846
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
arch: arm: tegra: tamonten: Add the watchdog device

Now that the watchdog has been fixed on T20 we can enable it
on the Tamonten boards.

Change-Id: Ie7ba7509b339b8df6e91a6c9ad74e09c46cba582
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1847
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
video: tegra: nvmap: Allow using nvmap from modules

The public API of nvmap was missing the symbol exports to allow using
it from kernel modules.

Change-Id: I38deab56315c0b94ef433738967e78ae52541261
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1849
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
media: video: Add the dependency on TEGRA_NVMAP to VIDEOBUF2_DMA_NVMAP

The videobuf2 DMA implementation using nvmap should depends on nvmap.

Change-Id: I68e629b2ff261523182c3d93194920f62627f2c4
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1851
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
arm: tegra: medcom-wide: Enable the video capture drivers

To allow using the video input we need the tegra SoC camera driver as
well as the TV5150 driver.

Change-Id: I955d30248765caad7773303612e90ce581de2ed1
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1852
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
media: video: mt9v126: Fix the dewarp initialization

The dewarp initialization had several problems, mostly because
standard errno and mt9v126 error codes were mixed up. To fix the
initialization:

 - Convert the state returned by mt9v126_get_dewarp_state() to a
   standard errno
 - Properly handle -EBUSY when waiting for the config to be applied

Change-Id: I719602f15535ea4cab42d0ec6b32c3d0df475700
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1835
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
media: tegra: host: Allow using the nvhost API from modules

The public API of nvhost was missing the symbol exports to allow using
it from kernel modules.

Change-Id: If2a9aa5560c4bf302aa8fc50949a17cee5023c90
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1850
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
ASoC: wm8903: Implement a proper debouce for the mic detect

The mic detect can bounce a lot during (un)plug events, on the other
hand the short detect has debounce already implemented in hardware.

To make things more robust split the reporting of mic and short
events, and move the mic reporting to a delayed work to properly
debounce it.

Change-Id: I467d1b0623ced55bfb8a2c5afb2cd55bdbb85d64
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1978
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
ASoC: wm8903: Fix the mic detection with headset jacks

Headset jacks are backward compatible with typical 3 pins headphone
jacks, but they have a 4th pin for an optional microphone.

When plugging an headphone it short the mic, so we need to filter out
mic detect events when a short is also detected. To still allow using
the short detect for other purposes this behaviour is only enabled
when no event is bound to the short detection.

Change-Id: Ie0aa26b4b1a5ff5e2b8cb7cb0fadad3abb9b64f0
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1979
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
arm: tegra: tamonten-wm8903: Update the mic detect config

Raise the short current trigger level to 1.2mA to keep it far enough
from the mic detect level. Also reduce the debouce time to avoid too
much delay before the reporting.

Change-Id: I733e25540a57a3f522317d60a58dfaab59efd4de
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/1980
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>