mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
phy: rockchip: csi2_dphy: add hw_idx to distinguish dev
Change-Id: I072cedcba316cf5d26335cbead272457bee2f61c Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
This commit is contained in:
@@ -128,6 +128,7 @@ struct csi2_dphy_hw {
|
||||
int dphy_dev_num;
|
||||
enum csi2_dphy_lane_mode lane_mode;
|
||||
struct resource *res;
|
||||
int hw_idx;
|
||||
|
||||
int (*stream_on)(struct csi2_dphy *dphy, struct v4l2_subdev *sd);
|
||||
int (*stream_off)(struct csi2_dphy *dphy, struct v4l2_subdev *sd);
|
||||
|
||||
@@ -712,7 +712,7 @@ static void csi2_dphy_config_dual_mode(struct csi2_dphy *dphy,
|
||||
|
||||
if (hw->lane_mode == LANE_MODE_FULL) {
|
||||
val = !GRF_CSI2PHY_LANE_SEL_SPLIT;
|
||||
if (dphy->phy_index < 3) {
|
||||
if (hw->hw_idx == 0) {
|
||||
write_grf_reg(hw, GRF_DPHY_CSI2PHY_DATALANE_EN,
|
||||
GENMASK(sensor->lanes - 1, 0));
|
||||
write_grf_reg(hw, GRF_DPHY_CSI2PHY_CLKLANE_EN, 0x1);
|
||||
|
||||
@@ -1161,6 +1161,7 @@ static int rockchip_csi2_dphy_get_inno_phy_hw(struct csi2_dphy *dphy)
|
||||
dphy->phy_index);
|
||||
return -EINVAL;
|
||||
}
|
||||
dphy_hw->hw_idx = i;
|
||||
dphy->dphy_hw_group[i] = dphy_hw;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user