mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
cdi: Add fsync_ctrl_port variable
Parse fsync_ctrl_port property in DT to overwrite FSYNC control GPIO port of IO expander JIRA CAMERASW-29219 Change-Id: I2311739d0460ad0601e1e40990201a4c0fd01ded Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233562 Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com>
This commit is contained in:
@@ -1721,6 +1721,7 @@ static int cdi_mgr_probe(struct platform_device *pdev)
|
||||
struct device_node *child_tca9539 = NULL;
|
||||
struct device_node *root_node = NULL;
|
||||
const char *model;
|
||||
u32 fsync_ctrl_port;
|
||||
|
||||
dev_info(&pdev->dev, "%sing...\n", __func__);
|
||||
|
||||
@@ -1939,6 +1940,17 @@ static int cdi_mgr_probe(struct platform_device *pdev)
|
||||
cdi_mgr->tca9539.power_port);
|
||||
goto err_probe;
|
||||
}
|
||||
cdi_mgr->tca9539.fsync_ctrl_port = -1;
|
||||
err = of_property_read_u32(child_tca9539,
|
||||
"fsync_ctrl_port",
|
||||
&fsync_ctrl_port);
|
||||
if (err == 0) {
|
||||
if ((fsync_ctrl_port >= 0) &&
|
||||
(fsync_ctrl_port <= 3)) {
|
||||
cdi_mgr->tca9539.fsync_ctrl_port =
|
||||
fsync_ctrl_port;
|
||||
}
|
||||
}
|
||||
|
||||
cdi_mgr->tca9539.reg_len /= 8;
|
||||
cdi_mgr->tca9539.dat_len /= 8;
|
||||
|
||||
Reference in New Issue
Block a user