Do not fail the probe if the enable-gpio is not specifiedbut handle
deferred probe case.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
return -ENOMEM;
data->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
- if (IS_ERR(data->enable_gpio))
- return PTR_ERR(data->enable_gpio);
+ if (IS_ERR(data->enable_gpio)) {
+ if (PTR_ERR(data->enable_gpio) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+
+ data->enable_gpio = NULL;;
+ }
data->tas2552_client = client;
data->regmap = devm_regmap_init_i2c(client, &tas2552_regmap_config);