mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 06:17:26 -04:00
media: atomisp: use regulator_get_optional() for first attempt
Some BIOSes seem to use different names for some regulators. Use regulator_get_optional() for the first attempt, in order to avoid using the dummy regulator and produce a warning, in the case that the first attempt fails. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
@@ -405,8 +405,11 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)
|
||||
gmin_subdevs[i].gpio1 = NULL;
|
||||
|
||||
if (pmic_id == PMIC_REGULATOR) {
|
||||
gmin_subdevs[i].v1p8_reg = regulator_get(dev, "V1P8SX");
|
||||
gmin_subdevs[i].v2p8_reg = regulator_get(dev, "V2P8SX");
|
||||
/* Those regulators may have different names depending on the BIOS */
|
||||
gmin_subdevs[i].v1p8_reg = regulator_get_optional(dev, "V1P8SX");
|
||||
gmin_subdevs[i].v2p8_reg = regulator_get_optional(dev, "V2P8SX");
|
||||
|
||||
|
||||
gmin_subdevs[i].v1p2_reg = regulator_get(dev, "V1P2A");
|
||||
gmin_subdevs[i].v2p8_vcm_reg = regulator_get(dev, "VPROG4B");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user