Commit e62c30e7 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[media] smiapp: Remove set_xclk() callback from hwconfig

The clock framework is generally so well supported that there's no reason
to keep this one around.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 567716c5
...@@ -1201,10 +1201,6 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) ...@@ -1201,10 +1201,6 @@ static int smiapp_power_on(struct smiapp_sensor *sensor)
} }
usleep_range(1000, 1000); usleep_range(1000, 1000);
if (sensor->hwcfg->set_xclk)
rval = sensor->hwcfg->set_xclk(
&sensor->src->sd, sensor->hwcfg->ext_clk);
else
rval = clk_prepare_enable(sensor->ext_clk); rval = clk_prepare_enable(sensor->ext_clk);
if (rval < 0) { if (rval < 0) {
dev_dbg(&client->dev, "failed to enable xclk\n"); dev_dbg(&client->dev, "failed to enable xclk\n");
...@@ -1322,9 +1318,6 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) ...@@ -1322,9 +1318,6 @@ static int smiapp_power_on(struct smiapp_sensor *sensor)
out_cci_addr_fail: out_cci_addr_fail:
gpiod_set_value(sensor->xshutdown, 0); gpiod_set_value(sensor->xshutdown, 0);
if (sensor->hwcfg->set_xclk)
sensor->hwcfg->set_xclk(&sensor->src->sd, 0);
else
clk_disable_unprepare(sensor->ext_clk); clk_disable_unprepare(sensor->ext_clk);
out_xclk_fail: out_xclk_fail:
...@@ -1347,9 +1340,6 @@ static void smiapp_power_off(struct smiapp_sensor *sensor) ...@@ -1347,9 +1340,6 @@ static void smiapp_power_off(struct smiapp_sensor *sensor)
SMIAPP_SOFTWARE_RESET); SMIAPP_SOFTWARE_RESET);
gpiod_set_value(sensor->xshutdown, 0); gpiod_set_value(sensor->xshutdown, 0);
if (sensor->hwcfg->set_xclk)
sensor->hwcfg->set_xclk(&sensor->src->sd, 0);
else
clk_disable_unprepare(sensor->ext_clk); clk_disable_unprepare(sensor->ext_clk);
usleep_range(5000, 5000); usleep_range(5000, 5000);
regulator_disable(sensor->vana); regulator_disable(sensor->vana);
...@@ -2551,7 +2541,6 @@ static int smiapp_init(struct smiapp_sensor *sensor) ...@@ -2551,7 +2541,6 @@ static int smiapp_init(struct smiapp_sensor *sensor)
return PTR_ERR(sensor->vana); return PTR_ERR(sensor->vana);
} }
if (!sensor->hwcfg->set_xclk) {
sensor->ext_clk = devm_clk_get(&client->dev, NULL); sensor->ext_clk = devm_clk_get(&client->dev, NULL);
if (IS_ERR(sensor->ext_clk)) { if (IS_ERR(sensor->ext_clk)) {
dev_err(&client->dev, "could not get clock (%ld)\n", dev_err(&client->dev, "could not get clock (%ld)\n",
...@@ -2567,7 +2556,6 @@ static int smiapp_init(struct smiapp_sensor *sensor) ...@@ -2567,7 +2556,6 @@ static int smiapp_init(struct smiapp_sensor *sensor)
sensor->hwcfg->ext_clk); sensor->hwcfg->ext_clk);
return rval; return rval;
} }
}
sensor->xshutdown = devm_gpiod_get_optional(&client->dev, "xshutdown", sensor->xshutdown = devm_gpiod_get_optional(&client->dev, "xshutdown",
GPIOD_OUT_LOW); GPIOD_OUT_LOW);
...@@ -3108,9 +3096,6 @@ static int smiapp_remove(struct i2c_client *client) ...@@ -3108,9 +3096,6 @@ static int smiapp_remove(struct i2c_client *client)
if (sensor->power_count) { if (sensor->power_count) {
gpiod_set_value(sensor->xshutdown, 0); gpiod_set_value(sensor->xshutdown, 0);
if (sensor->hwcfg->set_xclk)
sensor->hwcfg->set_xclk(&sensor->src->sd, 0);
else
clk_disable_unprepare(sensor->ext_clk); clk_disable_unprepare(sensor->ext_clk);
sensor->power_count = 0; sensor->power_count = 0;
} }
......
...@@ -73,8 +73,6 @@ struct smiapp_hwconfig { ...@@ -73,8 +73,6 @@ struct smiapp_hwconfig {
enum smiapp_module_board_orient module_board_orient; enum smiapp_module_board_orient module_board_orient;
struct smiapp_flash_strobe_parms *strobe_setup; struct smiapp_flash_strobe_parms *strobe_setup;
int (*set_xclk)(struct v4l2_subdev *sd, int hz);
}; };
#endif /* __SMIAPP_H_ */ #endif /* __SMIAPP_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment