media: atomisp_gmin_platform: Add DMI quirk to not turn AXP ELDO2 regulator off on some boards
[ Upstream commit 2c39a01154ea57d596470afa1d278e3be3b37f6a ] The TrekStor SurfTab duo W1 10.1 has a hw bug where turning eldo2 back on after having turned it off causes the CPLM3218 ambient-light-sensor on the front camera sensor's I2C bus to crash, hanging the bus. Add a DMI quirk table for systems on which to leave eldo2 on. Note an alternative fix is to turn off the CPLM3218 ambient-light-sensor as long as the camera sensor is being used, this is what Windows seems to do as a workaround (based on analyzing the DSDT). But that is not easy to do cleanly under Linux. Link: https://lore.kernel.org/linux-media/20220116215204.307649-10-hdegoede@redhat.com Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
370b50492e
commit
b554196e6d
@@ -729,6 +729,21 @@ static int axp_regulator_set(struct device *dev, struct gmin_subdev *gs,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some boards contain a hw-bug where turning eldo2 back on after having turned
|
||||||
|
* it off causes the CPLM3218 ambient-light-sensor on the image-sensor's I2C bus
|
||||||
|
* to crash, hanging the bus. Do not turn eldo2 off on these systems.
|
||||||
|
*/
|
||||||
|
static const struct dmi_system_id axp_leave_eldo2_on_ids[] = {
|
||||||
|
{
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab duo W1 10.1 (VT4)"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
static int axp_v1p8_on(struct device *dev, struct gmin_subdev *gs)
|
static int axp_v1p8_on(struct device *dev, struct gmin_subdev *gs)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -763,6 +778,9 @@ static int axp_v1p8_off(struct device *dev, struct gmin_subdev *gs)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
if (dmi_check_system(axp_leave_eldo2_on_ids))
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = axp_regulator_set(dev, gs, gs->eldo2_sel_reg, gs->eldo2_1p8v,
|
ret = axp_regulator_set(dev, gs, gs->eldo2_sel_reg, gs->eldo2_1p8v,
|
||||||
ELDO_CTRL_REG, gs->eldo2_ctrl_shift, false);
|
ELDO_CTRL_REG, gs->eldo2_ctrl_shift, false);
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user