@@ -111,6 +111,7 @@ struct bq25890_device {
struct regmap_field *rmap_fields[F_MAX_FIELDS];
bool skip_reset;
+ bool read_back_init_data;
enum bq25890_chip_version chip_version;
struct bq25890_init_data init_data;
struct bq25890_state state;
@@ -696,7 +697,7 @@ static int bq25890_chip_reset(struct bq25890_device *bq)
static int bq25890_rw_init_data(struct bq25890_device *bq)
{
- bool write = true;
+ bool write = !bq->read_back_init_data;
int ret;
int i;
@@ -981,6 +982,10 @@ static int bq25890_fw_probe(struct bq25890_device *bq)
struct bq25890_init_data *init = &bq->init_data;
bq->skip_reset = device_property_read_bool(bq->dev, "linux,skip-reset");
+ bq->read_back_init_data = device_property_read_bool(bq->dev,
+ "linux,read-back-settings");
+ if (bq->read_back_init_data)
+ return 0;
ret = bq25890_fw_read_u32_props(bq);
if (ret < 0)