aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp/smiapp-core.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2014-10-03 10:38:32 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-23 08:50:25 -0500
commit0d825a1226466512f44d4a81ce11ad15ca9334b0 (patch)
tree038f860bbbdfe45989d511b25524ec717343c3aa /drivers/media/i2c/smiapp/smiapp-core.c
parent5313c00266700d231d9b386d9c0e4faad710c729 (diff)
[media] smiapp: Replace pll_flags quirk with more generic init quirk
The pll_flags quirk just returned the extra PLL flags the sensor required, but the init quirk is far more versatile. It can be used to perform any extra initialisation needed by the sensor, including allocating memory for sensor specific struct and creating sensor specific new controls. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/smiapp/smiapp-core.c')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index aa27a1b2e1ae..b3c81257e08d 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2697,7 +2697,6 @@ static int smiapp_init(struct smiapp_sensor *sensor)
2697 pll->bus_type = SMIAPP_PLL_BUS_TYPE_CSI2; 2697 pll->bus_type = SMIAPP_PLL_BUS_TYPE_CSI2;
2698 pll->csi2.lanes = sensor->platform_data->lanes; 2698 pll->csi2.lanes = sensor->platform_data->lanes;
2699 pll->ext_clk_freq_hz = sensor->platform_data->ext_clk; 2699 pll->ext_clk_freq_hz = sensor->platform_data->ext_clk;
2700 pll->flags = smiapp_call_quirk(sensor, pll_flags);
2701 pll->scale_n = sensor->limits[SMIAPP_LIMIT_SCALER_N_MIN]; 2700 pll->scale_n = sensor->limits[SMIAPP_LIMIT_SCALER_N_MIN];
2702 /* Profile 0 sensors have no separate OP clock branch. */ 2701 /* Profile 0 sensors have no separate OP clock branch. */
2703 if (sensor->minfo.smiapp_profile == SMIAPP_PROFILE_0) 2702 if (sensor->minfo.smiapp_profile == SMIAPP_PROFILE_0)
@@ -2772,6 +2771,10 @@ static int smiapp_init(struct smiapp_sensor *sensor)
2772 if (rval < 0) 2771 if (rval < 0)
2773 goto out_cleanup; 2772 goto out_cleanup;
2774 2773
2774 rval = smiapp_call_quirk(sensor, init);
2775 if (rval)
2776 goto out_cleanup;
2777
2775 rval = smiapp_get_mbus_formats(sensor); 2778 rval = smiapp_get_mbus_formats(sensor);
2776 if (rval) { 2779 if (rval) {
2777 rval = -ENODEV; 2780 rval = -ENODEV;