summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-25 13:39:24 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 12:32:17 +0200
commit1c874c13cd54448f9af7ccfd59ca7e03f49f66ac (patch)
tree787dced7e978b3843cd7ace04e4923d8d480e638
parentfe670b2a79b8f676f3a01771e8a79a7e37fa51a5 (diff)
downloadlinux-1c874c13cd54448f9af7ccfd59ca7e03f49f66ac.tar.gz
linux-1c874c13cd54448f9af7ccfd59ca7e03f49f66ac.tar.bz2
linux-1c874c13cd54448f9af7ccfd59ca7e03f49f66ac.zip
media: atomisp: add support for possible new names
This patch addresses what it sounds to be a change at the name of some ACPI registers on newer ACPI tables. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
index 4f1500ef0990..eef7123a586f 100644
--- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
@@ -394,6 +394,17 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)
gmin_subdevs[i].v1p2_reg = regulator_get(dev, "V1P2A");
gmin_subdevs[i].v2p8_vcm_reg = regulator_get(dev, "VPROG4B");
+ /*
+ * Based on DTST dumps on newer Atom E3800 devices, it seems that
+ * the regulators data now have new names.
+ */
+ if (IS_ERR(gmin_subdevs[i].v1p8_reg))
+ gmin_subdevs[i].v1p8_reg = regulator_get(dev, "Regulator1p8v");
+
+ if (IS_ERR(gmin_subdevs[i].v2p8_reg))
+ gmin_subdevs[i].v2p8_reg = regulator_get(dev, "Regulator2p8v");
+
+
/* Note: ideally we would initialize v[12]p8_on to the
* output of regulator_is_enabled(), but sadly that
* API is broken with the current drivers, returning