From: Mauro Carvalho Chehab Date: Sat, 25 Apr 2020 11:39:24 +0000 (+0200) Subject: media: atomisp: add support for possible new names X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1c874c13cd54448f9af7ccfd59ca7e03f49f66ac;p=linux.git 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 --- 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 4f1500ef0990c..eef7123a586f1 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