static void deferred_probe_timeout_work_func(struct work_struct *work)
{
- struct device_private *private, *p;
+ struct device_private *p;
+ fw_devlink_drivers_done();
+
driver_deferred_probe_timeout = 0;
driver_deferred_probe_trigger();
flush_work(&deferred_probe_work);
* @parse_prop.prop_name: Name of property holding a phandle value
* @parse_prop.index: For properties holding a list of phandles, this is the
* index into the list
- * @optional: The property can be an optional dependency.
+ * @optional: Describes whether a supplier is mandatory or not
+ * @node_not_dev: The consumer node containing the property is never a device.
*
* Returns:
* parse_prop() return values are
DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL)
DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL)
DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL)
+ DEFINE_SIMPLE_PROP(remote_endpoint, "remote-endpoint", NULL)
DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)
DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
-DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells")
+
+static struct device_node *parse_gpios(struct device_node *np,
+ const char *prop_name, int index)
+{
+ if (!strcmp_suffix(prop_name, ",nr-gpios"))
+ return NULL;
+
+ return parse_suffix_prop_cells(np, prop_name, index, "-gpios",
+ "#gpio-cells");
+}
static struct device_node *parse_iommu_maps(struct device_node *np,
const char *prop_name, int index)
rc = sbs_get_battery_presence_and_health(
client, POWER_SUPPLY_PROP_PRESENT, &val);
- if (rc < 0 || !val.intval) {
- dev_err(&client->dev, "Failed to get present status\n");
- rc = -ENODEV;
- goto exit_psupply;
- }
+ if (rc < 0 || !val.intval)
+ return dev_err_probe(&client->dev, -ENODEV,
+ "Failed to get present status\n");
}
- INIT_DELAYED_WORK(&chip->work, sbs_delayed_work);
+ rc = devm_delayed_work_autocancel(&client->dev, &chip->work,
+ sbs_delayed_work);
+ if (rc)
+ return rc;
chip->power_supply = devm_power_supply_register(&client->dev, sbs_desc,
&psy_cfg);
"%s: battery gas gauge device registered\n", client->name);
return 0;
-
-exit_psupply:
- return rc;
}
- static int sbs_remove(struct i2c_client *client)
- {
- struct sbs_info *chip = i2c_get_clientdata(client);
-
- cancel_delayed_work_sync(&chip->work);
-
- return 0;
- }
-
#if defined CONFIG_PM_SLEEP
static int sbs_suspend(struct device *dev)