android-sdk/kernel-video.git
5 years agoRevert "ti_config_fragments: DRA7: Disable LPAE for now" android-3.14-6AL.1.2-P1
Praneeth Bajjuri [Thu, 7 Jan 2016 22:03:14 +0000 (16:03 -0600)]
Revert "ti_config_fragments: DRA7: Disable LPAE for now"

This reverts commit 039bb34df889511e96f4c9c9a8d0f971e38efe2f.

on android, product test showed regression in mpeg2 playback
functionality

Revert is necessary to do a quick fix to regression for a
timely release.

Further rootcause on why LPAE removal causes video playback
failure will be done soon.

Change-Id: Ifc638c2b97a8593d5c14d6b5d3a90d62c2fa9552
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoMerge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Thu, 14 Jan 2016 21:52:39 +0000 (15:52 -0600)]
Merge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common:
  ti_config_fragments/connectivity: Touchscreen: Enable EDT_FT5X06 built-in
  drivers: spi: ti-qspi: Fix dropped connection after NOR read
  ARM: dts: dra72: enable dss node

Conflicts:
arch/arm/boot/dts/dra72-evm.dts

Change-Id: I9d402523a3fb720a049ee1d929b7c2a1c387f271
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoti_config_fragments/connectivity: Touchscreen: Enable EDT_FT5X06 built-in
Praneeth Bajjuri [Wed, 16 Dec 2015 20:27:30 +0000 (14:27 -0600)]
ti_config_fragments/connectivity: Touchscreen: Enable EDT_FT5X06 built-in

Touchscreen EDT_FT5X06 is available in the new 10" OSD panel.

Enabling by built-in is needed for the applicable HLOS to enumerate the device
properly.

Change-Id: I91955d6ccdc4ade2db33ac4919f75a4c851b4f15
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agodrivers: spi: ti-qspi: Fix dropped connection after NOR read
Costin Cristian Costas [Wed, 16 Dec 2015 20:11:10 +0000 (14:11 -0600)]
drivers: spi: ti-qspi: Fix dropped connection after NOR read

connection dropped due to the fact that the register
CTRL_CORE_CONTROL_IO_2 values are overwritten by spi
power management function "disable_qspi_memory_mapped" which
was using logical OR instead of AND, causing this to write
FFFFF(OLD_VALUE)FF.

Change-Id: Ie1bfca2a628d0ece2e22a3a7cf7a78accceecd6a
Signed-off-by: Costin Cristian Costas <costin.costas@windriver.com>
[port to auto 3.14]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoARM: dts: dra72: enable dss node glsdk-7.03.00.03
Anand Balagopalakrishnan [Fri, 11 Dec 2015 10:43:24 +0000 (16:13 +0530)]
ARM: dts: dra72: enable dss node

Change-Id: I4eab014f9d1eba5b40f81d5005936c72a95d8497
Signed-off-by: Anand Balagopalakrishnan <anandb@ti.com>
5 years agoMerge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Tue, 8 Dec 2015 16:54:54 +0000 (10:54 -0600)]
Merge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common:
  drm/omap: fix leak & crash in omap_gem_op_sync()
  drm/omap: fix kfree call when freeing omap_obj
  drm/omap: call waiter->notify from non-atomic context
  drm/omap: flush crtcs only when needed
  OMAPDSS: Introduced tlc59108 compatibility label for FPDLink
  OMAPDSS: Add FPDLink Serdes and FDLink panel display DT entries.

Conflicts:
arch/arm/boot/dts/dra72-evm.dts

Change-Id: Ia607c0660a942c42a740f46a16b866aa0f42653b
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agodrm/omap: fix leak & crash in omap_gem_op_sync()
Tomi Valkeinen [Thu, 3 Dec 2015 15:56:08 +0000 (17:56 +0200)]
drm/omap: fix leak & crash in omap_gem_op_sync()

If omap_gem_op_sync is interrupted while it waits for notify to finish,
two issues occur:

 * the waiter struct is not freed
 * the wait condition is on stack, so on return of the
   waiting function, the stack is corrupted

Therefore, the wait is made non-interruptible. So, when omap_gem_op_sync
returns, it is gurranteed that the gem operation is complete.

The downside is that if, for whatever reason, the notify never happens,
the thread waits forever. Fixing this properly would require large
changes to omap_gem.c, and as we should always get a notify, this seems
like an acceptable fix for the time being.

Original patch by Subhajit Paul <subhajit_paul@ti.com>

Change-Id: I143e3a1a259cfc0961821f5a65b1fddf182efa60
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
5 years agodrm/omap: fix kfree call when freeing omap_obj
Tomi Valkeinen [Thu, 3 Dec 2015 11:56:58 +0000 (13:56 +0200)]
drm/omap: fix kfree call when freeing omap_obj

omapdrm allocates struct omap_gem_objects, but when freeing them, it
uses the pointer to struct drm_gem_object. These are currently the same,
so no issue is seen, but if the struct omap_gem_object is changed,
problems could arise.

So fix the possible future problem by kfree'ing the objects using the
correct pointer.

Change-Id: Ia645a7ad7ed348ecad39be7afe293d8b4667363c
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
5 years agodrm/omap: call waiter->notify from non-atomic context
Tomi Valkeinen [Wed, 2 Dec 2015 17:30:34 +0000 (19:30 +0200)]
drm/omap: call waiter->notify from non-atomic context

The SGX driver is called via the sync_op notify callback, and this
callback may happen in atomic context. However, the SGX driver uses
mutex in the callback, causing the kernel to crash.

The best fix would probably be to change the SGX driver. However, this
patch fixes the issue also by first collecting the notify callbacks
which need to be called, and then actually calling them a bit later from
non-atomic context.

Change-Id: I58c42dbf84f4d97cb73f78667d7a2a88213b3946
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
5 years agodrm/omap: flush crtcs only when needed
Tomi Valkeinen [Tue, 1 Dec 2015 13:58:00 +0000 (15:58 +0200)]
drm/omap: flush crtcs only when needed

At the moment omapdrm flushes all crtcs when any client is closed. But
as only the master client can queue new work for crtcs, we can do the
flush only for the master.

We also do the flush in master_drop, so that a master_drop followed by
device close will still cause a flush.

Change-Id: Ie0bebed735a1b654122c5d84f7c52b69ba54229c
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
5 years agoOMAPDSS: Introduced tlc59108 compatibility label for FPDLink
Marcus Cooksey [Thu, 3 Dec 2015 18:04:36 +0000 (12:04 -0600)]
OMAPDSS: Introduced tlc59108 compatibility label for FPDLink

The FPDLink compatiility flag is used to distiguish between
the tlc59108 display panel.  Since the FPDLink configuration
doesn't require backlight, for example, but only requires
dss output setup, certain TLC59108 configuration steps
are ignored.

Change-Id: I773890bb2d28bde405d7af340cafe1171406eb37
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoOMAPDSS: Add FPDLink Serdes and FDLink panel display DT entries.
Marcus Cooksey [Mon, 11 May 2015 17:24:24 +0000 (12:24 -0500)]
OMAPDSS: Add FPDLink Serdes and FDLink panel display DT entries.

Enables FPDLink output by adding
device tree nodes for fpdlink serializer.

Change-Id: Icbfd4b98c178d3b77ac327b0bfdf6e9540bac74f
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoMerge branch 'android-3.14' of https://android.googlesource.com/kernel/common into...
Praneeth Bajjuri [Thu, 3 Dec 2015 22:05:24 +0000 (16:05 -0600)]
Merge branch 'android-3.14' of https://android.googlesource.com/kernel/common into p-ti-linux-3.14.y-android

* 'android-3.14' of https://android.googlesource.com/kernel/common:
  tracing/sched: Add trace events to track cpu hotplug.
  trace: cpufreq: Add tracing for min/max cpufreq

Change-Id: I69c1adee1da25ebc351370f5528e4e78b211b9b9
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoMerge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Thu, 3 Dec 2015 22:03:23 +0000 (16:03 -0600)]
Merge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common:
  Revert "OMAPDSS: i886: FPDLink PLL unlocks with certain soc PLL M/N Values"
  media: ti-vpe: vpdma: Use u32 for the DMA address in descriptors
  media: ti-vpe: vpe: Fix kernel crash with allocation failure
  dra7: dt: update regulator constraints for main VDDs

Change-Id: Ida56c40d9509d832adc4f33cf643d8c9bc026fa2
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoRevert "OMAPDSS: i886: FPDLink PLL unlocks with certain soc PLL M/N Values"
Marcus Cooksey [Wed, 2 Dec 2015 21:51:14 +0000 (15:51 -0600)]
Revert "OMAPDSS: i886: FPDLink PLL unlocks with certain soc PLL M/N Values"

This reverts commit aece4a4eed3cd0d0d7efe08889c7e1e8b73ff7b5.

More rework is required because HDMI fails detection if resolution
is dynamically changed.

Change-Id: I6067c85f0469a0a6d8e4d5639364b99a3f30ac6b
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agomedia: ti-vpe: vpdma: Use u32 for the DMA address in descriptors
Oleksandr Tyshchenko [Wed, 7 Oct 2015 12:17:49 +0000 (15:17 +0300)]
media: ti-vpe: vpdma: Use u32 for the DMA address in descriptors

VPDMA desciptor definition for data/config descriptors expect the addresses
to be 32 bit. Enabling CONFIG_ARCH_DMA_ADDR_T_64BIT that laeds to
sizeof(dma_addr_t) = 8.

Due of this, the descriptors are interpreted incorrectly causing failures.
Fix this by using u32 instead of dma_addr_t for some fields inside data
transfer descriptor.

Change-Id: I1e33241b884f575ae01d3ce3cba19b512a404c99
Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
5 years agomedia: ti-vpe: vpe: Fix kernel crash with allocation failure
Nikhil Devshatwar [Thu, 3 Dec 2015 10:41:24 +0000 (16:11 +0530)]
media: ti-vpe: vpe: Fix kernel crash with allocation failure

If for some reason, the driver is not able to allocate the motion
vectors needed for DEI operation, device_run function directly
starts using the NULL dma_addr for VPDMA transaction.

This causes L3 bus errors and the kernel goes in panic state.
Fix this by checking the status of set_srcdst_params before
starting to streamon.

Change-Id: Iba1aa39e94fcc455ac022a27ec7881ea552066ed
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
5 years agotracing/sched: Add trace events to track cpu hotplug.
Arun Bharadwaj [Wed, 3 Jul 2013 17:35:02 +0000 (10:35 -0700)]
tracing/sched: Add trace events to track cpu hotplug.

Add ftrace event trace_sched_cpu_hotplug to track cpu
hot-add and hot-remove events.

This is useful in a variety of power, performance and
debug analysis scenarios.

Change-Id: I5d202c7a229ffacc3aafb7cf9afee0b0ee7b0931
Signed-off-by: Arun Bharadwaj <abharadw@codeaurora.org>
5 years agotrace: cpufreq: Add tracing for min/max cpufreq
Ruchi Kandoi [Fri, 20 Nov 2015 00:07:19 +0000 (16:07 -0800)]
trace: cpufreq: Add tracing for min/max cpufreq

Change-Id: I73f6ec437c1f805437d9376abb6510d1364b07ec
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
5 years agodra7: dt: update regulator constraints for main VDDs
Ravikumar Kattekola [Mon, 23 Nov 2015 06:13:39 +0000 (11:43 +0530)]
dra7: dt: update regulator constraints for main VDDs

MPU,DSP,IVA,GPU and CORE voltage domains support
AVS class 0, so the voltage that needs to be configured
actually is read from efuses which may vary between a min and
a max, to allow this variation an absolute-max-voltage
has been introduced to allow the regulator to set
any voltage between the efused value and the max.
Update regulator constraints to meet this requirement.

Change-Id: I76b2d7726ec91e96576a1bb325f184277bebb273
Signed-off-by: Ravikumar Kattekola <rk@ti.com>
5 years agoMerge 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Mon, 30 Nov 2015 23:05:19 +0000 (17:05 -0600)]
Merge 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common: (59 commits)
  PLATFORM: removed vout1_pin config from DT
  CONFIG: Add config for TLC59108 and TC3587XXBG
  INPUT: Add DT Entries to enable EDT-FT5x06 TSC
  OMAPDSS: Add DT Entries to enable TLC59108 BL Controller
  BACKLIGHT: Add Driver for TLC59108 Backlight Driver
  OMAPDSS: Add DT Entries to enable 10 inch OSD Display
  OMAPDSS: New driver for the OSD 10" Display
  of: EXPORT_SYMBOL_GPL of_property_read_u64_array
  Driver core: Unified device properties interface for platform firmware
  of: add functions to count number of elements in a property
  Input: Merged 4.1 OF helper functions
  of: Introduce device tree node flag helpers.
  Driver core: Unified interface for firmware node properties
  Driver core: Unified device properties interface for platform firmware
  Driver core: Unified device properties interface for platform firmware
  device property: fix potential NULL pointer dereference
  device property: Introduce firmware node type for platform data
  driver core: Implement device property accessors through fwnode ones
  driver core: property: Update fwnode_property_read_string_array()
  Driver core: Fix missing whitespace in function argument
  ...

Change-Id: I8155c7e056111953dd6cf8853612c75b9cf9a76e
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoMerge branch 'p-ti-linux-3.14.y-common-new-panel' into p-ti-linux-3.14.y-common
Praneeth Bajjuri [Wed, 25 Nov 2015 20:42:28 +0000 (14:42 -0600)]
Merge branch 'p-ti-linux-3.14.y-common-new-panel' into p-ti-linux-3.14.y-common

Add support of new 10 inch osd display , touch and backlight driver

* p-ti-linux-3.14.y-common-new-panel: (59 commits)
  PLATFORM: removed vout1_pin config from DT
  CONFIG: Add config for TLC59108 and TC3587XXBG
  INPUT: Add DT Entries to enable EDT-FT5x06 TSC
  OMAPDSS: Add DT Entries to enable TLC59108 BL Controller
  BACKLIGHT: Add Driver for TLC59108 Backlight Driver
  OMAPDSS: Add DT Entries to enable 10 inch OSD Display
  OMAPDSS: New driver for the OSD 10" Display
  of: EXPORT_SYMBOL_GPL of_property_read_u64_array
  Driver core: Unified device properties interface for platform firmware
  of: add functions to count number of elements in a property
  Input: Merged 4.1 OF helper functions
  of: Introduce device tree node flag helpers.
  Driver core: Unified interface for firmware node properties
  Driver core: Unified device properties interface for platform firmware
  Driver core: Unified device properties interface for platform firmware
  device property: fix potential NULL pointer dereference
  device property: Introduce firmware node type for platform data
  driver core: Implement device property accessors through fwnode ones
  driver core: property: Update fwnode_property_read_string_array()
  Driver core: Fix missing whitespace in function argument
  ...

Change-Id: Ibb582958e81c1e0b19293100e4f81bb033715917
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoPLATFORM: removed vout1_pin config from DT
Marcus Cooksey [Wed, 25 Nov 2015 20:20:29 +0000 (14:20 -0600)]
PLATFORM: removed vout1_pin config from DT

IO Delay requires moving pinmux config from DT
to u-boot.

Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
Change-Id: I05641e3c2129647f45b88db2ee196e7bbaf494a2

5 years agoMerge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Wed, 25 Nov 2015 19:18:52 +0000 (13:18 -0600)]
Merge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common:
  usb: dwc3: host: pass BROKEN_PE flag for known broken revisions
  usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested
  usb: host: xhci: add broken pe quirk flag to pdata
  usb: dwc3: core: define macros for newest revisions
  usb: host: xhci: dont' clear previously enabled quirks

Change-Id: Id7914cc1d7b206255e60c2bfbe7d1d1e932d1877
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agousb: dwc3: host: pass BROKEN_PE flag for known broken revisions
Felipe Balbi [Mon, 26 Oct 2015 17:25:42 +0000 (12:25 -0500)]
usb: dwc3: host: pass BROKEN_PE flag for known broken revisions

part of i896 errata fix
i896: USB xHCI port disable feature does not work

picked from ti-linux-4.1.y

commit 879f8c60ee5b ("usb: dwc3: host: pass BROKEN_PE flag for known broken revisions")

Now that we have a broken pe quirk flag, dwc3
can tell XHCI core about it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
[cherrypick and commit-msg update for auto 3.14]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Change-Id: I01b29cfeb6d4718fc263b3420c295df8a6e342e1

5 years agousb: host: xhci-plat: enable BROKEN_PE quirk if platform requested
Felipe Balbi [Mon, 26 Oct 2015 17:25:41 +0000 (12:25 -0500)]
usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested

part of i896 errata fix
i896: USB xHCI port disable feature does not work

picked from ti-linux-4.1.y

commit 6b5205c61bd9 ("usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested")

In case a broken pe flag is passed in via pdata,
we should enable the corresponding BROKEN_PE quirk
flag for XHCI core.

Change-Id: I1345902e888c616e5167c3b2978b2d9e4467efc9
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
[cherrypick and commit-msg update for auto 3.14]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agousb: host: xhci: add broken pe quirk flag to pdata
Felipe Balbi [Mon, 26 Oct 2015 17:25:40 +0000 (12:25 -0500)]
usb: host: xhci: add broken pe quirk flag to pdata

part of i896 errata fix
i896: USB xHCI port disable feature does not work

picked from ti-linux-4.1.y

commit fab38ba2a359 ("usb: host: xhci: add broken pe quirk flag to pdata")

Let platform_data users pass broken pe flag to
xhci driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
[cherrypick and commit-msg update for auto 3.14]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Change-Id: I47aede2c86e69a429bdfc997b1d8d8f6e9f59e45

5 years agousb: dwc3: core: define macros for newest revisions
Felipe Balbi [Mon, 26 Oct 2015 17:25:39 +0000 (12:25 -0500)]
usb: dwc3: core: define macros for newest revisions

part of i896 errata fix
i896: USB xHCI port disable feature does not work

picked from ti-linux-4.1.y

commit f56d404b3022 ("usb: dwc3: core: define macros for newest revisions")

dwc3 has released two other versions (2.90a and 3.00a),
this patch just adds revision macros.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
[cherrypick and update commit-msg to auto 3.14]

Change-Id: I2353e777ee8734f7dee156dd592166223dbe8db5
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agousb: host: xhci: dont' clear previously enabled quirks
Felipe Balbi [Wed, 11 Nov 2015 14:26:40 +0000 (08:26 -0600)]
usb: host: xhci: dont' clear previously enabled quirks

part of i896 errata fix
i896: USB xHCI port disable feature does not work

picked from ti-linux-4.1.y

commit f5adb97463c2 ("usb: host: xhci: dont' clear previously enabled quirks")

At least xhci-plat.c enables some quirks during
probe() as those are passed in via
platform_data. Instead of possibly reinitializing
those on xhci.c, let's make sure that we enable
missing ones while leaving detected bits alone.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[cherry-pick and update commit-msg to auto 3.14.y]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Change-Id: I746465d0615fe53a61d3ef48304afa903dce3511

5 years agoCONFIG: Add config for TLC59108 and TC3587XXBG
Marcus Cooksey [Wed, 25 Nov 2015 16:17:12 +0000 (10:17 -0600)]
CONFIG: Add config for TLC59108 and TC3587XXBG

Included build flags CONFIG_BACKLIGHT_TLC59108
and CONFIG_DISPLAY_PANEL_TC3587XXBG

Change-Id: I39b04bd8c7297b76128d26f670ad467b12726ae3
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoINPUT: Add DT Entries to enable EDT-FT5x06 TSC
Marcus Cooksey [Wed, 25 Nov 2015 01:11:37 +0000 (19:11 -0600)]
INPUT: Add DT Entries to enable EDT-FT5x06 TSC

OMAPDSS: Add DT Entries to enable 10 inch OSD Display

Add related device tree nodes and settings to support the
edt-ftx06 touchscreen controller that is
on the OSD 10" display panel (panel-tc3587xxbg).

Change-Id: I5010e055c3717cb7a1eb855a382cb48d5fb1ba42
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoOMAPDSS: Add DT Entries to enable TLC59108 BL Controller
Marcus Cooksey [Wed, 25 Nov 2015 16:06:40 +0000 (10:06 -0600)]
OMAPDSS: Add DT Entries to enable TLC59108 BL Controller

Provide related device tree nodes and settings to enable the
backlight controller that is part of the panel-tc3587xxbg.

Change-Id: Ie0f834dfde13d2a37dc144918f1cafb3bdf548f0
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoBACKLIGHT: Add Driver for TLC59108 Backlight Driver
Marcus Cooksey [Wed, 25 Nov 2015 00:45:08 +0000 (18:45 -0600)]
BACKLIGHT: Add Driver for TLC59108 Backlight Driver

Created a new driver to decouple it from the panel
drivers.  Currently this driver is only compatible
with the panel-tc3587xxbg driver.

Change-Id: Ic182d43c0f8500c7e7775a1c69d3510583021a80
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoOMAPDSS: Add DT Entries to enable 10 inch OSD Display
Marcus Cooksey [Wed, 25 Nov 2015 15:51:20 +0000 (09:51 -0600)]
OMAPDSS: Add DT Entries to enable 10 inch OSD Display

Provide related device tree nodes and settings to support the
new panel-tc3587xxbg display driver.

Change-Id: I0cd8f54be4b45cbd8d1829d5b55ee03231128a1d
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoOMAPDSS: New driver for the OSD 10" Display
Marcus Cooksey [Mon, 3 Aug 2015 19:23:45 +0000 (14:23 -0500)]
OMAPDSS: New driver for the OSD 10" Display

Added new driver for the TC3587 DPI-to-DSI
display panel

Change-Id: Ic6b8800c58cf7fb26a5baf4ad859b6682c8e8159
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoMerge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Tue, 24 Nov 2015 23:57:37 +0000 (17:57 -0600)]
Merge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common:
  arm: dts: dra72: Remove pinmux from kernel
  arm: dts: dra72: Add MMC padmux and delay entries

Conflicts:
arch/arm/boot/dts/dra72-evm.dts

Change-Id: I8ffecdf70ffac6397c974ca495821b9134812248
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoof: EXPORT_SYMBOL_GPL of_property_read_u64_array
Sakari Ailus [Tue, 27 Jan 2015 10:26:35 +0000 (12:26 +0200)]
of: EXPORT_SYMBOL_GPL of_property_read_u64_array

Make of_property_read_u64_array() available for modules as well. This was
missing from the patch which originally added the function.

Change-Id: Iec36c3f80d9ea536848b3c417177a4df1ee99287
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoDriver core: Unified device properties interface for platform firmware
Rafael J. Wysocki [Tue, 4 Nov 2014 00:28:56 +0000 (01:28 +0100)]
Driver core: Unified device properties interface for platform firmware

Add a uniform interface by which device drivers can request device
properties from the platform firmware by providing a property name
and the corresponding data type.  The purpose of it is to help to
write portable code that won't depend on any particular platform
firmware interface.

The following general helper functions are added:

device_property_present()
device_property_read_u8()
device_property_read_u16()
device_property_read_u32()
device_property_read_u64()
device_property_read_string()
device_property_read_u8_array()
device_property_read_u16_array()
device_property_read_u32_array()
device_property_read_u64_array()
device_property_read_string_array()

The first one allows the caller to check if the given property is
present.  The next 5 of them allow single-valued properties of
various types to be retrieved in a uniform way.  The remaining 5 are
for reading properties with multiple values (arrays of either numbers
or strings).

The interface covers both ACPI and Device Trees.

This change set includes material from Mika Westerberg and Aaron Lu.

Change-Id: I24d2fd641a94736caec008d9907670a48d54d111
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoof: add functions to count number of elements in a property
Heiko Stuebner [Wed, 12 Feb 2014 00:00:34 +0000 (01:00 +0100)]
of: add functions to count number of elements in a property

The need to know the number of array elements in a property is
a common pattern. To prevent duplication of open-coded implementations
add a helper static function that also centralises strict sanity
checking and DTB format details, as well as a set of wrapper functions
for u8, u16, u32 and u64.

Change-Id: I08815cd845628cfc35988a6e4324217bf629eaef
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
5 years agoInput: Merged 4.1 OF helper functions
Marcus Cooksey [Tue, 24 Nov 2015 05:11:37 +0000 (23:11 -0600)]
Input: Merged 4.1 OF helper functions

Backported portion of the 4.1 Kernel mainline
for changes that did not merge without conflict.
These changes are required to enable the
edt-ft5x06 touchscreen controller.

Change-Id: I1f6ff7b777aa02284bf5a75f2eff593e7333a39a
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoof: Introduce device tree node flag helpers.
Pantelis Antoniou [Fri, 8 Nov 2013 15:03:56 +0000 (17:03 +0200)]
of: Introduce device tree node flag helpers.

Helper functions for working with device node flags.

Change-Id: I661b2736bafb536fc699b2be08de733e1ca8d93f
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
5 years agoDriver core: Unified interface for firmware node properties
Rafael J. Wysocki [Tue, 4 Nov 2014 13:03:59 +0000 (14:03 +0100)]
Driver core: Unified interface for firmware node properties

Add new generic routines are provided for retrieving properties from
device description objects in the platform firmware in case there are
no struct device objects for them (either those objects have not been
created yet or they do not exist at all).

The following functions are provided:

fwnode_property_present()
fwnode_property_read_u8()
fwnode_property_read_u16()
fwnode_property_read_u32()
fwnode_property_read_u64()
fwnode_property_read_string()
fwnode_property_read_u8_array()
fwnode_property_read_u16_array()
fwnode_property_read_u32_array()
fwnode_property_read_u64_array()
fwnode_property_read_string_array()

in analogy with the corresponding functions for struct device added
previously.  For all of them, the first argument is a pointer to struct
fwnode_handle (new type) that allows a device description object
(depending on what platform firmware interface is in use) to be
obtained.

Add a new macro device_for_each_child_node() for iterating over the
children of the device description object associated with a given
device and a new function device_get_child_node_count() returning the
number of a given device's child nodes.

The interface covers both ACPI and Device Trees.

Change-Id: Ie113a52dbffa5ae8ba702999b352cf4e029278c1
Suggested-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoDriver core: Unified device properties interface for platform firmware
Rafael J. Wysocki [Tue, 4 Nov 2014 00:28:56 +0000 (01:28 +0100)]
Driver core: Unified device properties interface for platform firmware

Add a uniform interface by which device drivers can request device
properties from the platform firmware by providing a property name
and the corresponding data type.  The purpose of it is to help to
write portable code that won't depend on any particular platform
firmware interface.

The following general helper functions are added:

device_property_present()
device_property_read_u8()
device_property_read_u16()
device_property_read_u32()
device_property_read_u64()
device_property_read_string()
device_property_read_u8_array()
device_property_read_u16_array()
device_property_read_u32_array()
device_property_read_u64_array()
device_property_read_string_array()

The first one allows the caller to check if the given property is
present.  The next 5 of them allow single-valued properties of
various types to be retrieved in a uniform way.  The remaining 5 are
for reading properties with multiple values (arrays of either numbers
or strings).

The interface covers both ACPI and Device Trees.

This change set includes material from Mika Westerberg and Aaron Lu.

Change-Id: I63358bcd92fdc6497f4110f3be7b9872a926e926
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoDriver core: Unified device properties interface for platform firmware
Rafael J. Wysocki [Tue, 4 Nov 2014 00:28:56 +0000 (01:28 +0100)]
Driver core: Unified device properties interface for platform firmware

Add a uniform interface by which device drivers can request device
properties from the platform firmware by providing a property name
and the corresponding data type.  The purpose of it is to help to
write portable code that won't depend on any particular platform
firmware interface.

The following general helper functions are added:

device_property_present()
device_property_read_u8()
device_property_read_u16()
device_property_read_u32()
device_property_read_u64()
device_property_read_string()
device_property_read_u8_array()
device_property_read_u16_array()
device_property_read_u32_array()
device_property_read_u64_array()
device_property_read_string_array()

The first one allows the caller to check if the given property is
present.  The next 5 of them allow single-valued properties of
various types to be retrieved in a uniform way.  The remaining 5 are
for reading properties with multiple values (arrays of either numbers
or strings).

The interface covers both ACPI and Device Trees.

This change set includes material from Mika Westerberg and Aaron Lu.

Change-Id: Id6741017fb1d9cc83343b15e22893d28c0fd7ab2
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agodevice property: fix potential NULL pointer dereference
Andy Shevchenko [Wed, 5 Aug 2015 13:51:11 +0000 (16:51 +0300)]
device property: fix potential NULL pointer dereference

commit ecc87eed7beeb50c0be0b73322d62135277ea2b0 upstream.

In device_add_property_set() we check pset parameter for a NULL, but few lines
later we do a pointer arithmetic without check that will crash kernel in the
set_secondary_fwnode().

Here we check if pset parameter is NULL and return immediately.

Change-Id: I2537b06553df576b4639b5fd5496150ecd377016
Fixes: 16ba08d5c9ec (device property: Introduce firmware node type for platform data)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodevice property: Introduce firmware node type for platform data
Rafael J. Wysocki [Fri, 3 Apr 2015 14:05:11 +0000 (16:05 +0200)]
device property: Introduce firmware node type for platform data

Introduce data structures and code allowing "built-in" properties
to be associated with devices in such a way that they will be used
by the device_property_* API if no proper firmware node (neither DT
nor ACPI) is present for the given device.

Each property is to be represented by a property_entry structure.
An array of property_entry structures (terminated with a null
entry) can be pointed to by the properties field of struct
property_set that can be added as a firmware node to a struct
device using device_add_property_set().  That will cause the
device_property_* API to use that property_set as the source
of properties if the given device does not have a DT node or
an ACPI companion device object associated with it.

Change-Id: If8d5e8fb7449564d10ffcc9da5666db153fa37dc
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodriver core: Implement device property accessors through fwnode ones
Rafael J. Wysocki [Mon, 23 Mar 2015 23:24:16 +0000 (00:24 +0100)]
driver core: Implement device property accessors through fwnode ones

Now that the ACPI companions of devices are pointed to by the fwnode
field in struct device, the device_property_*() accessor functions
can be modified to use their fwnode_property_*() counterparts
internally with minimum extra overhead in the IS_ENABLED(CONFIG_OF)
case, so make those changes.

This allows us to get rid of the rather ugly DEV_PROP_READ_ARRAY()
macro among other things.

Change-Id: Ic43e3bc748775c43944cf908ea5818e916a4712c
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodriver core: property: Update fwnode_property_read_string_array()
Rafael J. Wysocki [Mon, 23 Mar 2015 23:18:05 +0000 (00:18 +0100)]
driver core: property: Update fwnode_property_read_string_array()

Commit 5c0acf3b4f96 (driver core: Add comments about returning array
counts) forgot to update fwnode_property_read_string_array() along
the lines of device_property_read_string_array(), although it did
change the kerneldoc comment of it.  Fix that.

Change-Id: Ifd0f8ef6435c79a0f05a42d55d1fcd0cacabf9f4
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoDriver core: Fix missing whitespace in function argument
Florin Papa [Sun, 8 Mar 2015 10:24:05 +0000 (12:24 +0200)]
Driver core: Fix missing whitespace in function argument

Found this using checkpatch.pl.

Change-Id: Ia65471b186623f6033d91ca90cb34b37f9d3107e
Signed-off-by: Florin Papa <florin.papa192@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodriver core: Add comments about returning array counts
Adrian Hunter [Tue, 17 Mar 2015 07:58:58 +0000 (09:58 +0200)]
driver core: Add comments about returning array counts

The "read array" variants of the device property functions
can be used to return the number of values in an array.
Update the comments to reflect that.

Change-Id: Ia870352f4d2b44366a307d6f014592eaf3c2191f
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoDriver core: Unified interface for firmware node properties
Rafael J. Wysocki [Tue, 4 Nov 2014 13:03:59 +0000 (14:03 +0100)]
Driver core: Unified interface for firmware node properties

Add new generic routines are provided for retrieving properties from
device description objects in the platform firmware in case there are
no struct device objects for them (either those objects have not been
created yet or they do not exist at all).

The following functions are provided:

fwnode_property_present()
fwnode_property_read_u8()
fwnode_property_read_u16()
fwnode_property_read_u32()
fwnode_property_read_u64()
fwnode_property_read_string()
fwnode_property_read_u8_array()
fwnode_property_read_u16_array()
fwnode_property_read_u32_array()
fwnode_property_read_u64_array()
fwnode_property_read_string_array()

in analogy with the corresponding functions for struct device added
previously.  For all of them, the first argument is a pointer to struct
fwnode_handle (new type) that allows a device description object
(depending on what platform firmware interface is in use) to be
obtained.

Add a new macro device_for_each_child_node() for iterating over the
children of the device description object associated with a given
device and a new function device_get_child_node_count() returning the
number of a given device's child nodes.

The interface covers both ACPI and Device Trees.

Change-Id: Ic6082b2793327af8770a941aff9032f081321797
Suggested-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoDriver core: Unified device properties interface for platform firmware
Rafael J. Wysocki [Tue, 4 Nov 2014 00:28:56 +0000 (01:28 +0100)]
Driver core: Unified device properties interface for platform firmware

Add a uniform interface by which device drivers can request device
properties from the platform firmware by providing a property name
and the corresponding data type.  The purpose of it is to help to
write portable code that won't depend on any particular platform
firmware interface.

The following general helper functions are added:

device_property_present()
device_property_read_u8()
device_property_read_u16()
device_property_read_u32()
device_property_read_u64()
device_property_read_string()
device_property_read_u8_array()
device_property_read_u16_array()
device_property_read_u32_array()
device_property_read_u64_array()
device_property_read_string_array()

The first one allows the caller to check if the given property is
present.  The next 5 of them allow single-valued properties of
various types to be retrieved in a uniform way.  The remaining 5 are
for reading properties with multiple values (arrays of either numbers
or strings).

The interface covers both ACPI and Device Trees.

This change set includes material from Mika Westerberg and Aaron Lu.

Change-Id: I6ca9e95c0ba19698db4bc82417af3dc79845c53f
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agodevice property: Introduce firmware node type for platform data
Rafael J. Wysocki [Fri, 3 Apr 2015 14:05:11 +0000 (16:05 +0200)]
device property: Introduce firmware node type for platform data

Introduce data structures and code allowing "built-in" properties
to be associated with devices in such a way that they will be used
by the device_property_* API if no proper firmware node (neither DT
nor ACPI) is present for the given device.

Each property is to be represented by a property_entry structure.
An array of property_entry structures (terminated with a null
entry) can be pointed to by the properties field of struct
property_set that can be added as a firmware node to a struct
device using device_add_property_set().  That will cause the
device_property_* API to use that property_set as the source
of properties if the given device does not have a DT node or
an ACPI companion device object associated with it.

Change-Id: Ia72af51b6ee707249a50c0a08accc977173d88ae
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodevice property: Make it possible to use secondary firmware nodes
Rafael J. Wysocki [Fri, 3 Apr 2015 21:23:37 +0000 (23:23 +0200)]
device property: Make it possible to use secondary firmware nodes

Add a secondary pointer to struct fwnode_handle so as to make it
possible for a device to have two firmware nodes associated with
it at the same time, for example, an ACPI node and a node with
a set of properties provided by platform initialization code.

In the future that will allow device property lookup to fall back
from the primary firmware node to the secondary one if the given
property is not present there to make it easier to provide defaults
for device properties used by device drivers.

Introduce two helper routines, set_primary_fwnode() and
set_secondary_fwnode() allowing callers to add a primary/secondary
firmware node to the given device in such a way that

 (1) If there's only one firmware node for that device, it will be
     pointed to by the device's firmware node pointer.
 (2) If both the primary and secondary firmware nodes are present,
     the primary one will be pointed to by the device's firmware
     node pointer, while the secondary one will be pointed to by the
     primary node's secondary pointer.
 (3) If one of these nodes is removed (by calling one of the new
     nelpers with NULL as the second argument), the other one will
     be preserved.

Make ACPI use set_primary_fwnode() for attaching its firmware nodes
to devices.

Change-Id: Ief75df58b5f447e353755ada9fc3d4efbc4d8191
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodriver core / ACPI: Represent ACPI companions using fwnode_handle
Rafael J. Wysocki [Mon, 16 Mar 2015 22:49:03 +0000 (23:49 +0100)]
driver core / ACPI: Represent ACPI companions using fwnode_handle

Now that we have struct fwnode_handle, we can use that to point to
ACPI companions from struct device objects instead of pointing to
struct acpi_device directly.

There are two benefits from that.  First, the somewhat ugly and
hackish struct acpi_dev_node can be dropped and, second, the same
struct fwnode_handle pointer can be used in the future to point
to other (non-ACPI) firmware device node types.

Change-Id: I07bd6ba8aca14909b9fa7fc4e38d07b5ddd6657c
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
5 years agodevice property: Introduce firmware node type for platform data
Rafael J. Wysocki [Fri, 3 Apr 2015 14:05:11 +0000 (16:05 +0200)]
device property: Introduce firmware node type for platform data

Introduce data structures and code allowing "built-in" properties
to be associated with devices in such a way that they will be used
by the device_property_* API if no proper firmware node (neither DT
nor ACPI) is present for the given device.

Each property is to be represented by a property_entry structure.
An array of property_entry structures (terminated with a null
entry) can be pointed to by the properties field of struct
property_set that can be added as a firmware node to a struct
device using device_add_property_set().  That will cause the
device_property_* API to use that property_set as the source
of properties if the given device does not have a DT node or
an ACPI companion device object associated with it.

Change-Id: Icb4e139acafa9dd6de6e3a2dbc97afabd541cfb2
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodriver core / ACPI: Represent ACPI companions using fwnode_handle
Rafael J. Wysocki [Mon, 16 Mar 2015 22:49:03 +0000 (23:49 +0100)]
driver core / ACPI: Represent ACPI companions using fwnode_handle

Now that we have struct fwnode_handle, we can use that to point to
ACPI companions from struct device objects instead of pointing to
struct acpi_device directly.

There are two benefits from that.  First, the somewhat ugly and
hackish struct acpi_dev_node can be dropped and, second, the same
struct fwnode_handle pointer can be used in the future to point
to other (non-ACPI) firmware device node types.

Change-Id: Iee9338d2101782a051efe422848be6bb0cea87b3
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
5 years agoDriver core: Unified interface for firmware node properties
Rafael J. Wysocki [Tue, 4 Nov 2014 13:03:59 +0000 (14:03 +0100)]
Driver core: Unified interface for firmware node properties

Add new generic routines are provided for retrieving properties from
device description objects in the platform firmware in case there are
no struct device objects for them (either those objects have not been
created yet or they do not exist at all).

The following functions are provided:

fwnode_property_present()
fwnode_property_read_u8()
fwnode_property_read_u16()
fwnode_property_read_u32()
fwnode_property_read_u64()
fwnode_property_read_string()
fwnode_property_read_u8_array()
fwnode_property_read_u16_array()
fwnode_property_read_u32_array()
fwnode_property_read_u64_array()
fwnode_property_read_string_array()

in analogy with the corresponding functions for struct device added
previously.  For all of them, the first argument is a pointer to struct
fwnode_handle (new type) that allows a device description object
(depending on what platform firmware interface is in use) to be
obtained.

Add a new macro device_for_each_child_node() for iterating over the
children of the device description object associated with a given
device and a new function device_get_child_node_count() returning the
number of a given device's child nodes.

The interface covers both ACPI and Device Trees.

Change-Id: Ib49c4ffd8d143ba28f8b9af261c9463e7a46e466
Suggested-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoDriver core: Unified device properties interface for platform firmware
Rafael J. Wysocki [Tue, 4 Nov 2014 00:28:56 +0000 (01:28 +0100)]
Driver core: Unified device properties interface for platform firmware

Add a uniform interface by which device drivers can request device
properties from the platform firmware by providing a property name
and the corresponding data type.  The purpose of it is to help to
write portable code that won't depend on any particular platform
firmware interface.

The following general helper functions are added:

device_property_present()
device_property_read_u8()
device_property_read_u16()
device_property_read_u32()
device_property_read_u64()
device_property_read_string()
device_property_read_u8_array()
device_property_read_u16_array()
device_property_read_u32_array()
device_property_read_u64_array()
device_property_read_string_array()

The first one allows the caller to check if the given property is
present.  The next 5 of them allow single-valued properties of
various types to be retrieved in a uniform way.  The remaining 5 are
for reading properties with multiple values (arrays of either numbers
or strings).

The interface covers both ACPI and Device Trees.

This change set includes material from Mika Westerberg and Aaron Lu.

Change-Id: Ib2db573e9e71d9786582c4a6b8f58fd4e8588da1
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoInput: of_touchscreen - switch to using device properties
Dmitry Torokhov [Tue, 7 Jul 2015 12:51:03 +0000 (15:51 +0300)]
Input: of_touchscreen - switch to using device properties

Let's switch form OF to device properties so that common parsing code could
work not only on device tree but also on ACPI-based platforms.

Change-Id: I944f6d2fe7c14767f510910939961cda3863d83c
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: of_touchscreen - switch to using device properties
Dmitry Torokhov [Tue, 7 Jul 2015 12:51:03 +0000 (15:51 +0300)]
Input: of_touchscreen - switch to using device properties

Let's switch form OF to device properties so that common parsing code could
work not only on device tree but also on ACPI-based platforms.

Change-Id: Ibd7f411b0133845a1d6833528c92caa71e955337
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: of_touchscreen - switch to using device properties
Dmitry Torokhov [Tue, 7 Jul 2015 12:51:03 +0000 (15:51 +0300)]
Input: of_touchscreen - switch to using device properties

Let's switch form OF to device properties so that common parsing code could
work not only on device tree but also on ACPI-based platforms.

Change-Id: Id763f5f68f2e2f19456df6cc97931206a1e39813
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: of_touchscreen - fix setting max values on X/Y axis
Dmitry Torokhov [Tue, 7 Jul 2015 12:51:02 +0000 (15:51 +0300)]
Input: of_touchscreen - fix setting max values on X/Y axis

The binding specification says that "touchscreen-size-x" and "-y" specify
horizontal and vertical resolution of the touchscreen and therefore maximum
absolute coordinates should be reduced by 1 since we are starting with 0.

Change-Id: I02e53b22222831483bec4ffc74e65c0135561515
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: of_touchscreen - always issue warning if axis is not set up
Dmitry Torokhov [Tue, 7 Jul 2015 12:51:01 +0000 (15:51 +0300)]
Input: of_touchscreen - always issue warning if axis is not set up

Do issue warning about axis that is present in device tree but not specified
by the driver even in case of multi-touch axis as callers now tell us if they
expect multi-touch data or not.

Change-Id: Ie85898d7cb9f38bf1069719a54d2431977727000
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: improve parsing OF parameters for touchscreens
Dmitry Torokhov [Tue, 7 Jul 2015 12:41:53 +0000 (15:41 +0300)]
Input: improve parsing OF parameters for touchscreens

When applying touchscreen parameters specified in device tree let's make
sure we keep whatever setup was done by the driver and not reset the
missing values to zero.

Change-Id: I94e5579475e61c566607e27fc5a074e8158c0d9b
Reported-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: of_touchscreen - register multitouch axes
Maxime Ripard [Sun, 22 Mar 2015 03:17:57 +0000 (20:17 -0700)]
Input: of_touchscreen - register multitouch axes

So far, the DT parsing code was only setting up the regular input axes,
completely ignoring their multitouch counter parts.

Fill them with the same parameters than the regular axes.

Change-Id: Ie62169f52da5ec934aa8d0974d2d129e5f2a8001
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: of_touchscreen - rework the DT parsing function
Maxime Ripard [Sun, 22 Mar 2015 03:17:48 +0000 (20:17 -0700)]
Input: of_touchscreen - rework the DT parsing function

The DT parsing function currently duplicates a lot of the code to parse the
touchscreen DT properties. In order to ease further additions to this
parsing routine, rework it slightly to create new helper functions.

Change-Id: Id47cd885ec12613fc401f7e38c299e2ea1cece78
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: add common DT binding for touchscreens
Sebastian Reichel [Thu, 29 May 2014 06:51:53 +0000 (23:51 -0700)]
Input: add common DT binding for touchscreens

Add common DT binding documentation for touchscreen devices and
implement input_parse_touchscreen_of_params, which parses the common
properties and configures the input device accordingly.

The method currently does not interpret the axis inversion properties,
since there is no matching flag in the generic linux input device.

Change-Id: If5819786899d2a741f30be8ba6096af06e36ff00
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: Enable new driver for edt-ft5x06
Marcus Cooksey [Tue, 24 Nov 2015 00:37:45 +0000 (18:37 -0600)]
Input: Enable new driver for edt-ft5x06

Ported the edt-ft5x06 touchscreen controller
driver along with the dependent config and
devicetree framework.

Change-Id: I91b6b00a9d51b1e06f44a2a180505e273c511ec9
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
5 years agoInput: of_touchscreen - switch to using device properties
Dmitry Torokhov [Tue, 7 Jul 2015 12:51:03 +0000 (15:51 +0300)]
Input: of_touchscreen - switch to using device properties

Let's switch form OF to device properties so that common parsing code could
work not only on device tree but also on ACPI-based platforms.

Change-Id: Ide0d9634a7e46b2eabee4577e8c75e334d5a01b1
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: improve parsing OF parameters for touchscreens
Dmitry Torokhov [Tue, 7 Jul 2015 12:41:53 +0000 (15:41 +0300)]
Input: improve parsing OF parameters for touchscreens

When applying touchscreen parameters specified in device tree let's make
sure we keep whatever setup was done by the driver and not reset the
missing values to zero.

Change-Id: I979fdc6e595d6453593a25aadca6df3ce89c06cb
Reported-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: add common DT binding for touchscreens
Sebastian Reichel [Thu, 29 May 2014 06:51:53 +0000 (23:51 -0700)]
Input: add common DT binding for touchscreens

Add common DT binding documentation for touchscreen devices and
implement input_parse_touchscreen_of_params, which parses the common
properties and configures the input device accordingly.

The method currently does not interpret the axis inversion properties,
since there is no matching flag in the generic linux input device.

Change-Id: Ibdff3dcea7f6148523eac0b1e216c3766a690f77
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: edt-ft5x06 - Work around FT5506 firmware bug
Franklin S Cooper Jr [Wed, 7 Oct 2015 09:52:25 +0000 (04:52 -0500)]
Input: edt-ft5x06 - Work around FT5506 firmware bug

In the touchscreen controller ISR, reading the tsc starting from
register 0x2 causes the tsc to very infrequently update the detected
finger movement coordinates. The irq pin toogles at a fast rate to
indicate touch events are happening but when reading the coordinates
from the tsc the are only updated/change at at rate of ~100 ms.

Example:
X: 10 , Y: 30
X: 10 , Y: 30
X: 10,  Y: 30
..
// After 100 ms
X: 300, Y: 300
X: 300, y: 300
..
// After 100 ms
X: 1743, Y: 621
X: 1743, Y: 621

For some reason if instead of starting to read at register 0x2 you
start reading at register 0x0 this issue isn't seen. This seems like
a quirk only seen in the EDT FT5506 so to fix this issue simply
adjust the code to start reading from 0x0. Since there is technically
nothing wrong with doing this no regressions should be seen with other
touchscreen controllers supported by this driver.

Change-Id: I2b08c8e17a3ec59db1842f580b5e8dd6e102648d
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: edt-ft5x06 - Add support for 10 touch points for FT5506
Franklin S Cooper Jr [Wed, 7 Oct 2015 09:52:24 +0000 (04:52 -0500)]
Input: edt-ft5x06 - Add support for 10 touch points for FT5506

FT5506 supports up to 10 touch points so increase the maximum support
points to 10.

Change-Id: I41030d1701d88b7c702d343a003f202f3f057faf
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: edt-ft5x06 - Add support for variable amount of max support points
Franklin S Cooper Jr [Wed, 7 Oct 2015 09:52:23 +0000 (04:52 -0500)]
Input: edt-ft5x06 - Add support for variable amount of max support points

Update code so that the maximum supported points aren't hard coded but can
be changed.

Set the maximum support points based on the data passed along side the
compatible field.

Change-Id: Ic1a586d2e481c71a87e5d3fe9ce3158078d20867
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: edt-ft5x06 - Use max support points to determine read length
Franklin S Cooper Jr [Wed, 7 Oct 2015 09:52:22 +0000 (04:52 -0500)]
Input: edt-ft5x06 - Use max support points to determine read length

Calculate the amount of data that needs to be read for specified max number
of support points. If the maximum number of support points changes then the
amount that is read from the touch screen controller should reflect this.

Change-Id: Iad904d3e90f97dbcb6424bdfe3da1d19efd3f9e9
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: edt-ft5x06 - do not call desc_to_gpio for invalid gpios
Franklin S Cooper Jr [Wed, 7 Oct 2015 09:52:21 +0000 (04:52 -0500)]
Input: edt-ft5x06 - do not call desc_to_gpio for invalid gpios

Since reset and wake pin are optional the gpio structure for those
pins may be null. Therefore, they can't be blindly passed to
desc_to_gpio.

Change-Id: I02e808ef69dd2772cf0c574fc2d9dcb1e1921455
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: edt-ft5x06 - Add compatible field for FT5506
Franklin S Cooper Jr [Tue, 1 Sep 2015 14:56:29 +0000 (09:56 -0500)]
Input: edt-ft5x06 - Add compatible field for FT5506

FT5506 is essentially the same as other FT5x06 devices. Add new
compatibility field to reflect this.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
[nsekhar@ti.com: fix typos in binding documentation and commit
                 text]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Change-Id: I8c1d59558810a2a2838bad7a4018166be3cef149

5 years agoInput: edt-ft5x06 - Switch to newer gpio framework
Franklin S Cooper Jr [Tue, 1 Sep 2015 14:56:28 +0000 (09:56 -0500)]
Input: edt-ft5x06 - Switch to newer gpio framework

The current/old gpio framework used doesn't properly listen to
ACTIVE_LOW and ACTIVE_HIGH flags. The newer gpio framework takes into
account these flags when setting gpio values.

Since the values being outputed were base on voltage and not logic the
values being outputted must change to refect this difference. Also use
gpiod_set_value_cansleep since wake and reset pins can be provided by
bus based io expanders.

Switch from msleep(5) to udelay_range(5000,6000) to avoid check patch
warning.

Change-Id: Idd8a7c5b8a9ce97feb6cdb92e873a97c8580c60d
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: of_touchscreen - switch to using device properties
Dmitry Torokhov [Tue, 7 Jul 2015 12:51:03 +0000 (15:51 +0300)]
Input: of_touchscreen - switch to using device properties

Let's switch form OF to device properties so that common parsing code could
work not only on device tree but also on ACPI-based platforms.

Change-Id: If0c00cec5919a8875c4f40e78cf444e0e9dbfac5
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: improve parsing OF parameters for touchscreens
Dmitry Torokhov [Tue, 7 Jul 2015 12:41:53 +0000 (15:41 +0300)]
Input: improve parsing OF parameters for touchscreens

When applying touchscreen parameters specified in device tree let's make
sure we keep whatever setup was done by the driver and not reset the
missing values to zero.

Change-Id: Iad3a642242f4c905768730bc9e3f3a16827f5e1e
Reported-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoInput: edt-ft5x06 - remove EV_SYN event report
Maxime Ripard [Sun, 22 Mar 2015 03:18:59 +0000 (20:18 -0700)]
Input: edt-ft5x06 - remove EV_SYN event report

input_register_device already sets the EV_SYN event since all devices can
generate them.

Remove the redundant affectation.

Change-Id: I7e110fb07285d138d3141dc707ebc263bdc94c8d
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: edt-ft5x06 - allow to setting the maximum axes value through the DT
Maxime Ripard [Sun, 22 Mar 2015 03:18:06 +0000 (20:18 -0700)]
Input: edt-ft5x06 - allow to setting the maximum axes value through the DT

Currently the driver relies on some obscure and undocumented register to set
the maximum axis value.

The reported value is way too high to be meaningful, which confuses some
userspace tools like QT's evdevtouch plugin which try to scale the reported
events to the maximum values.

Use the values from the DT to set meaningful values.

Change-Id: Ib74de0d591bf0499a73399f5ea06e21f3f4c96be
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: edt-ft5x06 - fixed a macro coding style issue
Asaf Vertz [Sat, 13 Dec 2014 18:59:04 +0000 (10:59 -0800)]
Input: edt-ft5x06 - fixed a macro coding style issue

Fixed a coding style error, macros with complex values should be
enclosed in parentheses.

Change-Id: I04a67a67bd7541e56eeca04956c1136eebefdc69
Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: touchscreen - use __maybe_unused instead of ifdef around suspend/resume
Jingoo Han [Sun, 2 Nov 2014 07:04:14 +0000 (00:04 -0700)]
Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resume

Use __maybe_unused instead of ifdef guards around suspend/resume
functions, in order to increase build coverage and fix build warnings.

Change-Id: I44e09f0a696232ee7560c549f157c366ecaeb379
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoinput: edt-ft5x06: replace strnicmp with strncasecmp
Rasmus Villemoes [Mon, 13 Oct 2014 22:54:48 +0000 (15:54 -0700)]
input: edt-ft5x06: replace strnicmp with strncasecmp

The kernel used to contain two functions for length-delimited,
case-insensitive string comparison, strnicmp with correct semantics and
a slightly buggy strncasecmp.  The latter is the POSIX name, so strnicmp
was renamed to strncasecmp, and strnicmp made into a wrapper for the new
strncasecmp to avoid breaking existing users.

To allow the compat wrapper strnicmp to be removed at some point in the
future, and to avoid the extra indirection cost, do
s/strnicmp/strncasecmp/g.

Change-Id: Ib2be03dbea60bd74a9751e6d1ba59a76df50863b
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5 years agoInput: edt-ft5x06 - remove superfluous assignment
Maks Naumov [Wed, 13 Aug 2014 22:27:52 +0000 (15:27 -0700)]
Input: edt-ft5x06 - remove superfluous assignment

Somehow we ended up with a duplicate line in edt_ft5x06_register_write()

Change-Id: I80b152279a0525bd62ca70bff299736a118a343e
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoInput: edt-ft5x06 - remove unnecessary null test
Fabian Frederick [Wed, 9 Jul 2014 16:45:57 +0000 (09:45 -0700)]
Input: edt-ft5x06 - remove unnecessary null test

Fix checkpatch warning:
"WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required"

Change-Id: Ibef720e5b5a93ffa9f5c1a432d5cb9caf8de6a32
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 years agoarm: dts: dra72: Remove pinmux from kernel
Nikhil Devshatwar [Mon, 23 Nov 2015 07:29:09 +0000 (12:59 +0530)]
arm: dts: dra72: Remove pinmux from kernel

With iodelay configuration and pad configuration being performed
in isolation from bootloader, all the pinmux config is to be moved
to the bootloader. Hence removing the pinmux entries and corresponding
pinctrl properties in all peripheral device nodes.

Note that the updated bootloader with patches for pad configuration
is needed for this kernel to be functional.

Change-Id: Ib0b2a43aac94f1ef57ec3c1a6d2cde4ecc733cbb
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
5 years agoarm: dts: dra72: Add MMC padmux and delay entries
Nikhil Devshatwar [Fri, 20 Nov 2015 11:42:41 +0000 (17:12 +0530)]
arm: dts: dra72: Add MMC padmux and delay entries

For MMC module, depending on the speed grade of the card,
and the controller is used in different modes. For each of the
supported mode, to guarantee timing specifications, external
iodelay configuration is needed.

Add the padmux and iodelay data for all the MMC instances used on
DRA72 EVM and update the pinctrl properties accordingly.

NOTE: On DRA72x, for MMC1 and MMC2 modules, switching between
internal loopback and pad loopback can be done via CTRL_CORE_SPARE_RW.
All the timings used here assume Pad Loopback for all instances.

All values are generated from the PCT XML files from DRA72x v1.0.5
with the python tool.

Change-Id: Ie647855d437ea376133de089e9670f722bf7ba1f
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
5 years agoMerge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Fri, 20 Nov 2015 22:22:46 +0000 (16:22 -0600)]
Merge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common:
  OMAPDSS: i886: FPDLink PLL unlocks with certain soc PLL M/N Values

Change-Id: Ie197197b931d5666ec4d8b2c882656a3cba9afab
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoOMAPDSS: i886: FPDLink PLL unlocks with certain soc PLL M/N Values
Marcus Cooksey [Thu, 12 Nov 2015 04:39:07 +0000 (22:39 -0600)]
OMAPDSS: i886: FPDLink PLL unlocks with certain soc PLL M/N Values

i886 - FPDLink PLL unlocks with certain SoC PLL M/N values

Additionally, back ported dependent video pll
configuration routines from ti-linux-4.1.y branch
commit 0a20170aa5ef ("OMAPDSS: Add common PLL code")

Change-Id: I9bbf2c5e44d550d2ac33e51594c45c403d88bc31
Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
[cosmetic commit fixes only]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoMerge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android
Praneeth Bajjuri [Thu, 19 Nov 2015 18:02:11 +0000 (12:02 -0600)]
Merge branch 'p-ti-linux-3.14.y-common' into p-ti-linux-3.14.y-android

* p-ti-linux-3.14.y-common:
  usb: dwc3: gadget: reinitialize endpoints on suspend
  usb: dwc3: gadget: don't leave locks held
  usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
  media: ti-vpe: vpe: Fix line stride for output motion vector

Change-Id: I3dd4a2b6654b62583d242d7f2da50ff56a9b6fe4
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agousb: dwc3: gadget: reinitialize endpoints on suspend
Felipe Balbi [Thu, 12 Nov 2015 10:16:38 +0000 (15:46 +0530)]
usb: dwc3: gadget: reinitialize endpoints on suspend

We know the controller will just loose all of its
context and completely forget about any pending transfers.

This means we can just reinitialize the endpoints
and on resume everything works as expected.

cherrypick from ti-linux-4.1.y
commit 97a1b43e99381d39a3713680475d28fbd3cb3b95
Author: Felipe Balbi <balbi@ti.com>

Change-Id: I56dd320be704a5623c68dd0e6bdd7ca60b4b5173
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
[rebased to auto 3.14.y]
Signed-off-by: Ravi Babu <ravibabu@ti.com>
5 years agousb: dwc3: gadget: don't leave locks held
Felipe Balbi [Thu, 12 Nov 2015 09:56:07 +0000 (15:26 +0530)]
usb: dwc3: gadget: don't leave locks held

prevent a lock leak by making sure it's disabled
in the error path.

cherry-pick from ti-linux-4.1.y
commit 73fe27865f6a9ff38c2804df245d776a9745c1b5
Author: Felipe Balbi <balbi@ti.com>

Change-Id: I52693a0d08c23a62d352c968b594a1f463cdf33a
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
[backport to auto 3.14.y]
Signed-off-by: Ravi Babu <ravibabu@ti.com>
5 years agousb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
Subbaraya Sundeep Bhatta [Thu, 21 May 2015 10:16:46 +0000 (15:46 +0530)]
usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros

Fixed the incorrect macro definitions correctly as per databook.

Change-Id: I9fa06ee7a8fa67b24a50eada9d902f2609027401
Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Fixes: b09bb64239c8 (usb: dwc3: gadget: implement Global Command support)
Cc: <stable@vger.kernel.org> #v3.5+
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
5 years agomedia: ti-vpe: vpe: Fix line stride for output motion vector
Nikhil Devshatwar [Wed, 14 Oct 2015 19:59:09 +0000 (01:29 +0530)]
media: ti-vpe: vpe: Fix line stride for output motion vector

For deinterlacing operation, VPE hardware uses motion vectors.
MV calculated in the previous iteration are used for next interation.
Therefore driver allocates two motion vectors in ping-pong fashion.

For every transaction, one MV is DMAed in and one is DMAed out.
All the outbound DMAs (DMA to memory) use output parameters, but as
the motion vectors is generated purely out of input fields, it should
use the input parameters for DMA.

Fix the add_out_dtd to use source q_data for creating descriptor.
If the output size is greater than input stride, without this change,
MV DMA may overwrite the buffer causing memory corruption.

This CRITICAL fix ensures that the motion vector DMA descriptor is
created based on the attributes with which the buffer was allocated.

Change-Id: I3c9469055966f99a8cd92a6c779a1dbe550c0653
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Ravikumar Kattekola <rk@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
5 years agoMerge branch 'android-3.14' of https://android.googlesource.com/kernel/common into...
Praneeth Bajjuri [Wed, 18 Nov 2015 22:51:16 +0000 (16:51 -0600)]
Merge branch 'android-3.14' of https://android.googlesource.com/kernel/common into p-ti-linux-3.14.y-android

* 'android-3.14' of https://android.googlesource.com/kernel/common:
  ANDROID: android: base-cfg: disable CONFIG_SYSVIPC
  ANDROID: exec_domains: Disable request_module() call for personalities
  UPSTREAM: pagemap: do not leak physical addresses to non-privileged userspace

Change-Id: I9264d55268255fe430d0e8ce38e778623616f737
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoANDROID: android: base-cfg: disable CONFIG_SYSVIPC
Greg Hackmann [Wed, 18 Nov 2015 17:53:55 +0000 (09:53 -0800)]
ANDROID: android: base-cfg: disable CONFIG_SYSVIPC

Android SELinux policies block SysV IPC.  New kernels should not be
built with it.

Bug: 22300191

Change-Id: Ia4bcb179ff71825cab19eed603d4064a8d061a93
Signed-off-by: Greg Hackmann <ghackmann@google.com>
5 years agoANDROID: exec_domains: Disable request_module() call for personalities
John Stultz [Tue, 17 Nov 2015 16:35:54 +0000 (08:35 -0800)]
ANDROID: exec_domains: Disable request_module() call for personalities

(cherry pick from commit a9ac1262ce80c287562e604f3bb24f232fcb686e)

With Android M, Android environments use a separate execution
domain for 32bit processes.
See:
https://android-review.googlesource.com/#/c/122131/

This results in systems that use kernel modules to see selinux
audit noise like:
  type=1400 audit(28.989:15): avc: denied { module_request } for
  pid=1622 comm="app_process32" kmod="personality-8"
  scontext=u:r:zygote:s0 tcontext=u:r:kernel:s0 tclass=system

While using kernel modules is unadvised, some systems do require
them.

Thus to avoid developers adding sepolicy exceptions to allow for
request_module calls, this patch disables the logic which tries
to call request_module for the 32bit personality (ie:
personality-8), which doesn't actually exist.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I7bf8aabed0a39d9bb0c0b959e0e54f3e64b3db74