Similar to the SM8250 the CSID relies on the VFE to be clocked prior to
taking the CSID out of reset.
Apply the same fixup to SDM845 as SM8250.
Suggested-by: Robert Foss <robert.foss@linaro.org>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
struct camss *camss = csid->camss;
struct device *dev = camss->dev;
struct vfe_device *vfe = &camss->vfe[csid->id];
+ u32 version = camss->version;
int ret;
if (on) {
- if (camss->version == CAMSS_8250) {
+ if (version == CAMSS_8250 || version == CAMSS_845) {
ret = vfe_get(vfe);
if (ret < 0)
return ret;
camss_disable_clocks(csid->nclocks, csid->clock);
ret = csid->vdda ? regulator_disable(csid->vdda) : 0;
pm_runtime_put_sync(dev);
- if (camss->version == CAMSS_8250)
+ if (version == CAMSS_8250 || version == CAMSS_845)
vfe_put(vfe);
}