Commit Graph

603099 Commits

Author SHA1 Message Date
David Wu
c7d5bfbbba pwm: rockchip: Use pwm_apply() instead of pwm_enable()
Drop the custom hook of pwm_enable() and implement pwm_apply_v1() and
pwm_apply_v2() instead.

Change-Id: I34c6a1206f4ae53ca48756981a2c07b4ec0e7be4
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2017-08-31 10:23:33 +08:00
David Wu
b407eb761f pwm: rockchip: Remove the judge from return value of pwm_config()
It seems the rockchip_pwm_config() always returns the result 0, so
remove the judge.

Change-Id: I06da8faa583fff1a9274b4a4bb02e8c19446bc57
Signed-off-by: David Wu <david.wu@rock-chips.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2017-08-31 10:23:16 +08:00
David Wu
42881941a3 pwm: rockchip: Sync with upstream for adding APB and function both clocks support
New PWM module provides two individual clocks for APB clock and function
clock.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I9f32de5734f9e66472ae5350023ffce9548d717d
2017-08-31 10:23:03 +08:00
Elaine Zhang
f8f956a578 clk: rockchip: rk3126: add sclk_timer5 as critical clock
sclk_timer5 is for arm arch counter, so need always on.
but no dts node to handle this clk, so make it as critical clock

Change-Id: I2533d98a767fd2b296f2737ca8f03a73690820df
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-08-31 10:21:50 +08:00
Elaine Zhang
8550d8ca7e clk: rockchip: rk3128: fix up pvtm gate regs description error
Change-Id: Id2aee42b00871fc90467c09bab53abc7b6c23e41
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-08-31 10:20:52 +08:00
Elaine Zhang
ca9a65cea9 clk: rockchip: rk3128: add pclk_pmu as critical clock
pclk_pmu need always on, and no dts node to handle this clk,
so make it as critical clock

Change-Id: If95d7c45f8935883a335846b42f526cd2f36f131
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-08-31 10:20:37 +08:00
Jacob Chen
6488bce942 media: i2c: tc35874x: allow run out-of-box
This driver are desgined to be take control by userspace
but i'd like to make it support run out-of-box
to act as a normal UVC..

Change-Id: I03f4d29efce12e36334e4819cd4323fe4b0d0408
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 18:11:10 +08:00
Jacob Chen
f4b996231d media: i2c: tc35874x: use lane num form dts
Change-Id: Ia65e1e25249113e18e4df6a688bbf5cea949b36d
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 18:11:06 +08:00
Jacob Chen
c044356791 media: i2c: tc35874x: add tc358749's Chip ID
The Chip ID of tc358749 is 0x47

Change-Id: I70e6e58a15dc2f0001f7c2c962bc0dbbf3d94c2f
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 18:11:03 +08:00
Jacob Chen
2e3c43155b media: i2c: rename tc358643 driver to tc35864x
tc358649 is similar with tc358643, when VIP in tc358649 is
set to bypassed.
So this driver can also be used for tc358649, we
should rename it to tc35864x.

Below is the function table show differences between tc358643/9:

tc358643 :
- HDMI 1.4a
- MIPI CSI2-TX
- Audio Support
- HDCP Support
- 3D Support

tc358649 :
- HDMI 1.4a
- MIPI CSI2-TX
- Audio Support
- HDCP Support
- 3D Support
- Scalar
- De-interface

Change-Id: I4851f62b58687dfffdc5de686a9d12ece08e6c28
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 18:10:58 +08:00
Jacob Chen
83ff5e5bd9 media: i2c: tc358743: sync to upstream version
Change-Id: I77cb05e16ca36c14a5fa7041c29f98dc4821c2be
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 18:10:47 +08:00
Jacob Chen
3757f2f78d media: i2c: ov5647: add link_freq ctrl and get_fmt api
rockchip-isp1 driver need those interfaces.

Change-Id: I93a0ffef2e018ba8822dfa80f2ed7c4ff5897f3e
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 18:07:25 +08:00
Jacob Chen
3ac89ea302 UPSTREAM: media: i2c: Add support for OV5647 sensor
The OV5647 sensor from Omnivision supports up to 2592x1944 @ 15 fps, RAW 8
and RAW 10 output formats, and MIPI CSI-2 interface

The driver adds support for 640x480 RAW 8

Change-Id: Ie7cfe2eef2570f6973a2760eb1125d4a1e329d17
Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(cherry picked from commit 3c2472a3c5)
2017-08-30 17:32:21 +08:00
Sakari Ailus
cd40430ed3 BACKPORT: [media] v4l: Switch from V4L2 OF not V4L2 fwnode API
Switch users of the v4l2_of_ APIs to the more generic v4l2_fwnode_ APIs.
Async OF matching is replaced by fwnode matching and OF matching support
is removed.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Benoit Parrot <bparrot@ti.com> # i2c/ov2569.c, am437x/am437x-vpfe.c and ti-vpe/cal.c
Tested-by: Hans Verkuil <hans.verkuil@cisco.com> # Atmel sama5d3 board + ov2640 sensor
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 859969b38e)
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>

Conflicts:
Nathan: context, comment and include deltas, as well as deleting files
that don't apply to ChromeOS-4.4 yet
	drivers/media/i2c/Kconfig
	drivers/media/i2c/mt9v032.c
	drivers/media/i2c/ov5645.c
	drivers/media/i2c/ov5647.c
	drivers/media/i2c/s5c73m3/s5c73m3-core.c
	drivers/media/i2c/smiapp/smiapp-core.c
	drivers/media/i2c/tc358743.c
	drivers/media/i2c/tvp514x.c
	drivers/media/i2c/tvp5150.c
	drivers/media/i2c/tvp7002.c
	drivers/media/platform/Kconfig
	drivers/media/platform/atmel/Kconfig
	drivers/media/platform/atmel/atmel-isc.c
	drivers/media/platform/atmel/atmel-isi.c
	drivers/media/platform/exynos4-is/mipi-csis.c
	drivers/media/platform/omap3isp/isp.c
	drivers/media/platform/pxa_camera.c
	drivers/media/platform/rcar-vin/Kconfig
	drivers/media/platform/rcar-vin/rcar-core.c
	drivers/media/platform/soc_camera/soc_camera.c
	drivers/media/platform/stm32/stm32-dcmi.c
	drivers/media/platform/ti-vpe/cal.c
	include/media/v4l2-subdev.h

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: If338e2ab0c68c72f242988f34202e0449642734c
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528621
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 17:31:38 +08:00
Sakari Ailus
aed4e07a75 UPSTREAM: [media] v4l: flash led class: Use fwnode_handle instead of device_node in init
Pass the more generic fwnode_handle to the init function than the
device_node.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 048ea05b4f)

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Ied9439f2b96be3afe047b54877703d35074bf455
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528620
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 17:24:05 +08:00
Sakari Ailus
d99d484173 BACKPORT: [media] v4l: async: Add fwnode match support
Add fwnode matching to complement OF node matching. And fwnode may also be
an OF node.

Do not enable fwnode matching yet. It will replace OF matching soon.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit ecdf0cfe71)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>

Conflicts:
Nathan - small comment delta
	include/media/v4l2-async.h
	include/media/v4l2-subdev.h

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I71720cd1ae4879dbcf2dd5d17cb82777b066584d
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528619
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 17:23:05 +08:00
Sakari Ailus
263be2ee48 UPSTREAM: [media] v4l: fwnode: Support generic fwnode for parsing standardised properties
The fwnode_handle is a more generic way than OF device_node to describe
firmware nodes. Instead of the OF API, use more generic fwnode API to
obtain the same information.

As the V4L2 fwnode support will be required by a small minority of e.g.
ACPI based systems (the same might actually go for OF), make this a module
instead of embedding it in the videodev module.

The origins of the V4L2 fwnode framework is in the V4L2 OF framework.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit ca50c197bd)

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Ie213acbb02b13281e7869816c326497d39ee470a
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528618
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:25:33 +08:00
Tuukka Toivonen
ef159a6697 UPSTREAM: [media] v4l2-async: failing functions shouldn't have side effects
v4l2-async had several functions doing some operations and then
not undoing the operations in a failure situation. For example,
v4l2_async_test_notify() moved a subdev into notifier's done list
even if registering the subdev (v4l2_device_register_subdev) failed.
If the subdev was allocated and v4l2_async_register_subdev() called
from the driver's probe() function, as usually, the probe()
function freed the allocated subdev and returned a failure.
Nevertheless, the subdev was still left into the notifier's done
list, causing an access to already freed memory when the notifier
was later unregistered.

A hand-edited call trace leaving freed subdevs into the notifier:

v4l2_async_register_notifier(notifier, asd)
cameradrv_probe
 sd = devm_kzalloc()
 v4l2_async_register_subdev(sd)
  v4l2_async_test_notify(notifier, sd, asd)
   list_move(sd, &notifier->done)
   v4l2_device_register_subdev(notifier->v4l2_dev, sd)
    cameradrv_registered(sd) -> fails
->v4l2_async_register_subdev returns failure
->cameradrv_probe returns failure
->devres frees the allocated sd
->sd was freed but it still remains in the notifier's list.

This patch fixes this and several other cases where a failing
function could leave nodes into a linked list while the caller
might free the node due to a failure.

Signed-off-by: Tuukka Toivonen <tuukka.toivonen@intel.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 47b037a051)
from media/v4.11-1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I2c719fd0338cc47ca05e838ff2dc2a3132ee3971
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528603
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:21:45 +08:00
Javi Merino
650da809b8 UPSTREAM: [media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay
In asds configured with V4L2_ASYNC_MATCH_OF, the v4l2 subdev can be
part of a devicetree overlay, for example:

&media_bridge {
	...
	my_port: port@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;
		ep: endpoint@0 {
			remote-endpoint = <&camera0>;
		};
	};
};

/ {
	fragment@0 {
		target = <&i2c0>;
		__overlay__ {
			my_cam {
				compatible = "foo,bar";
				port {
					camera0: endpoint {
						remote-endpoint = <&my_port>;
						...
					};
				};
			};
		};
	};
};

Each time the overlay is applied, its of_node pointer will be
different.  We are not interested in matching the pointer, what we
want to match is that the path is the one we are expecting.  Change to
use of_node_cmp() so that we continue matching after the overlay has
been removed and reapplied.

Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Javi Merino <javi.merino@kernel.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit d2180e0cf7)
from media/v4.11-1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I1b52741775f3bb011cd7b40d986c56c8c2a8cccd
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528602
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:21:33 +08:00
Markus Elfring
8f20cc44fc UPSTREAM: [media] v4l2-async: Use kmalloc_array() in v4l2_async_notifier_unregister()
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit f9e9c0669f)
from media/v4.11-1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I8e44b3a2a1eb8538fa05378cc28dab10fc734984
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528601
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:21:20 +08:00
Mauro Carvalho Chehab
120bedb20c UPSTREAM: [media] v4l2-flash-led-class: remove a now unused var
commit 079933dbcb ("[media] v4l: flash led class: Fix of_node release
in probe() error path") removed the need of an ancillary var at
the release function, as reported by smatch:

drivers/media/v4l2-core/v4l2-flash-led-class.c: In function 'v4l2_flash_release':
drivers/media/v4l2-core/v4l2-flash-led-class.c:678:23: warning: variable 'led_cdev' set but not used [-Wunused-but-set-variable]
  struct led_classdev *led_cdev;
                       ^~~~~~~~

Get rid of it.

Fixes: commit 079933dbcb ("[media] v4l: flash led class: Fix of_node release in probe() error path")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit bd676c0c04)
from media/v4.9-2

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Id2d0b84b2f0f5d91efa86c7a63c6b38dd97a1c58
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528599
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:13:01 +08:00
Sakari Ailus
e89ddc7d24 UPSTREAM: [media] v4l: flash led class: Fix of_node release in probe() error path
The sub-device's OF node was used (of_node_get()) if it was set, but
device's OF node was always put. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 079933dbcb)
from media/v4.9-2

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I4681980ea36e6a51e39f0c6f3223bf77bb0b5460
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528598
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:12:43 +08:00
Sakari Ailus
fd424e34f1 UPSTREAM: device property: Add fwnode_get_next_parent()
In order to differentiate the functionality between dropping a reference
to the node (or not) for the benefit of OF, introduce
fwnode_get_next_parent().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 233872585d)
from v4.12-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I3d80dff164c45b75a32f5e8e3152fb1f9757c716
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528616
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Sakari Ailus
5741287331 UPSTREAM: device property: Add support for fwnode endpoints
Similar to OF endpoints, endpoint type nodes can be also supported on
ACPI. In order to make it possible for drivers to ignore the matter,
add a type for fwnode_endpoint and a function to parse them.

On ACPI, find the child node index instead of relying on the "endpoint"
property.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 2bd5452d46)
from v4.12-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I4e052e5d3d0f3bc0950fb3a059eaa89ab12bd902
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528615
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Sakari Ailus
1d5f07751a UPSTREAM: device property: Make dev_fwnode() public
The function to obtain a fwnode related to a struct device is useful for
drivers that use the fwnode property API: it allows not being aware of the
underlying firmware implementation.
(cherry-pick from e44bb0cbdc)

Change-Id: I269d15f3ba302fed386b474190be8e9b13043952
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Sakari Ailus
1d546fb017 UPSTREAM: of: Add of_fwnode_handle() to convert device nodes to fwnode_handle
of_fwnode_handle() returns a struct fwnode_handle of the struct
device_node. This may be used on the fwnode property API.

Use a macro instead of a function in order to support const and non-const
arguments.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 67831837e0)
from v4.12-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Ifb36a667299f157e9f0b472bc2ea43c1a9779e34
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528613
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Sakari Ailus
796636e73c UPSTREAM: device property: Add fwnode_handle_get()
fwnode_handle_get() is used to obtain a reference to a fwnode_handle
container. In this case this is OF specific struct device_node.

This complements fwnode_handle_put() which is already implemented.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit e7887c2849)
from v4.12-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I571aa153e92e309f89a122627e468abda5ea7dfb
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528612
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Mika Westerberg
23702a85c5 UPSTREAM: device property: Add support for remote endpoints
This follows DT implementation of of_graph_* APIs but we call them
fwnode_graph_* instead. For DT nodes the existing of_graph_* implementation
will be used. For ACPI we use the new ACPI graph implementation instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 07bb80d40b)
from v4.12-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Id3c4c7c346841da525a8fa118af82d7ef9a6f8f6
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528611
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Jacob Chen
3e6f039fb5 ACPI / property: Add dummy function for remote endpoints
complete version:
79389a83bc

Change-Id: Ib6147e7ba2b426bc16253c27cdf8170a546f4ac5
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Mika Westerberg
f22086c9d9 UPSTREAM: device property: Add fwnode_get_named_child_node()
Since now we have means to enumerate all children of any fwnode even in
ACPI we can implement fwnode_get_named_child_node(). This is similar than
device_get_named_child_node() with the exception that it can be called to
any fwnode handle. Make device_get_named_child_node() call directly this
new function.

This is useful in cases where we need to be able to find child nodes which
are not direct descendants of the parent device.
(cherry-pick from 21ea73f54c)

Change-Id: I9a62aff7a9106fcf03b7ccfa67d2814fc3981350
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Mika Westerberg
fe98dc2c23 UPSTREAM: ACPI / property: Add fwnode_get_next_child_node()
The ACPI _DSD hierarchical data extension makes it possible to have
hierarchies deeper than one level in similar way than DT allows. These
"subsubnodes" have not been accessible because device property
implementation only provides device_get_next_child_node() that is limited
to direct descendants of a device.

We need this ability in order support things like remote endpoints
currently supported in DT with of_graph_* APIs.

Modify acpi_get_next_subnode() to accept fwnode handle instead and update
callers accordingly. Also add a new function fwnode_get_next_child_node()
that works directly with fwnodes and modify device_get_next_child_node() to
call it directly. While there add a macro fwnode_for_each_child_node()
analogous to the current device_for_each_child_node() but it works with
fwnodes instead of devices.

Link: http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.pdf
(cherry-pick from 34055190b1)

Change-Id: I25a0f7dbb49da7055f8ea0d4e658b4e0b3998882
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Mika Westerberg
107ca0960e UPSTREAM: device property: Add fwnode_get_parent()
Now that ACPI has support for returning parent firmware node for both types
of nodes we can expose this to others as well. This adds a new function
fwnode_get_parent() that can be used for DT and ACPI nodes to retrieve the
parent firmware node.
(cherry-pick from afaf26fd84)

Change-Id: I69470610108ac0f524eb30e856e8601a6201d9d8
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Jacob Chen
26d482a324 ACPI: add dummy acpi_node_get_parent to pass compile
Complete version in dfa672fbc0

Change-Id: I93f7a3fe299866295eb7a986e5e39cd8819772e0
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 15:05:39 +08:00
Heikki Krogerus
6619f538b3 UPSTREAM: device property: Avoid potential dereferences of invalid pointers
Since fwnode may hold ERR_PTR(-ENODEV) or it may be NULL,
the fwnode type checks is_of_node(), is_acpi_node() and is
is_pset_node() need to consider it. Using IS_ERR_OR_NULL()
to check it.

Fixes: 0d67e0fa16 (device property: fix for a case of use-after-free)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

(cherry picked from commit 0224a4a30b)
from v4.7-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I7784c41117c3fe0b4661bb08f0ef7b734a6c6780
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528596
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
4e7787caf9 UPSTREAM: device property: convert to use match_string() helper
The new helper returns index of the mathing string in an array.  We
would use it here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit a7c1d0a987)
from pci-v4.6-fixes

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Ia55a6aed7a652b03c7fcb115a1c836b11beaba9e
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528510
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Heikki Krogerus
78afe9af94 UPSTREAM: device property: fix for a case of use-after-free
In device_remove_property_set(), the secondary fwnode needs
to be cleared before the pset is freed. This fixes a
use-after-free when a property set is providing the primary
fwnode.

As a result of the fix, the primary fwnode may end up
containing ERR_PTR(-ENODEV), so also adding checks for it to
the property handling code.

Reported-by: John Youn <John.Youn@synopsys.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 0d67e0fa16)
from old/cs_d3f519301944

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: If34a2cb5283a59c523322354816d1eed42c3ea78
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528509
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Heikki Krogerus
11c64ba4c9 UPSTREAM: device property: fwnode->secondary may contain ERR_PTR(-ENODEV)
This fixes BUG triggered when fwnode->secondary is not NULL,
but has ERR_PTR(-ENODEV) instead.

BUG: unable to handle kernel paging request at ffffffffffffffed
IP: [<ffffffff81677b86>] __fwnode_property_read_string+0x26/0x160
PGD 200e067 PUD 2010067 PMD 0
Oops: 0000 [#1] SMP KASAN
Modules linked in: dwc3_pci(+) dwc3
CPU: 0 PID: 1138 Comm: modprobe Not tainted 4.5.0-rc5+ #61
task: ffff88015aaf5b00 ti: ffff88007b958000 task.ti: ffff88007b958000
RIP: 0010:[<ffffffff81677b86>]  [<ffffffff81677b86>] __fwnode_property_read_string+0x26/0x160
RSP: 0018:ffff88007b95eff8  EFLAGS: 00010246
RAX: fffffbfffffffffd RBX: ffffffffffffffed RCX: ffff88015999cd37
RDX: dffffc0000000000 RSI: ffffffff81e11bc0 RDI: ffffffffffffffed
RBP: ffff88007b95f020 R08: 0000000000000000 R09: 0000000000000000
R10: ffff88007b90f7cf R11: 0000000000000000 R12: ffff88007b95f0a0
R13: 00000000fffffffa R14: ffffffff81e11bc0 R15: ffff880159ea37a0
FS:  00007ff35f46c700(0000) GS:ffff88015b800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffffffffffed CR3: 000000007b8be000 CR4: 00000000001006f0
Stack:
 ffff88015999cd20 ffffffff81e11bc0 ffff88007b95f0a0 ffff88007b383dd8
 ffff880159ea37a0 ffff88007b95f048 ffffffff81677d03 ffff88007b952460
 ffffffff81e11bc0 ffff88007b95f0a0 ffff88007b95f070 ffffffff81677d40
Call Trace:
 [<ffffffff81677d03>] fwnode_property_read_string+0x43/0x50
 [<ffffffff81677d40>] device_property_read_string+0x30/0x40
...

Fixes: 362c0b3024 (device property: Fallback to secondary fwnode if primary misses the property)
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 7781203416)
from v4.5-11

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I4829ef466402a9b6cac8311bb1c4194792e02541
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528508
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
ad4e08fe32 UPSTREAM: device property: avoid allocations of 0 length
Arrays can not have zero elements by definition of the unified device
properties. If such property comes from outside we should not allow it to pass.
Otherwise memory allocation on 0 length will return non-NULL value, which we
currently don't check.

Prevent memory allocations of 0 length.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit f6740c1899)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I1e297ee59746f1a152600aeae096a807fcb6a868
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528507
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Heikki Krogerus
a25045c5e0 UPSTREAM: device property: the secondary fwnode needs to depend on the primary
This fixes NULL pointer dereference when the primary fwnode handle
does not exist, for example with PCI devices that do not have ACPI
companion.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 0fb5902f2f)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I7035834cb23e66e7bd470c01f599580e5444e3e8
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528506
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Mika Westerberg
490feb8e9b UPSTREAM: device property: Take a copy of the property set
It is convenient if the property set associated with the device secondary
firmware node is a copy of the original. This allows passing property set
from a stack for example for devices created dynamically. This also ties
the property set lifetime to the associated device.

Because of that we provide new function device_remove_property_set() that
is used to disassociate and release memory allocated for the property set.
(cherry-pick from 13141e1cb8)

Change-Id: Ia7e05b72726226628cc2a6bd910149d22c3f42f0
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
b5d67194cb UPSTREAM: device property: Fallback to secondary fwnode if primary misses the property
The struct fwnode has notion of secondary fwnode. This is supposed to used
as fallback if the primary firmware interface (DT, ACPI) does not have the
property in question.

However, the current implementation never checks the secondary node which
prevents one to add default "built-in" properties to devices.

This patch adds fallback to the secondary fwnode if the primary fwnode
returns that the property does not exists.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 362c0b3024)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Ibf7ec7252154b42a348967f30803b1e953cde756
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528504
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
fb0f1244f5 UPSTREAM: device property: improve readability of macros
There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 1d656fb757)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I72d7ad3b4f279e5b377d41f049e3d5743a7823e5
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528502
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
4e96a0d355 UPSTREAM: device property: keep single value inplace
We may save a lot of lines of code and space by keeping single values inside
the struct property_entry. Refactor the implementation to do so.
(cherry-pick from 66586baba5)

Change-Id: Ife4010518d3a89ac719cc2ba0ce9e497a30384fc
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
09a28924b4 UPSTREAM: device property: refactor built-in properties support
Instead of using the type and nval fields we will use length (in bytes) of the
value. The sanity check is done in the accessors.

The built-in property accessors are split in the same way such as device tree.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 318a197182)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Id671146dd6cc89641c4db6c0827ed4ea36ebe835
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528500
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
5c13bfba0d UPSTREAM: device property: rename helper functions
To be in align with the rest of fwnode types we rename the built-in property
set ones, i.e.
	is_pset() -> is_pset_node()
	to_pset() -> to_pset_node()

There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 61f5e294b8)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I347b1c0d83f95eee61a891d55f3b3ca0986d5b57
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528499
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:44:57 +08:00
Andy Shevchenko
a0882f43ab UPSTREAM: device property: always check for fwnode type
Currently the property accessors unconditionally fall back to built-in property
set as a last resort. Make this strict and return an error in case the type of
fwnode is unknown.

This is actually a follow up to the commit 4fa7508e9f (device property:
Return -ENXIO if there is no suitable FW interface).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit e3f9e299bf)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I0f1efb165051f65f945d46356097113dc0ac97de
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528498
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:44:22 +08:00
shengfei Xu
f99288a52e ARM: dts: rockchip: rk3126-evb: the display hardware need ldo6 not boot on
Change-Id: I43f837d4face1097c6560f311028367fb91825ce
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-30 14:42:52 +08:00
zah
470dbb09e6 i2c: Devices which have some i2c addr can work in same i2c bus
If i2c slave devices don't work at the same time, which have 
the same i2c addr, this patch can make them working.

Change-Id: I1bfb7783924b08bdc6e12bf47c2de01bdac7c2e2
Signed-off-by: Zhang aihui <zah@rock-chips.com>
2017-08-30 14:38:09 +08:00
Huibin Hong
04441e6f89 rk_fiq_debugger: set recv fifo trigger as on byte
Change-Id: Ib816f3f9cedab635c3b5a5fe59082c14a53b2fc6
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-30 14:36:19 +08:00
Huibin Hong
38457b014a ARM: rockchip_linux_defconfig: set default uart number 5
Many RK socs have 5 uarts, and they may be used at the same time.
CONFIG_SERIAL_8250_NR_UARTS=5
CONFIG_SERIAL_8250_RUNTIME_UARTS=5

Change-Id: I065d5e736a3bd687aff1a3f4db1b61c03bfa9fec
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-30 14:35:39 +08:00