@@ -534,7 +534,7 @@ EXPORT_SYMBOL_GPL(arizona_of_get_named_gpio);
static int arizona_of_get_core_pdata(struct arizona *arizona)
{
struct arizona_pdata *pdata = &arizona->pdata;
- int ret, i;
+ int ret, i, proplen;
pdata->reset = arizona_of_get_named_gpio(arizona, "wlf,reset", true);
@@ -560,6 +560,12 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
ret);
}
+ proplen = of_property_count_u32_elems(arizona->dev->of_node,
+ "wlf,inmode");
+ if (proplen > 0 && proplen <= ARRAY_SIZE(arizona->pdata.inmode))
+ of_property_read_u32_array(arizona->dev->of_node, "wlf,inmode",
+ arizona->pdata.inmode, proplen);
+
return 0;
}