Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5528454pxb; Mon, 28 Mar 2022 13:46:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7mJIlvunGZIMfssrEJiZzOCnQ5+UWnjOS7ZKsAqyI0R4pt/Hh+fbAmFQ4E8VrKVw/dRyq X-Received: by 2002:a05:622a:14d1:b0:2e2:3242:4c25 with SMTP id u17-20020a05622a14d100b002e232424c25mr23774313qtx.1.1648500384398; Mon, 28 Mar 2022 13:46:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648500384; cv=none; d=google.com; s=arc-20160816; b=s6g60jxDDSfEefHVDAc3vBPw6R/4mG+KzWVFWkcWfcU4j/qvZC0DCt5i12y3BYiGJE TV/qX5Cs11ks847oBu1BpZPREXJe6Ql7fVfqfuuHrXi5Vc7mZaJLosexUSSBy/ATnZNi Pr3xaaYVmyknAvzjh+dSWIIwj3DfaZVe5OP2iM3hJJ/TpSBMYjoOMJIExzgGQRMGAM7g 7u09JrLpMZ88CqAqV7ljmjMk5N6hAhqq0RiQ2i/lNQTdgI5FkDRr7QYgrgnJwuDxRqry JWnxukDvbzCsORTr4iZKD7f8Y03ubZf/w33Vyt+/JitEXRHmRoxjNsYuodsVfAmXJSrR 4w7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NmQMOl74rWGRWzafuyJ5jjCyGGjWrcet8PudU8eNoTM=; b=PmFa0QVQDSmgPy0AS1AweZCY+j1xCCdAwI9UDtRK8RADmP99KOkuF+BAzQ4kO0YPvi e22OfbLdIJ0hCyQST395juS7mHImTLG3bKdvxIllxyx9VSc50ascZBuxBNvz6TvnZMpn wPtiHMFaudsNA/dBcM9XtHgSxRBSVfYa+8ClgLKdRHZR/LaL4+ALaUr/Iv+kswNMCdpH ya9BZ+S1N80EQ/fLEiD3jF4YT2ZsdIS7wfIGkjKe15fTVQxRn69PlU6rbKdQWkS8Hzvy 8C4BbE31vBVS+Wxmdh2EnvqZ8gZh7jrFEC5XMAZZpr9HOzmKy+1szyU2Or3E6oc0R5Nv SsDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fmnUk8fz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020ac87ee9000000b002e1fbf3bfcbsi7092154qtc.444.2022.03.28.13.45.54; Mon, 28 Mar 2022 13:46:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fmnUk8fz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242641AbiC1MxJ (ORCPT + 99 others); Mon, 28 Mar 2022 08:53:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242638AbiC1Mwv (ORCPT ); Mon, 28 Mar 2022 08:52:51 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F12B34D634 for ; Mon, 28 Mar 2022 05:51:10 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id i1so9921218ila.0 for ; Mon, 28 Mar 2022 05:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=NmQMOl74rWGRWzafuyJ5jjCyGGjWrcet8PudU8eNoTM=; b=fmnUk8fzFuPNcQLP4BGXA1S9aa97ooEg6VvUkroT0u2nlfdICTx4oy6TaPbWXhvP2p ycG9uUulYtBRRjLm9QXjKOnv6AXp/13Jj48+DV1eeBRQcSNHZBR8E/63/XFTjZ4F2U1Z /yWrDsUP0Axr8AP3acYeBwfDZz53FpCWg20obz6FBTMIy6DyWhoK3XEuP3vzdYNdNFi8 +0A4Z/J7Mlr9Z394QGOI1u0UNFDGE7BJASd2oJy7o5ajLXTTwx3PsG+wubUAG6Tzsn1M e99RFMzotoXtGAcBMws38D0LjwZFIdFfjgVk2ZTTXM/RkrDzZs84Ula9HelT/mD+AsNs pjYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=NmQMOl74rWGRWzafuyJ5jjCyGGjWrcet8PudU8eNoTM=; b=joBcVIR8/zO1LvbNI9MRhfkfqmZrdLrGGj7vRztaQlZWpJQPEI36TS0ux9QiaBPUAG QqfpID1B3YxXNf0mOyMp+8dxF8IsCCB+OaWNArVuMFcuv9njh/fzGdqmado/VzHXoAaf erCfB0ru+K4mdpQYv6cOb2jnbngczY0fd0tBedF7oYIFyvs7aRVinLKNWHe/md6d4EvH Mh3fTH2bKRiLQeg2HzeWnHCERPyoLX2x1wFiW59ybOl+HDdPMXlnGL70a0OVdjaiVscK zkEdo0+7+QNoADFvcKCRHg0rEAlBecKv1JpD6rHQCU6JPeACsEt9qPE22pp/KERI+voz UBlw== X-Gm-Message-State: AOAM5318oaSDR106mHmqg7cmMDxnzEa8UhXgnuwuM3WTw2A3o1tcB4QD py7rs76qrtr93smYgw+aM8Tg/EDx1iw3EiuzhwM= X-Received: by 2002:a92:cdad:0:b0:2c6:7b76:a086 with SMTP id g13-20020a92cdad000000b002c67b76a086mr6014966ild.5.1648471870337; Mon, 28 Mar 2022 05:51:10 -0700 (PDT) MIME-Version: 1.0 References: <20220328021139.8700-1-steve.lee.analog@gmail.com> In-Reply-To: From: Lee Steve Date: Mon, 28 Mar 2022 21:50:59 +0900 Message-ID: Subject: Re: [V3 1/2] ASoC: max98390: Add reset gpio control To: "Sa, Nuno" Cc: "lgirdwood@gmail.com" , "broonie@kernel.org" , "perex@perex.cz" , "tiwai@suse.com" , "ryans.lee@maximintegrated.com" , "linux-kernel@vger.kernel.org" , "alsa-devel@alsa-project.org" , "krzk@kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 28, 2022 at 4:42 PM Sa, Nuno wrote: > > > From: Steve Lee > > Sent: Monday, March 28, 2022 4:12 AM > > To: lgirdwood@gmail.com; broonie@kernel.org; perex@perex.cz; > > tiwai@suse.com; ryans.lee@maximintegrated.com; linux- > > kernel@vger.kernel.org; alsa-devel@alsa-project.org > > Cc: krzk@kernel.org; Sa, Nuno ; Steve Lee > > > > Subject: [V3 1/2] ASoC: max98390: Add reset gpio control > > > > [External] > > > > Add reset gpio control to support RESET PIN connected to gpio. > > > > Signed-off-by: Steve Lee > > --- > > sound/soc/codecs/max98390.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/sound/soc/codecs/max98390.c > > b/sound/soc/codecs/max98390.c > > index 40fd6f363f35..05df9b85d9b0 100644 > > --- a/sound/soc/codecs/max98390.c > > +++ b/sound/soc/codecs/max98390.c > > @@ -1022,6 +1022,7 @@ static int max98390_i2c_probe(struct > > i2c_client *i2c, > > > > struct max98390_priv *max98390 =3D NULL; > > struct i2c_adapter *adapter =3D i2c->adapter; > > + struct gpio_desc *reset_gpio; > > > > ret =3D i2c_check_functionality(adapter, > > I2C_FUNC_SMBUS_BYTE > > @@ -1073,6 +1074,17 @@ static int max98390_i2c_probe(struct > > i2c_client *i2c, > > return ret; > > } > > > > + reset_gpio =3D devm_gpiod_get_optional(&i2c->dev, > > + "reset", GPIOD_OUT_LOW); > > + > > + /* Power on device */ > > + if (reset_gpio) { > > + usleep_range(1000, 2000); > > + /* bring out of reset */ > > + gpiod_set_value_cansleep(reset_gpio, 1); > > Note this will set the gpio in the asserted state. Being it active low, t= his will > do the opposite thing that you are trying to accomplish... > > - Nuno S=C3=A1 I agree with your comment. I will update next version patch if there is other concern.