Commit 22fe1cee authored by Angus Ainslie's avatar Angus Ainslie Committed by Martin Kepplinger
Browse files

power: bq25890_charger: add a devicetree option to disable DPDM negotiation



When the USB DP/DM lines are connected to more than 1 part on the board we
should disable auto DP/DM.
Signed-off-by: default avatarAngus Ainslie <angus@akkea.ca>
parent 2d836361
......@@ -83,6 +83,7 @@ struct bq25890_init_data {
u8 boosti; /* boost current limit */
u8 boostf; /* boost frequency */
u8 ilim_en; /* enable ILIM pin */
u8 auto_dpdm_en; /* enable auto_dpdm - enabled is the default */
u8 force_vindpm;/* force vinmin threshold */
u8 vindpm; /* vinmin threshold */
u8 treg; /* thermal regulation threshold */
......@@ -678,6 +679,7 @@ static int bq25890_hw_init(struct bq25890_device *bq)
{F_BOOSTI, bq->init_data.boosti},
{F_BOOSTF, bq->init_data.boostf},
{F_EN_ILIM, bq->init_data.ilim_en},
{F_AUTO_DPDM_EN, bq->init_data.auto_dpdm_en},
{F_FORCE_VINDPM, bq->init_data.force_vindpm},
{F_VINDPM, bq->init_data.vindpm},
{F_TREG, bq->init_data.treg}
......@@ -993,6 +995,8 @@ static int bq25890_fw_probe(struct bq25890_device *bq)
init->ilim_en = device_property_read_bool(bq->dev, "ti,use-ilim-pin");
init->boostf = device_property_read_bool(bq->dev, "ti,boost-low-freq");
/* use the inverse so that we don't change the default behaviour */
init->auto_dpdm_en = !device_property_read_bool(bq->dev, "ti,auto_dpdm_disable");
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment