@@ -1119,9 +1119,8 @@ static int mira220_power_on(struct device *dev)
1119
1119
dev_err (& client -> dev , "%s: failed to enable clock\n" , __func__ );
1120
1120
goto clk_off ;
1121
1121
}
1122
- usleep_range (MIRA220_XCLR_MIN_DELAY_US ,
1123
- MIRA220_XCLR_MIN_DELAY_US + MIRA220_XCLR_DELAY_RANGE_US );
1124
-
1122
+ fsleep (MIRA220_XCLR_MIN_DELAY_US );
1123
+
1125
1124
return 0 ;
1126
1125
1127
1126
clk_off :
@@ -1196,7 +1195,7 @@ static int mira220_write_stop_streaming_regs(struct mira220 *mira220)
1196
1195
return ret ;
1197
1196
}
1198
1197
1199
- usleep_range (40000 , 40000 + 10000 );
1198
+ fsleep (40000 );
1200
1199
1201
1200
return ret ;
1202
1201
}
@@ -1663,25 +1662,23 @@ static int mira220_get_regulators(struct mira220 *mira220)
1663
1662
}
1664
1663
1665
1664
/* OTP power on */
1666
- static int mira220_otp_power_on (struct mira220 * mira220 )
1665
+ static void mira220_otp_power_on (struct mira220 * mira220 )
1667
1666
{
1668
1667
int ret ;
1669
1668
1670
1669
ret = cci_write (mira220 -> regmap , MIRA220_OTP_CMD_REG ,
1671
1670
MIRA220_OTP_CMD_UP , NULL );
1672
1671
1673
- return ret ;
1674
1672
}
1675
1673
1676
1674
/* OTP power off */
1677
- static int mira220_otp_power_off (struct mira220 * mira220 )
1675
+ static void mira220_otp_power_off (struct mira220 * mira220 )
1678
1676
{
1679
1677
int ret ;
1680
1678
1681
1679
ret = cci_write (mira220 -> regmap , MIRA220_OTP_CMD_REG ,
1682
1680
MIRA220_OTP_CMD_DOWN , NULL );
1683
1681
1684
- return ret ;
1685
1682
}
1686
1683
1687
1684
/* OTP power on */
@@ -1709,7 +1706,7 @@ static int mira220_identify_module(struct mira220 *mira220)
1709
1706
1710
1707
mira220_otp_power_on (mira220 );
1711
1708
1712
- usleep_range (100 , 110 );
1709
+ fsleep (100 );
1713
1710
1714
1711
ret = mira220_otp_read (mira220 , 0x0d , 0 , & val );
1715
1712
dev_err (& client -> dev , "Read OTP add 0x0d with val %x\n" , val );
@@ -1806,12 +1803,12 @@ static int mira220_init_controls(struct mira220 *mira220)
1806
1803
V4L2_CID_HFLIP , 0 , 1 , 1 , 0 );
1807
1804
if (mira220 -> hflip )
1808
1805
mira220 -> hflip -> flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT ;
1809
-
1806
+
1810
1807
mira220 -> vflip = v4l2_ctrl_new_std (ctrl_hdlr , & mira220_ctrl_ops ,
1811
1808
V4L2_CID_VFLIP , 0 , 1 , 1 , 0 );
1812
1809
if (mira220 -> vflip )
1813
1810
mira220 -> vflip -> flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT ;
1814
-
1811
+
1815
1812
v4l2_ctrl_new_std_menu_items (ctrl_hdlr , & mira220_ctrl_ops ,
1816
1813
V4L2_CID_TEST_PATTERN ,
1817
1814
ARRAY_SIZE (mira220_test_pattern_menu ) - 1 ,
@@ -1886,7 +1883,7 @@ static int mira220_probe(struct i2c_client *client)
1886
1883
return ret ;
1887
1884
}
1888
1885
1889
- usleep_range (10000 , 10000 + 100 );
1886
+ fsleep (10000 );
1890
1887
1891
1888
// The sensor must be powered for mira220_identify_module()
1892
1889
// to be able to read the CHIP_ID register
@@ -1895,7 +1892,7 @@ static int mira220_probe(struct i2c_client *client)
1895
1892
if (ret )
1896
1893
return ret ;
1897
1894
1898
- usleep_range (100000 , 100000 + 1000 );
1895
+ fsleep (100000 );
1899
1896
1900
1897
ret = mira220_identify_module (mira220 );
1901
1898
if (ret )
0 commit comments