diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-23 08:14:02 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-23 08:14:02 -0400 |
commit | 3372dbdd8ca11f51be8c6a30b2bc79eb04c4a902 (patch) | |
tree | d4499bf5a5665b4820ffaf96bce55bf6b895195e /sound/soc/codecs/cs35l32.c | |
parent | bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff) | |
parent | 967b1307b69b8ada8b331e01046ad1ef83742e99 (diff) |
Merge branch 'for-next' into topic/hda-core
Diffstat (limited to 'sound/soc/codecs/cs35l32.c')
-rw-r--r-- | sound/soc/codecs/cs35l32.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c index f2b8aad21274..60598b230341 100644 --- a/sound/soc/codecs/cs35l32.c +++ b/sound/soc/codecs/cs35l32.c | |||
@@ -437,20 +437,13 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client, | |||
437 | } | 437 | } |
438 | 438 | ||
439 | /* Reset the Device */ | 439 | /* Reset the Device */ |
440 | cs35l32->reset_gpio = devm_gpiod_get(&i2c_client->dev, | 440 | cs35l32->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev, |
441 | "reset-gpios"); | 441 | "reset", GPIOD_OUT_LOW); |
442 | if (IS_ERR(cs35l32->reset_gpio)) { | 442 | if (IS_ERR(cs35l32->reset_gpio)) |
443 | ret = PTR_ERR(cs35l32->reset_gpio); | 443 | return PTR_ERR(cs35l32->reset_gpio); |
444 | if (ret != -ENOENT && ret != -ENOSYS) | 444 | |
445 | return ret; | 445 | if (cs35l32->reset_gpio) |
446 | |||
447 | cs35l32->reset_gpio = NULL; | ||
448 | } else { | ||
449 | ret = gpiod_direction_output(cs35l32->reset_gpio, 0); | ||
450 | if (ret) | ||
451 | return ret; | ||
452 | gpiod_set_value_cansleep(cs35l32->reset_gpio, 1); | 446 | gpiod_set_value_cansleep(cs35l32->reset_gpio, 1); |
453 | } | ||
454 | 447 | ||
455 | /* initialize codec */ | 448 | /* initialize codec */ |
456 | ret = regmap_read(cs35l32->regmap, CS35L32_DEVID_AB, ®); | 449 | ret = regmap_read(cs35l32->regmap, CS35L32_DEVID_AB, ®); |