Commit Graph

604822 Commits

Author SHA1 Message Date
Wu Liangqing
a0dd3dc616 drivers: rk_nand: rk vendor register default
Change-Id: I241230236d62ac76dec9961db298ebfce08765cd
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2017-12-01 10:20:49 +08:00
Zhang Zhijie
c58e8c45ef arm64: dts: rockchip: rk3328: add firmware and optee node
Add optee node to supply OP-TEE required properties.
/optee node is supposed to be below /firmware node.

Change-Id: I5a55a8e62c741726b9c5c7cf33ca832d3cbae86b
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-11-30 18:50:33 +08:00
Zhang Zhijie
67e46ec537 arm64: rockchip_defconfig: enable CONFIG_TEE and CONFIG_OPTEE
Change-Id: Ib299f9b5c07484b00e21e80166548f03a5a6f4a1
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-11-30 18:50:32 +08:00
William Wu
d629ced217 phy: rockchip-inno-usb2: don't power off phy if connect to usb charger
The usb2 phy driver will power off phy if it detects
usb connecting with usb charger. And then it schedule
a delayed work to check the connection state until the
usb disconnect from usb charger.

On rockchip platform, the usb2 controller utmi clk and
480MHz clk come from usb2 phy, so if we power off the
usb2 phy, the usb2 controller should not be accessed.

However, it's difficult to synchronize the phy state
between the usb2 phy driver and usb2 controller. We
find one synchronization problem in the following
case:

1. Test on rk312x platform;
2. Connect otg port with usb charger, then do suspend/
   resume stress test.
3. We will find the following error log, and then the
   usb controller work abnormally.

   dwc2 10180000.usb: resuming usb gadget configfs-gadget
   dwc2 10180000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001

This because in dwc2 driver, it will do dwc2 core reset
during resume, although it also power on usb2 phy before
do core reset, but the otg_sm_work in the usb2 phy driver
may power off the usb2 phy again asynchronously, this will
cause dwc2 core reset failure.

So we should not power off the usb2 phy if connect to
usb charger, this patch will increase the usb2 phy power
consumption in runtime, but it don't affect the power
consumption in system standby mode, because the usb
controller can power off phy by itself during suspend.

Change-Id: I3b05c06988b7939ebf949ced34b9a6bb37ffa42a
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-11-30 15:40:41 +08:00
Putin Lee
1dd341f123 video/rockchip: rga: Fixup dst offset calculation method
Change-Id: Ib849bcd2055fa0e11aa0b2caef3138fb2055f1d3
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2017-11-30 15:10:27 +08:00
Xinhuang Li
dcbce81779 arm64: dts: rk3328-evb-android: add new remote control key code
Change-Id: Id50215a6fee72d1adbe40c67ccfe19ab04ffe251
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-30 15:06:21 +08:00
Xing Zheng
082904a103 ARM: dts: rockchip: re-configure rk3288-evb-rk1608 board
The rk3288-evb-rk1608 board doesn't share with rk3288-evb, so we
need to separate a new indepentent type of rk3288-evb-rk1608 board.

For now, these primary features have been confirmed on rk3288-evb-rk1608
board:
- The power supply for RK1608 by syr827 via i2c4
- EMMC
- MIPI LCD display
- USB HOST
- GMAC RMII
- WLAN(AP6335)
- TF CARD

Change-Id: Iee2e237027d541498ecf4d893ad6416ebc0d5c02
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2017-11-30 14:56:40 +08:00
Xinhuang Li
d08f1b3908 arm64: dts: rockchip: rk3328: rename rksdmmc to dwmmc
Change-Id: Ie70356eeff9c0064a7d1ef7b2d5dd092ee206ac5
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-30 14:32:24 +08:00
Andy Yan
e0836121b6 arm64: dts: rockchip: add cpuinfo dt node for rk3399-android-6.0
Add cpuinfo dt node for android-6.0 on rk3399 platform.
Sync from rk3399-android.dtsi

Change-Id: I18dd17ac1b78d59932f40a0796faafe942fa389d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-30 14:09:48 +08:00
Sandy Huang
deeb0dbf80 drm/rockchip: vop: add support rk3399 win lite csc function
Change-Id: I1819405efea275c3d50d29b139bb20f0c6722aea
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-30 14:06:08 +08:00
Zhang Zhijie
0aea51cd79 OP-TEE: keep compitable with new version driver
1.Rename some functions to fix multiple definition compile error.
2.Build optee_linuxdriver when TEE_SUPPORT is enabled.
3.Rename "optee" obj name to "optee_v1" to fix module name conflict error:

[    0.211629] sysfs: cannot create duplicate filename '/module/optee/version'
[    0.211670] ------------[ cut here ]------------
[    0.211684] WARNING: at fs/sysfs/dir.c:31
[    0.211697] Modules linked in:
[    0.211713]
[    0.211726] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 4.4.93 #42
[    0.211738] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[    0.211752] task: ffffffc0f2160000 task.stack: ffffffc0f2168000
[    0.211772] PC is at sysfs_warn_dup+0x60/0x7c
[    0.211785] LR is at sysfs_warn_dup+0x60/0x7c

Change-Id: I9cc98307a32d9b186f7aac86027da231b486c487
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-11-30 11:21:37 +08:00
Alex Zhao
60b3b75a43 net: wireless: rockchip_wlan: update rtl8188eu
update wifi driver to v5.2.2.3_24783.20171030

Change-Id: I6fb8d8791ecdd7a51349a7696b98942dfdcd29f7
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-11-29 17:30:35 +08:00
Chris Zhong
ac042485f4 net: wireless: rockchip_wlan: fix compile warning
fix this compile warning:
drivers/net/wireless/rockchip_wlan/rtl8189fs/core/rtw_p2p.c:3518:31:
warning: comparison of constant ‘3’ with boolean expression is alwa
false [-Wbool-compare] error, forbidden warning: rtw_p2p.c:3518

Change-Id: Ic900425434f3ae0069237bbe6d3cb8242e31ed0f
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-11-29 11:47:45 +08:00
Caesar Wang
894c1f0e8c ARM: dts: rockchip: add the needed power domain node on rk3036
As the vpu needed handle the power domain for reset function, this patch
supported the vpu domain for rk3036 Socs.

Change-Id: I67ad6085e2eb9a213c364d58713f02cc78ce6849
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-29 11:45:56 +08:00
Caesar Wang
1f232f6bb2 soc/rockchip: support the power domains for rk3036 SoCs
The rk3036 SoCs have some domains with NOC idle function, but it can't
turn the power domain off. This patch supports it to handle some devices
for needing.

Change-Id: I515f2cea07f1af1777bb877a5f396fd21caba3ad
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-29 11:45:39 +08:00
Caesar Wang
9c51095c78 dt/bindings: rockchip: add the power domains for rk3036 SoCs
This patch add the binding documentation for power domains found on
Rockchip rk3036 SoCs.

Change-Id: I45ff200e4d891724633fe97bdc349faad82a2984
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-29 11:44:50 +08:00
Wyon Bi
f808d024c7 arm64: dts: rockchip: rk3368-xikp: Update display clock frequency for panel
Target pixel clock rate for refresh rate @60 Hz
	= 1341 * 1981 * 60 = 159391260 Hz ~ 159 MHz

Change-Id: Ia018ad3c1a34c48e676f9b63b06e7a2f1cb658f2
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-11-29 11:31:52 +08:00
Liang Chen
d0e827fc24 ARM: dts: rk312x: pinctrl pullup UART1 RX pin
UART RX pin need pullup to keep high voltage when bus is idle.

Change-Id: Iaeea6535bfc42d3ffec396798778cf8803cf3e90
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-29 11:12:40 +08:00
Hu Kejun
2f261ad2a4 media: soc_camera: add nt99230 and change parameter of soc_cfg->soc_cfg
Change-Id: Ie82c80483e918dafb3fe5237d20813a514374798
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2017-11-29 09:35:29 +08:00
zain wang
a42f179e65 ALSA: usb-audio: Add SNDRV_PCM_TRIGGER_SUSPEND/RESUME to trigger functions
Missing SNDRV_PCM_TRIGGER_SUSPEND/RESUME, usb-audio can not enter suspend
since pcm was always running.

Change-Id: I0f7be7345f2b5c1bd42dad4c6fc4647c8636eed8
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-11-28 17:32:12 +08:00
Shawn Lin
34fec92792 UPSTREAM: soc: rockchip: disable jtag switching for RK3328 Soc
Disable IO function switching between sdmmc and jtag
for RK3328 Soc.

Change-Id: Ic8f4494b11e1091fa7a4d71674940d3c8fd5b1ad
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 887758c325)
2017-11-28 17:31:40 +08:00
Heiko Stuebner
81ec76caaf UPSTREAM: soc: rockchip: add driver handling grf setup
The General Register Files are an area of registers containing a lot
of single-bit settings for numerous components as well full components
like usbphy control. Therefore all used components are accessed
via the syscon provided by the grf nodes or from the sub-devices
created through the simple-mfd created from the grf node.

Some settings are not used by anything but will need to be set up
according to expectations on the kernel side.

Best example is the force_jtag setting, which defaults to on and
results in the soc switching the pin-outputs between jtag and sdmmc
automatically depending on the card-detect status. This conflicts
heavily with how the dw_mmc driver expects to do its work and also
with the clock-controller, which has most likely deactivated the
jtag clock due to it being unused.

So far the handling of this setting was living in the mach-rockchip
code for the arm32-based rk3288 but that of course doesn't work
for arm64 socs and would also look ugly for further arm32 socs.

Also always disabling this setting is quite specific to linux and
its subsystems, other operating systems might prefer other settings,
so that the bootloader cannot really set a sane default for all.

So introduce a top-level driver for the grf that handles these
settings that need to be a certain way but nobody cares about.

Other needed settings might surface in the future and can then
be added here, but only as a last option. Ideally general GRF
settings should be handled in the driver needing them.

Conflicts:
	drivers/soc/rockchip/Kconfig
	drivers/soc/rockchip/Makefile

Change-Id: I6c7202f8e6c51898f25ffd0775c7c2d2f456d80e
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 4c58063d42)
2017-11-28 17:31:35 +08:00
Liang Chen
a714d54f27 ARM: dts: rk312x-android: enable fiq mode
Change-Id: Idc400661beb11ba5198add30236f4365038859c9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-28 17:31:06 +08:00
Wu Liangqing
f3a3899ec9 ARM: dts: rk312x: add gpu frequency 480Mhz
Change-Id: Ie2c7ff75524de5978676ac4f02ba359210e92eab
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2017-11-28 17:30:34 +08:00
Joseph Chen
1dfc515d7e ARM: dts: rk3066a-rayeager: add vdd_logic regulator
The vdd_logic is a pwm regulator. Since '#pwm-cells = <2>', there
is not polarity invert support by pwm driver, so we have to add
property 'pwm-dutycycle-range = <100 0>' to support polarity invert
by pwm regulator driver itself.

Change-Id: Ie5d2cda67ce19dc792f96263836bab658d385681
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-28 14:32:54 +08:00
Zhang Yunlong
0012af6f03 camera: rockchip: cif: use dmabuf in oneframe mode
Change-Id: Ic0acd28f569ce8f4b74ec2c60fe74fd998891464
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2017-11-28 14:32:20 +08:00
Jacob Chen
52e4502303 media: i2c: tc35874x: add link freq control
before we get it from dts, but now it must be get from driver

Change-Id: I911f02a1c4d6618c539aceb06d485b58eb4906cd
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-28 14:30:18 +08:00
Jacob Chen
c10f2c465a media: i2c: imx219: add some controls for 3A
Change-Id: I2157b98f9c00e303dd50470247ca794381db727e
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-28 14:30:07 +08:00
Meng Dongyang
76a28bb1b9 phy: rockchip-inno-usb2: turn off differential receiver in suspend mode
Turn off differential receiver in suspend mode to save power

Change-Id: Idd9b4c2d7d9d78915c94946ced99737683a2ce91
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-11-28 14:29:39 +08:00
Zheng Yang
c928aff3d8 drm: introduce HLG EOTF
CTA-861-G defined Hybrid Log-Gamma (HLG) based on ITU-R
BT.2100-0.

Change-Id: Ieb18284265529ee8d76b250d8bb5b3752425814a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-28 14:23:54 +08:00
Finley Xiao
460c258da9 arm64: dts: rockchip: rk3368-xikp: Enable dmc and dfi
Change-Id: Ic839a159b225b06dbb300268a6cd0a66fd9d83a9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-28 14:14:30 +08:00
Finley Xiao
550c44033a arm64: dts: rockchip: rk3368: Add 240MHz for dmc
Change-Id: I7f52bc136cd36177bba3a15febe8fbf03bb9c97c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-28 14:13:04 +08:00
Dalon.zhang
0a894cc356 arm64: dts: rk3399-sapphire-excavator-linux: support ov4689&ov13850
Change-Id: Iadcfa66afb1de8c949dc453fdafc980975d1a4f3
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2017-11-28 14:09:15 +08:00
Mark Yao
44c576cb5d clk: rockchip: rk3066a: make hclk_vio_bus critical
Vop register access request hclk_vio_bus.

Change-Id: I94363252c595f248c1543c8484ccb071c51dcfda
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-28 12:00:29 +08:00
Yankun Zheng
391bf3832d ARM: dts: rockchip: rk3229-at-som.dtsi: add spi dev for user space
Change-Id: If552c8f07f43cc3e173c73687c0ff7d2ee6e946f
Signed-off-by: Yankun Zheng <zyk@rock-chips.com>
2017-11-27 20:52:32 +08:00
Binyuan Lan
a12aa9ef01 ARM: dts: rockchip: rk3126-bnd-d708: correct hp-ctl ACTIVE level
Change-Id: I9d1ecc2282261841f56d5d07a7c7e58fe39623d8
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2017-11-27 19:44:42 +08:00
Dalon.zhang
f2dc59cc0c ARM: dts: rockchip: add cif node for rk3288
Change-Id: Ia7e779b914991694fb1e4f20bf90477f38a5f997
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2017-11-27 19:37:38 +08:00
Finley Xiao
5207deac47 clk: rockchip: rk3288: Add ids for pclk_vip_in and pclk_vip
Change-Id: Id7c4b9a69ca22ae5eaee75929adb5ec0c1f0165c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-27 19:36:28 +08:00
Dalon.zhang
38c93fe590 clk: rockchip: rk3288: add PCLK_VIP and PCLK_VIP_IN
Change-Id: I51357dc00c842c7ecb49b13580e59f33d87d21b8
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2017-11-27 19:36:16 +08:00
wennuan
66cb0ec2bc ARM: dts: rockchip: add a new dts file for RK_EVB_RK1608
Add this a dts-file for the RK_EVB_RK1608 board,the new dts modified
on the basis of the original rk3288-evb-act8846.dts file.The screen
light and touch are added,and the edp and hdmi interface are closed.

Change-Id:  I6895641ad6baa84b826587ca7bae275171bb6d08
Signed-off-by: Nuan Wen <leo.wen@rock-chips.com>
2017-11-27 19:35:02 +08:00
Jianqun Xu
7fb197a5cf ARM: dts: rockchip: rk312x fix to SCLK_CIF_OUT for cif out clk
Change-Id: Id78693129890ddff151753229681b00b911859c9
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-11-27 16:37:19 +08:00
Shunqing Chen
0250b83f98 power: rk818: add power_supply property for CTS.
Android8.0 CTS needs to get max charging current,
max charging voltage and battery charge counter.

Change-Id: Ia0e6589e92f24ece179299040336e050b21258b1
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2017-11-27 14:41:40 +08:00
Hu Kejun
a3c79584a4 media: rk-isp10: support isp0 and isp1 run at the same time
1. support isp0 and isp1 run at the same time;
2. support VIDIOC_G_INPUT command;
3. support VIDIOC_G_PARM command;
4. support VIDIOC_G_PARM command;
5. add pix.bytesperline and pix.sizeimage in VIDIOC_G_FMT command;

Change-Id: I6d0347350a0bef372ee2e01c508b2fb581ea7cfc
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2017-11-27 14:17:45 +08:00
Tomasz Figa
80072db056 FROMLIST: media: v4l2-fwnode: Check subdev count after checking port
Current implementation of __v4l2_async_notifier_parse_fwnode_endpoints()
checks first whether subdev_count >= subdev_max and only then whether
the port being parsed matches the given port index. This triggers an
error in otherwise valid cases of skipping ports that do not match.

Fix this by moving the check below the port index check.

Fixes: 9ca4653121 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device")
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(am from https://patchwork.linuxtv.org/patch/45462/)

BUG=b:36227021
TEST=WiP Rockchip ISP driver probes without errors on Scarlet

Change-Id: Ie4d160af21d5dedde7e73e3f1a0819a0d5d4f340
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
255a3eb2b7 FROMLIST: v4l: async: Add a convenience function for registering sensors
Add a convenience function for parsing firmware for information on related
devices using v4l2_async_notifier_parse_fwnode_sensor_common() registering
the notifier and finally the async sub-device itself.

This should be useful for sensor drivers that do not have device specific
requirements related to firmware information parsing or the async
framework.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
(cherry picked from commit dd202f9d5346cacd785a482952f54b205eafcc64)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

Conflicts:
	include/media/v4l2-subdev.h
(convert to older documentation style)

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: Ia4af50d7204173d17d04faf9575f6605a1400e46
Reviewed-on: https://chromium-review.googlesource.com/693700
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
7c4d65f119 FROMLIST: v4l: fwnode: Add convenience function for parsing common external refs
Add v4l2_fwnode_parse_reference_sensor_common for parsing common
sensor properties that refer to adjacent devices such as flash or lens
driver chips.

As this is an association only, there's little a regular driver needs to
know about these devices as such.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
(cherry picked from commit 547be5f2082a4b5d148f8f4ddd8672c91ef52da9)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I3440987cb1ed89819dc54c9d47f7bd4e27ef3203
Reviewed-on: https://chromium-review.googlesource.com/693699
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
4cea4776cc FROMLIST: v4l: fwnode: Add a helper function to obtain device / integer references
v4l2_fwnode_reference_parse_int_prop() will find an fwnode such that under
the device's own fwnode, it will follow child fwnodes with the given
property-value pair and return the resulting fwnode.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
(cherry picked from commit 804b867e30fe9855d9d7810a363a2b8388c2a9aa)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I18727c371e64be7e0a3cfa5da4e23274187c0b5a
Reviewed-on: https://chromium-review.googlesource.com/693698
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
d2209ebe4e FROMLIST: v4l: fwnode: Add a helper function for parsing generic references
Add function v4l2_fwnode_reference_parse() for parsing them as async
sub-devices. This can be done on e.g. flash or lens async sub-devices that
are not part of but are associated with a sensor.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
(cherry picked from commit ba63cd710bba4c3d9f2379d4af62412b2e4bd4c7)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I9f84287faf59c8215d010f83671985fb66e02181
Reviewed-on: https://chromium-review.googlesource.com/693697
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
ffa51fe4c7 FROMLIST: v4l: async: Ensure only unique fwnodes are registered to notifiers
While registering a notifier, check that each newly added fwnode is
unique, and return an error if it is not. Also check that a newly added
notifier does not have the same fwnodes twice.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
(cherry picked from commit cbd39508810ec530137a0c631d16e8a772d315b8)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I02fe494594780d57a7bd536d4132ed633069351c
Reviewed-on: https://chromium-review.googlesource.com/693696
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
276604c3b9 FROMLIST: v4l: async: Allow binding notifiers to sub-devices
Registering a notifier has required the knowledge of struct v4l2_device
for the reason that sub-devices generally are registered to the
v4l2_device (as well as the media device, also available through
v4l2_device).

This information is not available for sub-device drivers at probe time.

What this patch does is that it allows registering notifiers without
having v4l2_device around. Instead the sub-device pointer is stored in the
notifier. Once the sub-device of the driver that registered the notifier
is registered, the notifier will gain the knowledge of the v4l2_device,
and the binding of async sub-devices from the sub-device driver's notifier
may proceed.

The root notifier's complete callback is only called when all sub-device
notifiers are completed.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
(cherry picked from commit 6527ddc572c6fe60808ed0ee690158498cb50439)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I4e95e7f72f00a8f88786a26b73fc5ef22d4e4261
Reviewed-on: https://chromium-review.googlesource.com/693695
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00