]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: camss: csiphy: Update settle count calculation
authorTodor Tomov <todor.tomov@linaro.org>
Wed, 25 Jul 2018 16:38:19 +0000 (12:38 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 2 Aug 2018 10:12:45 +0000 (06:12 -0400)
Update settle count calculation as per specification.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/qcom/camss/camss-csiphy.c

index 2a9adcd6ff3cb05739a14265e834dc74fcb1b25a..6158ffd3b3580667f5905807f6a40b3aef7d6840 100644 (file)
@@ -329,7 +329,7 @@ static u8 csiphy_settle_cnt_calc(struct csiphy_device *csiphy)
        t_hs_settle = (t_hs_prepare_max + t_hs_prepare_zero_min) / 2;
 
        timer_period = div_u64(1000000000000LL, csiphy->timer_clk_rate);
-       settle_cnt = t_hs_settle / timer_period;
+       settle_cnt = t_hs_settle / timer_period - 1;
 
        return settle_cnt;
 }