drivers: net : cpsw: pass proper device name while requesting irq

During checking the interrupts with "cat /proc/interrupts", it is showing
device name as (null), this change was done with commit id 07447a0 where
tx and rx napi is split also changing the irq name from platform device
name to net device name, but the net device is not registered at this
point with the network frame work, so devm_request_irq is called with
device name as NULL, by which it is showed as "(null)" in
"cat /proc/interrupts". So this patch changes back irq name to platform
device name itself in devm_request_irq so that the device name shows as
below

Fixes 07447a0 (drivers: net: cpsw: convert tx completion to NAPI)

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected

On BeagleBone Black if no HDMI monitor is connected and suspend
is requested a kernel panic will result:

root@am335x-evm:~# echo mem > /sys/power/state
[ 65.548710] PM: Syncing filesystems ... done.
[ 65.631311] Freezing user space processes ... (elapsed 0.006 seconds) done.
[ 65.648619] Freezing remaining freezable tasks ... (elapsed 0.005 seconds) done.
[ 65.833500] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa30e004
[ 65.841692] Internal error: : 1028 [#1] SMP ARM
  <snip>
[ 66.105287] [<c03765f0>] (platform_pm_suspend) from [<c037b6d4>] (dpm_run_callback+0x34/0x70)
[ 66.114370] [<c037b6d4>] (dpm_run_callback) from [<c037ba84>] (__device_suspend+0x10c/0x2f4)
[ 66.123357] [<c037ba84>] (__device_suspend) from [<c037d004>] (dpm_suspend+0x58/0x218)
[ 66.131796] [<c037d004>] (dpm_suspend) from [<c008d948>] (suspend_devices_and_enter+0x9c/0x3c0)
[ 66.141055] [<c008d948>] (suspend_devices_and_enter) from [<c008de7c>] (pm_suspend+0x210/0x24c)
[ 66.150312] [<c008de7c>] (pm_suspend) from [<c008cabc>] (state_store+0x68/0xb8)
[ 66.158103] [<c008cabc>] (state_store) from [<c02e9654>] (kobj_attr_store+0x14/0x20)
[ 66.166355] [<c02e9654>] (kobj_attr_store) from [<c0185c70>] (sysfs_kf_write+0x4c/0x50)
[ 66.174883] [<c0185c70>] (sysfs_kf_write) from [<c018926c>] (kernfs_fop_write+0xb4/0x150)
[ 66.183598] [<c018926c>] (kernfs_fop_write) from [<c0122638>] (vfs_write+0xa8/0x180)
[ 66.191846] [<c0122638>] (vfs_write) from [<c01229f8>] (SyS_write+0x40/0x8c)
[ 66.199365] [<c01229f8>] (SyS_write) from [<c000e580>] (ret_fast_syscall+0x0/0x48)
[ 66.207426] Code: e595c210 e5932000 e59cc000 e08c2002 (e592c000)

This is because the lcdc module is not enabled when no monitor is detected
to save power.  However the suspend handler just blindly tries to save the
lcdc state by copying out the pertinent registers. However module is off
so no good things happen when you try and access it.

This patch only saves off the registers if the module is enabled, and
then only restores the registers on resume if they were saved off during
suspend.

Signed-off-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Merge branch 'connectivity-ti-linux-3.14.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-3.14.y

TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-3.14.y

* 'connectivity-ti-linux-3.14.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  drivers: net : cpsw: pass proper device name while requesting irq

Signed-off-by: Dan Murphy <DMurphy@ti.com>
Merge branch 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree into ti-linux-3.14.y

TI-Feature: audio-display
TI-Tree: git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree.git
TI-Branch: audio-display-ti-linux-3.14.y

* 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree:
  drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected

Signed-off-by: Dan Murphy <DMurphy@ti.com>
gpio: make gpiod_direction_output take a logical value

[ Upstream commit ef70bbe1aaa612f75360e5df5952fddec50b7ca9 ]

The documentation was not clear about whether
gpio_direction_output should take a logical value or the physical
level on the output line, i.e. whether the ACTIVE_LOW status
would be taken into account.

This converts gpiod_direction_output to use the logical level
and adds a new gpiod_direction_output_raw for the raw value.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
GPIO: gpiolib: correct description of gpiod_direction_output

[ Upstream commit 90df4fe07f9794984bd2dafd1d28acd45318d37f ]

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: panel-tlc59108: fix enable-gpio polarity

The current panel-tlc59108 driver doesn't respect the ACTIVE_HIGH/LOW
setting for the enable-gpio from the .dts file.

This patch adds support for setting the polarity by using the new GPIO
API which handles the polarity automatically.

The polarity in the dra7*.dts files is also fixed, as it was wrong. The
enable-gpio needs to be set to low when enabling the display, so we need
to define the gpio as GPIO_ACTIVE_LOW.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
dra72-evm.dts: fix vdda_video supply name

The "vdda_video-supply", used for DSS video PLL, was wrongly defined as
"vdda-supply" in the dra72-evm.dts file.

The regulator is set as "regulator-always-on", so this didn't cause any
issues.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
drm/omap: check CRTC color format earlier

When setting a color format to a DRM plane, the DRM core checks whether
the format is supported by the HW. However, it seems that when setting
the color format of a CRTC (i.e. a root plane), there's no checking
done. This causes omapdrm to configure omapdss with the bad color
format, which omapdss then rejects.

While the above is ok, the error message is a bit confusing, and the
configuring of omapdss happens asynchronously from the ioctl that does
the color format change.

This patch adds a color format check to omap_plane_mode_set() which
causes the ioctl to return an error for invalid color format. This means
that the userspace will get to know of the wrong setting, instead of the
current behavior where the error is not seen by the userspace.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
dra7xx-evm: set HDMI HPD pin as pull-down

Set HDMI HPD pin as pull-down for dra7-evm and dra72-evm. I haven't seen
any issues that this would fix, but I believe the HPD should be
pulled-down.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: dra7-tpd12s015: remove disable_hpd support

Early revisions of dra7-evm were practically totally broken with HDMI
hotplug. The dra7-tpd12s015 driver has hacks to make the HDMI somewhat
work with those old revisions.

We don't support the old revisions anymore, so let's remove the ugly
hacks that make the driver very confusing to read.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: encoder-tpd12s015: Fix race issue with LS_OE

A race issue has been observed with the encoder-tpd12s015 driver, which
leads to errors when trying to read EDID. This has only now been
observed, as OMAP4 and OMAP5 boards used SoC's GPIOs for LS_OE GPIO. On
dra7-evm boards, the LS_OE is behind a i2c controlled GPIO expander,
which increases the time to set the LS_OE.

This patch simplifies the handling of the LS_OE gpio in the driver by
removing the interrupt handling totally. The only time we actually need
to enable LS_OE is when we are reading the EDID, and thus we can just
set and clear the LS_OE gpio inside the read_edid() function.

This also has the additional benefit of very slightly decreasing the
power consumption.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: dra7-evm-encoder-tpd12s015: Fix race issue with LS_OE

A race issue has been observed with the dra7-evm-encoder-tpd12s015 driver, which
leads to errors when trying to read EDID. This has only now been
observed, as OMAP4 and OMAP5 boards used SoC's GPIOs for LS_OE GPIO. On
dra7-evm boards, the LS_OE is behind a i2c controlled GPIO expander,
which increases the time to set the LS_OE.

This patch simplifies the handling of the LS_OE gpio in the driver by
removing the interrupt handling totally. The only time we actually need
to enable LS_OE is when we are reading the EDID, and thus we can just
set and clear the LS_OE gpio inside the read_edid() function.

This also has the additional benefit of very slightly decreasing the
power consumption.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: dra7-evm-encoder-tpd12s015: fix HPD value on init

The driver uses GPIO debounce time on HPD GPIO to resolve the glitches
observed on the GPIO. Normally the value of the HPD GPIO should be valid
after setting CT_CP_HPD GPIO, but with debounce, the value is valid only
after the debounce time has passed.

Add a sleep after setting CT_CP_HPD to ensure the HPD GPIO's value is
observed correctly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI5: Increase DDC SDA-HOLD time

It has been observed that the current SDA-HOLD time is too short for
some board/cable/monitor combinations. Increase the SDA-HOLD time to
1000ns.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Merge branch 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree into ti-linux-3.14.y

TI-Feature: audio-display
TI-Tree: git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree.git
TI-Branch: audio-display-ti-linux-3.14.y

* 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree:
  OMAPDSS: HDMI5: Increase DDC SDA-HOLD time
  OMAPDSS: dra7-evm-encoder-tpd12s015: fix HPD value on init
  OMAPDSS: dra7-evm-encoder-tpd12s015: Fix race issue with LS_OE
  OMAPDSS: encoder-tpd12s015: Fix race issue with LS_OE
  OMAPDSS: dra7-tpd12s015: remove disable_hpd support
  dra7xx-evm: set HDMI HPD pin as pull-down
  drm/omap: check CRTC color format earlier
  dra72-evm.dts: fix vdda_video supply name
  OMAPDSS: panel-tlc59108: fix enable-gpio polarity
  GPIO: gpiolib: correct description of gpiod_direction_output
  gpio: make gpiod_direction_output take a logical value

Signed-off-by: Dan Murphy <DMurphy@ti.com>
OMAPDSS: sii9022-audio: Remove support for S24_LE and S24_3LE formats

The 24-bit formats are broken and I could not get them fixed despite
several attempts.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
ti_config_fragments/audio_display.cfg: Build SND_OMAP_SOC in kernel

Adds:
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
CONFIG_SND_OMAP_SOC=y
for OMAP HDMI audio support also with built in OMAPDSS.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Merge branch 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree into ti-linux-3.14.y

TI-Feature: audio-display
TI-Tree: git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree.git
TI-Branch: audio-display-ti-linux-3.14.y

* 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree:
  ti_config_fragments/audio_display.cfg: Build SND_OMAP_SOC in kernel
  OMAPDSS: sii9022-audio: Remove support for S24_LE and S24_3LE formats

Signed-off-by: Dan Murphy <DMurphy@ti.com>
backport: gpio_backlight.c from: v3.15.10

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>