mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
i2c:nv_hawk_owl: Reduced sensor stream on time.
Following changes are done to reduce 400ms to 200ms: 1> I2c address trans during every power_on is moved to probe time. Since with virtual-i2c mux IMUs are handled and hence we don't need to do i2c address trans every time. So once during probe time is enough, that reduces ~120ms. 2> Reduced sleeping time during start stream call to 20ms, Which reduced ~100ms. Bug 4180672 Change-Id: I027148f64b892d95e5432394f90bf171156ef9c0 Signed-off-by: Praveen AC <pac@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3072821 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Ankur Pawar <ankurp@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
e31d73fa20
commit
6642085af9
@@ -344,7 +344,7 @@ retry_sensor:
|
|||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
if (0x301a == table[i].addr || 0x3060 == table[i].addr)
|
if (0x301a == table[i].addr || 0x3060 == table[i].addr)
|
||||||
msleep(100);
|
msleep(20);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
retry = 5;
|
retry = 5;
|
||||||
@@ -555,7 +555,7 @@ static int ar0234_power_on(struct camera_common_data *s_data)
|
|||||||
struct camera_common_power_rail *pw = s_data->power;
|
struct camera_common_power_rail *pw = s_data->power;
|
||||||
struct camera_common_pdata *pdata = s_data->pdata;
|
struct camera_common_pdata *pdata = s_data->pdata;
|
||||||
struct device *dev = s_data->dev;
|
struct device *dev = s_data->dev;
|
||||||
struct ar0234 *priv = (struct ar0234 *) s_data->priv;
|
|
||||||
if (pdata && pdata->power_on) {
|
if (pdata && pdata->power_on) {
|
||||||
err = pdata->power_on(pw);
|
err = pdata->power_on(pw);
|
||||||
if (err)
|
if (err)
|
||||||
@@ -568,8 +568,6 @@ static int ar0234_power_on(struct camera_common_data *s_data)
|
|||||||
gpio_set_value(pw->reset_gpio, 1);
|
gpio_set_value(pw->reset_gpio, 1);
|
||||||
usleep_range(1000, 2000);
|
usleep_range(1000, 2000);
|
||||||
pw->state = SWITCH_ON;
|
pw->state = SWITCH_ON;
|
||||||
/*i2c address trans for Hawk & Owl*/
|
|
||||||
err = ar0234_hawk_owl_i2ctrans(priv);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
static int ar0234_power_off(struct camera_common_data *s_data)
|
static int ar0234_power_off(struct camera_common_data *s_data)
|
||||||
@@ -1504,6 +1502,14 @@ static int ar0234_probe(struct i2c_client *client,
|
|||||||
dev_err(&client->dev,"Failed to enable gpio/ to do serializer i2c address trans\n");
|
dev_err(&client->dev,"Failed to enable gpio/ to do serializer i2c address trans\n");
|
||||||
goto un_register;
|
goto un_register;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* i2c address trans for Hawk & Owl */
|
||||||
|
err = ar0234_hawk_owl_i2ctrans(priv);
|
||||||
|
if (err) {
|
||||||
|
dev_err(&client->dev, "Failed to do i2c address trans\n");
|
||||||
|
goto un_register;
|
||||||
|
}
|
||||||
|
|
||||||
err = ar0234_power_on(tc_dev->s_data);
|
err = ar0234_power_on(tc_dev->s_data);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&client->dev,"Failed to power on\n");
|
dev_err(&client->dev,"Failed to power on\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user