diff options
Diffstat (limited to 'sound/soc/codecs/cs4265.c')
-rw-r--r-- | sound/soc/codecs/cs4265.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index ce6086835ebd..cac48ddf3ba6 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c | |||
@@ -605,21 +605,14 @@ static int cs4265_i2c_probe(struct i2c_client *i2c_client, | |||
605 | return ret; | 605 | return ret; |
606 | } | 606 | } |
607 | 607 | ||
608 | cs4265->reset_gpio = devm_gpiod_get(&i2c_client->dev, | 608 | cs4265->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev, |
609 | "reset-gpios"); | 609 | "reset", GPIOD_OUT_LOW); |
610 | if (IS_ERR(cs4265->reset_gpio)) { | 610 | if (IS_ERR(cs4265->reset_gpio)) |
611 | ret = PTR_ERR(cs4265->reset_gpio); | 611 | return PTR_ERR(cs4265->reset_gpio); |
612 | if (ret != -ENOENT && ret != -ENOSYS) | 612 | |
613 | return ret; | 613 | if (cs4265->reset_gpio) { |
614 | |||
615 | cs4265->reset_gpio = NULL; | ||
616 | } else { | ||
617 | ret = gpiod_direction_output(cs4265->reset_gpio, 0); | ||
618 | if (ret) | ||
619 | return ret; | ||
620 | mdelay(1); | 614 | mdelay(1); |
621 | gpiod_set_value_cansleep(cs4265->reset_gpio, 1); | 615 | gpiod_set_value_cansleep(cs4265->reset_gpio, 1); |
622 | |||
623 | } | 616 | } |
624 | 617 | ||
625 | i2c_set_clientdata(i2c_client, cs4265); | 618 | i2c_set_clientdata(i2c_client, cs4265); |