diff mbox series

ASoC: ak4458: remove "reset-gpios" property handler

Message ID 1720009575-11677-1-git-send-email-shengjiu.wang@nxp.com (mailing list archive)
State Accepted
Commit 1e0dff741b0a8af35645e5c3ffc4050893002a9c
Headers show
Series ASoC: ak4458: remove "reset-gpios" property handler | expand

Commit Message

S.J. Wang July 3, 2024, 12:26 p.m. UTC
commit c721f189e89c0 ("reset: Instantiate reset GPIO controller for
shared reset-gpios") check if there is no "resets" property
will fallback to "reset-gpios".

So don't need to handle "reset-gpios" separately in the driver,
the "reset-gpios" handler is duplicated with "resets" control handler,
remove it.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/codecs/ak4458.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Mark Brown July 4, 2024, 3:01 p.m. UTC | #1
On Wed, 03 Jul 2024 20:26:15 +0800, Shengjiu Wang wrote:
> commit c721f189e89c0 ("reset: Instantiate reset GPIO controller for
> shared reset-gpios") check if there is no "resets" property
> will fallback to "reset-gpios".
> 
> So don't need to handle "reset-gpios" separately in the driver,
> the "reset-gpios" handler is duplicated with "resets" control handler,
> remove it.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: ak4458: remove "reset-gpios" property handler
      commit: 1e0dff741b0a8af35645e5c3ffc4050893002a9c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Andy Shevchenko Aug. 9, 2024, 3:36 p.m. UTC | #2
On Wed, Jul 03, 2024 at 08:26:15PM +0800, Shengjiu Wang wrote:
> commit c721f189e89c0 ("reset: Instantiate reset GPIO controller for
> shared reset-gpios") check if there is no "resets" property
> will fallback to "reset-gpios".
> 
> So don't need to handle "reset-gpios" separately in the driver,
> the "reset-gpios" handler is duplicated with "resets" control handler,
> remove it.

...

> -	if (ak4458->reset_gpiod) {
> -		gpiod_set_value_cansleep(ak4458->reset_gpiod, active);
> -		usleep_range(1000, 2000);
> -	} else if (!IS_ERR_OR_NULL(ak4458->reset)) {
> +	if (!IS_ERR_OR_NULL(ak4458->reset)) {

_OR_NULL is redundant.

>  		if (active)
>  			reset_control_assert(ak4458->reset);
>  		else
diff mbox series

Patch

diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c
index 32cb802ad635..d472d9952628 100644
--- a/sound/soc/codecs/ak4458.c
+++ b/sound/soc/codecs/ak4458.c
@@ -45,7 +45,6 @@  struct ak4458_priv {
 	const struct ak4458_drvdata *drvdata;
 	struct device *dev;
 	struct regmap *regmap;
-	struct gpio_desc *reset_gpiod;
 	struct reset_control *reset;
 	struct gpio_desc *mute_gpiod;
 	int digfil;	/* SSLOW, SD, SLOW bits */
@@ -631,10 +630,7 @@  static struct snd_soc_dai_driver ak4497_dai = {
 
 static void ak4458_reset(struct ak4458_priv *ak4458, bool active)
 {
-	if (ak4458->reset_gpiod) {
-		gpiod_set_value_cansleep(ak4458->reset_gpiod, active);
-		usleep_range(1000, 2000);
-	} else if (!IS_ERR_OR_NULL(ak4458->reset)) {
+	if (!IS_ERR_OR_NULL(ak4458->reset)) {
 		if (active)
 			reset_control_assert(ak4458->reset);
 		else
@@ -758,11 +754,6 @@  static int ak4458_i2c_probe(struct i2c_client *i2c)
 	if (IS_ERR(ak4458->reset))
 		return PTR_ERR(ak4458->reset);
 
-	ak4458->reset_gpiod = devm_gpiod_get_optional(ak4458->dev, "reset",
-						      GPIOD_OUT_LOW);
-	if (IS_ERR(ak4458->reset_gpiod))
-		return PTR_ERR(ak4458->reset_gpiod);
-
 	ak4458->mute_gpiod = devm_gpiod_get_optional(ak4458->dev, "mute",
 						     GPIOD_OUT_LOW);
 	if (IS_ERR(ak4458->mute_gpiod))