Commit Graph

854271 Commits

Author SHA1 Message Date
Ren Jianing
3a4f755124 ARM: dts: rockchip: add vup_gpios in u2phy0 for rv11xx-ai-cam
The USB2.0 OTG PHY of RV1126/1109 which is designed for lower power
consumption provides only 8.8mA current source on DM. Multiplied
by 45 Ohm host termination resistance, voltage is about 400mV.
If the threshold voltage of host is greater than 400mV, the high
speed handshake will fail and SoC communicate at full speed. So
swing calibration is necessary.

We use gpio to control the 220 Ohm pull-up resistor to provide additional
current. Experiments show that the voltage of chirpK can be increases
to about 600mV.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I387ae1840959540ff9ca22db26896def0e890619
2020-06-24 19:26:40 +08:00
Ren Jianing
ef65767d42 ARM: dts: rockchip: change dr_mode to peripheral for rv11xx-ai-cam
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ieedc7480173ff9c1d575643d1dea2f09e5528945
2020-06-24 19:26:21 +08:00
Jianing Ren
a35ff85301 phy: phy-rockchip-naneng-usb2: enable id irq when vbus always on
This patch will enable id interrupt for otg port when the property
vbus-always-on is set in dts.

If vbus is always on, bvalid interrupt won't make sense and be
disabled. But we cat change id state to switch drd mode by software.

Change-Id: I69fc3f00430dfd73835c6e99694d8d7c72c60c8c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-24 18:59:01 +08:00
Jianing Ren
d65989c056 phy: phy-rockchip-naneng-usb2: add low power function for rv1126
By bypass charge detect module, about 140uA current can be saved
on USB_AVDD_1V8 power supply when suspend. Notice that bandgap
current can not be turned off, so there is still about 165uA
current.

This patch also remove the tuning in phy resuming, because the power
of phy is always on and registers does not need to be configured
again.

Change-Id: If13d3741e3b01289c1bd0294d6e6d88278c4654c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-24 18:59:01 +08:00
Jianing Ren
65b48186c4 phy: phy-rockchip-naneng-usb2: cancel the dynamic management of clks
This patch remove the clks manegement in phy operations and keep the
clks always on. Keep the clks on can avoid many errors such as USB480M
clk abnormal output and EHCI controller error.

Change-Id: If201106d432d05e8fc5f63d595a67524e2183b5c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-24 18:59:01 +08:00
Andy Yan
bc592f16c7 drm/rockchip: rv1126: Fix vop version number
According to VOP_VERSION register on rv1126, the
major is 0x2, minor is 0x0b.

Change-Id: Ie8f3a91d839bcd042a655881302e9b43f6f297d5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-24 14:49:51 +08:00
Wu Liangqing
015331f133 arm64: dts: rockchip: add px30-evb-ddr3-v11 board
Change-Id: I5aec5cb43ad000bc51b79ff26c9ac0f018855aaa
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-24 11:42:06 +08:00
Ding Wei
d5819f757d ARM: dts: rockchip: rk3288 add clk-rates setting for vdpu and rkvdec
Change-Id: Ibd695ef470c40829a348c660dd94de3f6a2b320c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-24 11:33:19 +08:00
Ding Wei
e21d349ac8 arm64: dts: rockchip: rk3368 add clk-rates setting for vdpu and rkvdec
Change-Id: Ibe2411fc99892981bb6c1af16187f646aa018a1e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-24 11:32:46 +08:00
Ding Wei
bcdfd733fa video: rockchip: mpp: clock relative code refactoring
1. read clock setting using the common code from dtsi.
2. clock enable/disable, all devices using the same function.
3. clock frequency set to two levels: normal and advanced.
4. according to specific requirements, the frequency is set
   level instead of the value.

Change-Id: Idcf8e0f49987df20f3eb2574aff316e507f82cfe
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-24 11:28:56 +08:00
Ding Wei
08c8b2fbdd video: rockchip: mpp: rename functions in mpp_hw_ops
mpp_hw_ops->power_on -> mpp_hw_ops->clk_on
mpp_hw_ops->power_off -> mpp_hw_ops->clk_off

Change-Id: I65a5eb27a4a65512caa7bc184b63e6ae43e98043
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-24 09:21:39 +08:00
Ding Wei
50d39fff2e video: rockchip: mpp: remove parameter session_max_buffer_debug
Change-Id: Id5bf9912a454684f0074e8d42d7005351c95c7c7
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-24 09:09:25 +08:00
Ding Wei
7c8b4804d6 video: rockchip: mpp: adjust the scope of debugfs relative code
Change-Id: Ief1bbbfc3712c38f9cf3e2468db0eb8fc5410d3f
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-24 09:08:57 +08:00
shengfei Xu
3915fb8f88 mfd: rk808: update rk817 volatile reg range
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ifeb89255a2e98d4d2af92b83726017c2f75ebc92
2020-06-24 09:03:15 +08:00
shengfei Xu
ceffd1ad98 mfd: rk808: modify the sequence of the sleep pin function and polarity
The sequence of operations is as follows:
1. disable the sleep pin function
2. modify the sleep pin polarity
3. delay 3 32k clock cycle
4. select the sleep pin function

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: If6df2b2f190951abe9bb31fbd18d9af47e145038
2020-06-24 09:03:15 +08:00
Wu Liangqing
26de57fe61 arm64: dts: rk3368a-817-tablet: adaptive bnd board
Change-Id: I46ae95deff7308fd2a386aa20558563c45eff6b6
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-24 08:59:46 +08:00
Simon Xue
a4318b7d29 iommu: rockchip: Add support iommu v2
Change-Id: I82dcbf5b9d24bd82d6127558c264226b32e7a7bd
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-06-23 16:22:35 +08:00
Elaine Zhang
1963c05e82 ARM: dts: rv1126: add otp info for tsadc
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ie9be2e9dad96cc96543cd94e5eb1c8a3b83e6e0a
2020-06-23 15:38:08 +08:00
Elaine Zhang
bc48adbe38 thermal: rockchip: add tsadc calibration for rv1126 soc
Get the calibration parameters for each chip by reading the OTP,
Calculate temperature using calibration parameters.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I05cfb65ae95dcefc7fc52ed91326c7da9d27de55
2020-06-23 15:38:08 +08:00
Wu Liangqing
f8aefe8f0d arm64: dts: rockchip: Add rk3368a tablet dts
rk3368a-817-tablet-bnd
rk3368a-817-tablet

Change-Id: I04f44360c98e2f3bcca99c56f16ebf4ee5b841e8
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-23 15:05:29 +08:00
Wyon Bi
c105f787c1 arm64: dts: rockchip: rk3399-android: Add default port link for dsi
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ib6ed042666910f62c75e9a1ab76fff0001753b88
2020-06-23 14:49:38 +08:00
Wyon Bi
e555855b35 arm64: dts: rockchip: px30-android: Add default port link for dsi
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ie46aa51fe07443bdd3c0414fccb3406cbb2aabd7
2020-06-23 14:49:38 +08:00
Wyon Bi
c1af8c024e arm64: dts: rockchip: Remove unused rk3326-w7 board dts
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I1a95c8ed23d23275f5a6ea3cb707725429fab85d
2020-06-23 14:49:38 +08:00
Wyon Bi
6ff2906201 ARM: dts: rockchip: rk3288-android: Add default port link for dsi
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I2b652f0a3661e155bc4aaebee872c9572e536627
2020-06-23 14:49:38 +08:00
Wyon Bi
81f597fb5c ARM: dts: rockchip: rk312x-android: Add default port link for dsi
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I545a966ed887ae1cfb08f90eaceca749f34c1bf2
2020-06-23 14:49:38 +08:00
Shunhua Lan
7ba9790a40 ASoC: rockchip: rk817-codec: add route config for L to ClassD and R to HPR
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ie3ebf144d622a2219716221bae6db616ea9a7aa2
2020-06-23 14:45:53 +08:00
Algea Cao
4132c41827 arm64: rockchip_defconfig: enable rk1000
add mfd rk1000-core and drm bridge rk1000-tve.

Change-Id: I0c030f2f90eab1242af44c39bea1af7a1870f3fe
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-06-22 19:15:50 +08:00
Algea Cao
ef52649124 drm/bridge: support rk1000 tv encoder
RK1000 is a digital-analog mixed chip which has tve output function.
RK1000's registers can be written and read through I2C interaface.
Because RK1000's I2C need dclk and mclk, RK1000 TVE should be registered
after RK1000 CORE.

Change-Id: I65b40826bd1dbf07d4fa94ecdf8c75005008731f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-06-22 19:11:37 +08:00
William Wu
69c4c922be ARM: configs: disable UAC1 UAC2 UVC and RNDIS for rv1126-evb-ddr3-v10-tb.config
This patch disable USB Gadget functions UAC1/UAC2/UVC/RNDIS,
and only support F_FS for ADB.

Change-Id: If04bb18f9c620299dde4b2452e418e63badeec12
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-22 18:52:44 +08:00
Tao Huang
ddf1750043 soc: rockchip: thunderboot_mmc: Probe driver early
By create device early.

Change-Id: I80d574d9d0d196cf6fbd4dcce9f595b6cc230606
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-22 18:48:26 +08:00
Tao Huang
a6c9add575 soc: rockchip: decompress: Probe driver early
By create device early.

Change-Id: Id9071bf5f988958b1604a5066f7b99e67abc0675
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-22 18:48:26 +08:00
Tao Huang
ab3221eae8 nvmem: core: Call nvmem_init() early when CONFIG_ROCKCHIP_THUNDER_BOOT=y
rockchip_otp_module_init() depends on nvmem_init() to init nvmem_bus_type.
But rockchip_otp_module_init() and nvmem_init() are both in the same
subsys_initcall level.

Change-Id: I58bc66519fb76179be3e6a170048a67c0861b224
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-22 18:48:26 +08:00
Wyon Bi
1b0ad3ab86 arm64: dts: rockchip: rk3368-android: Add default port link for dsi
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I72109bc00c177318eff94212363566902020cec1
2020-06-22 17:19:51 +08:00
Yifeng Zhao
93979fb7e0 soc: rockchip: mtd_vendor_storage: fix issue data structure not align to 4KB
The size of vendor_info need align to 4KB and compatible with uboot.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I16ae2cf5c976032e944bfb590d38ec89831f9b2f
2020-06-22 16:02:43 +08:00
Cai YiWei
df4424d974 media: rockchip: isp: fix dmarx iommu error
dmarx isr is unreliable, using MI frame end to replace it

Change-Id: Iabb4f405aedf3e81995d009ce2f4bddce2d12ed3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-06-22 16:01:51 +08:00
Finley Xiao
6d419c0c10 video: rockchip: mpp: rkvenc: register cooling device
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6d802a97abe35d94039471161466868bfdf0d113
2020-06-22 14:32:55 +08:00
Nickey Yang
abb2f8fc45 media: i2c: os04a10: fix power on sequence
1.The reset signal is directly controlled by GPIO,
so there is no need to wait for the delay of RC circuit

2.Correct the level setting of reset signal

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I808a7ba13f23f630d1ab9d11c54cb33a1e85123c
2020-06-22 14:08:02 +08:00
Tao Huang
6e63958128 Input: sensor-dev - Fix warning
drivers/input/sensors/sensor-dev.c:1600:5: warning:
no previous prototype for 'sensor_probe' [-Wmissing-prototypes]

drivers/input/sensors/sensor-dev.c:1854:3: warning:
this statement may fall through [-Wimplicit-fallthrough=]

drivers/input/sensors/sensor-dev.c:1857 sensor_probe() warn:
missing break? reassigning 'sensor->input_dev->name'

drivers/input/sensors/sensor-dev.c:1602:30: warning:
Value stored to 'sensor' during its initialization is never read

drivers/input/sensors/sensor-dev.c:504:3: warning:
Value stored to 'result' is never read

Unneeded variable: "result". Return "0" on line 893
Unneeded variable: "result". Return "0" on line 908

Fixes: a32d316fcc ("driver: sensors: improve sensor driver to pass android vts test")
Change-Id: I95bdc5373694e0a78f9a29583a3138e14eae6126
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-19 21:44:51 +08:00
Tao Huang
a392d416cc MALI: rockchip: Fix make distclean
make distclean
scripts/Makefile.clean:15: drivers/gpu/arm/midgard_for_linux/Makefile:
No such file or directory

Fixes: 25bb952677 ("MALI: rockchip: remove drivers/gpu/arm/midgard_for_linux/")
Change-Id: Ia47e2581d9679f3bcca809ad4506b61068e1710d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-19 21:41:20 +08:00
Cai YiWei
51f1725a15 media: rockchip: isp: support lvds interface
Change-Id: I36e8c8eecd590e1862d0d6fa7dbd5f1091567020
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-06-19 20:03:45 +08:00
Hans de Goede
c01c6215ad UPSTREAM: usb: typec: fusb302: 2 small misc. fixes
Fix a copy and paste error in an error message and a spelling error
in a comment.

Change-Id: Iedd73b96b75da80a507e6ee7ef0bbb87e5f672d5
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 7511c9a9d3)
2020-06-19 20:00:50 +08:00
Hans de Goede
be3232364c UPSTREAM: usb: typec: fusb302: Fix fusb302_handle_togdone_src Ra handling
The FUSB302 will stop toggling with a FUSB_REG_STATUS1A_TOGSS_SRC? status,
as soon as it sees either Ra or Rd on a CC pin.

Before this commit fusb302_handle_togdone_src would assume that the toggle-
engine always stopped at the CC pin indicating the polarity, IOW it assumed
that it stopped at the pin connected to Rd. It did check the CC-status of
that pin, but it did not expect to get a CC-status of Ra and therefore
treated this as CC-open. This lead to the following 2 problems:

1) If a powered cable/adapter gets plugged in with Ra on CC1 and Rd on CC2
then 4 of 5 times when plugged in toggling will stop with a togdone_result
of FUSB_REG_STATUS1A_TOGSS_SRC1.  3/5th of the time the toggle-engine is
testing for being connected as a sink and after that it tests 1/5th of the
time for connected as a src through CC1 before finally testing the last
1/5th of the time for being a src connected through CC2.

This was a problem because we would only check the CC pin status for the
pin on which the toggling stopped which in this polarity 4 out of 5
times would be the Ra pin. The code before this commit would treat Ra as
CC-open and then restart toggling. Once toggling is restarted we are
guaranteed to end with FUSB_REG_STATUS1A_TOGSS_SRC1 as CC1 is tested first,
leading to a CC-status of Ra again and an infinite restart toggling loop.
So 4 out of 5 times when plugged in in this polarity a powered adapter
will not work.

2) Even if we happen to have the right polarity or 1/5th of the time in
the polarity with problem 1), we would report the non Rd pin as CC-open
rather then as Ra, resulting in the tcpm.c code not enabling Vconn which
is a problem for some adapters.

This commit fixes this by getting the CC-status of *both* pins and then
determining the polarity based on that, rather then on where the toggling
stopped.

Change-Id: I533585441147cdc869381f96bcdfa05a5f451f8a
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 702ad49fb8)
2020-06-19 20:00:50 +08:00
Hans de Goede
0ca55809b6 UPSTREAM: usb: typec: fusb302: Make fusb302_set_cc_polarity also set pull ups / downs
The 2 callers of fusb302_set_cc_polarity both call fusb302_set_cc_pull
directly before calling fusb302_set_cc_polarity, this is not ideal for
2 reasons:

1) fusb302_set_cc_pull uses the cached polarity when applying the pull-ups,
which maybe changed immediately afterwards, to fix this set_cc_polarity
already does the pull-up setting.

2) Both touch the SWITCHES0 register in a r-w-modify cycle, this leads to
read reg, write reg, read reg, write reg. If we fold the setting of
the pull-downs into fusb302_set_cc_polarity then not only can we avoid
doing the reads / writes twice, at this point we set all bits, so we
can skip the read, turning 4 (slowish) i2c-transfers into 1.

Doing this also avoids the need to cache the pull_up state in
struct fusb302_chip.

Change-Id: I1e3687063ba4d1f8c321bf99cc2464c92300344a
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 31df7fadf5)
2020-06-19 20:00:50 +08:00
Stephen Boyd
976f712726 UPSTREAM: usb: typec: Fix copy/paste on typec_set_vconn_role() kerneldoc
This must have been copy pasted from the function above. Fix it.

Change-Id: I34f701e5c8347a9fc2abd229fc92a67176400745
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit f65861c645)
2020-06-19 20:00:50 +08:00
YueHaibing
0d472519c6 UPSTREAM: usb: typec: remove set but not used variables 'snk_ma, min_mv'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/typec/tcpm/tcpm.c: In function 'tcpm_pd_select_pps_apdo':
drivers/usb/typec/tcpm/tcpm.c:2212:39: warning:
 variable 'snk_ma' set but not used [-Wunused-but-set-variable]

drivers/usb/typec/tcpm/tcpm.c: In function 'tcpm_pd_build_pps_request':
drivers/usb/typec/tcpm/tcpm.c:2405:37: warning:
 variable 'min_mv' set but not used [-Wunused-but-set-variable]

Change-Id: I030bc96a2faca98946fa95b51c1dbdadbb9abc1b
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 8e4657c60c)
2020-06-19 20:00:50 +08:00
Adam Thomson
9a96e29459 UPSTREAM: usb: typec: fusb302: Resolve fixed power role contract setup
When the controller is configured for a fixed power role (Source
only or Sink only), attach does not proceed within the TCPM state
machine as there is no CC event generated by this driver to update
the CC line status.

To rectify this, when CC is configured as Source or Sink we now
make use of the hardware's automatic fixed Source or Sink
toggling mechanism, which detects attaches in the same way as for
DRP toggling. In this way the result of toggling is handled in the
same way by the 'fusb302_handle_togdone()' function, and CC events
are generated as expected for TCPM allowing a contract to be
established.

Change-Id: I736243adf0ddc9a11c00aa02be07c7039d26811d
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ea3b4d5523)
2020-06-19 20:00:50 +08:00
Adam Thomson
962eda85c8 UPSTREAM: usb: typec: fusb302: Correct spelling mistake for toggling state
There's a typo in the enum name of the 'OFF' state for toggling
(TOGGLINE instead of TOGGLING). This commit resolves that trivial
spelling inconsistency.

Change-Id: Ic7888efb03267fbe72ae1cc2f4c365800a187450
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 40326e857c)
2020-06-19 20:00:50 +08:00
Heikki Krogerus
eef67719e3 UPSTREAM: usb: typec: Group all TCPCI/TCPM code together
Moving all the drivers that depend on the Port Controller
Manager under a new directory drivers/usb/typec/tcpm/ and
making Guenter Roeck the designated reviewer of that code.

Change-Id: I72c3f00dc70b6a93dfc26c48b57635b96697305a
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ae8a2ca8a2)
2020-06-19 20:00:50 +08:00
Heikki Krogerus
21af73b6cc UPSTREAM: usb: typec: fusb302: reorganizing the probe function a little
The debugfs needs to be initialized as the last step in
probe in this case. The struct dentry *rootdir can't be
pointing to anything unless driver probe really finishes
successfully.

It is also not necessary to clear the i2c clientdata if the
probe fails, so removing the extra label used for that.

Change-Id: I07bbb25430921572231faf9dfac7328981055ff4
Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit c800c51f58)
2020-06-19 20:00:50 +08:00
Adam Thomson
44d0361b09 UPSTREAM: usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling
This update populates the tcpc handle's fwnode pointer with the
child usb-connector node, if it exists, so that TCPM can perform
generic property handling to define the ports capabilities.

Change-Id: Ifaad94abeab5bca8e381f445e00e5c248a340877
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 38c6528d40)
2020-06-19 20:00:50 +08:00