Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4450214ioa; Wed, 27 Apr 2022 04:15:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn0C3CWswssBi1IA+qwWxiZlaOjyKxmyRq8yWfDtpTD97vcAWADzwWiMhtq0vdBYjswM0E X-Received: by 2002:a05:6a00:1a01:b0:505:b3e5:b5fc with SMTP id g1-20020a056a001a0100b00505b3e5b5fcmr29316894pfv.53.1651058148057; Wed, 27 Apr 2022 04:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651058148; cv=none; d=google.com; s=arc-20160816; b=BZV9fnkIq739MrR+mDnwPd6ktv/USeI4lCQx4INnurHwwCK/Wv/HiNKtNHyTakWLn4 tiL4mMWC05xFtaBNEh8ntymGGzRRP88L/eJSVOqoT3euNFqG4bogmbuOmJhsLHNe4Rxn yuYLwAxi+uOPUXIN67MkbRACb1jNNC4VFDRR1Leb7c/LjygFEc2A/2IkCeTiEOi0luzV Eg34XbZYtDmXyuNp5Fwzjnfcfz7wTFYSxn5GjHldY6w4qRpSOmn9+3mdLS3A0ZltJ444 pLhjPrZtE/Iwnx1ITY/KR4bFCg/SKrivsaf325F+dS17qejXO2aa++MAHrYY8Lp1Dfz6 sVIw== 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:user-agent:from:references:in-reply-to:mime-version :dkim-signature; bh=ZcU95OJBm8X6qJVVZNisfeK1zEsLfj9CNZTaDh3N4nU=; b=poWP0j2WjS9djEiBk1oWZZ95Z75rJw4+t7Npnu6ovbLTCW7+OqDw4EtEfXbKaBAJDu gDc1cVEod4N0jNcUX5dVLofPiBnEqPPXUKVvBK1xvwnLYMAgKh8nP/8Sok3zRj53uEUD d+IA/ovC87GbNp1vAV13YDQCQDkxrd8UK4CRYqOsfiUbnt8azviVfJ6gS84G1WWhsxC7 3xCtktpXfzRcF6zJj0Okw+MMk9nM1rgJDJjc6RemX1Y/0EgW0jHuxPGiktxjHlkSynAe YGtNUtlWehd5tKsI7wYSfbFqee6jaIHYUQOZSOhYASfzM4U5hJl3YZauEaVryK6W7cKF 1MWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ag1roHdB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k7-20020a170902c40700b0015830f35108si1571533plk.209.2022.04.27.04.15.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:15:48 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ag1roHdB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 645B22550E1; Wed, 27 Apr 2022 03:09:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358125AbiD0Gd2 (ORCPT + 99 others); Wed, 27 Apr 2022 02:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358126AbiD0GdW (ORCPT ); Wed, 27 Apr 2022 02:33:22 -0400 Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3309270B for ; Tue, 26 Apr 2022 23:30:08 -0700 (PDT) Received: by mail-oo1-xc30.google.com with SMTP id j25-20020a4a7519000000b0035e6db06150so195300ooc.6 for ; Tue, 26 Apr 2022 23:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc:content-transfer-encoding; bh=ZcU95OJBm8X6qJVVZNisfeK1zEsLfj9CNZTaDh3N4nU=; b=ag1roHdB2K1yzlq9dFTGsJJvsffuGYEXzn6ibT2hl0TaVtdptlJphN0GDVBDxcrKBB ytU+7evSlbakjpAKMhrdFS72fmCiijmOTvLzSPwLdEpjJe+btGITql3SPLelFT6v57JK Zt3zb44LA2/nt9Ejd0wO/v/kuGBDwD3oqpAZc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc:content-transfer-encoding; bh=ZcU95OJBm8X6qJVVZNisfeK1zEsLfj9CNZTaDh3N4nU=; b=yLgWGp4F50Hojz+1gQeik4fEmUReNc7OMObBv7CLZdxym4Mc2pq9zxjcbR7rN6VXE4 ChyLDDbqzWLUBAe2SgnosKoN+gPH8UpF7ER0Sa9L/PjbLmudxi8LCNHt/Fxd1mV/GiIG Uxd0117brlnR8HBW+fKNk6xjvvYw6LtUyO0TU5XrykQYh0m18cgtxBEbG7pNLnBl0/SN dxqFdjNPeMcvtIINf4PjAcqLjsG108gQ6QS1IwOwIH2xBaUjPD0X5NyXOp2Gc0/vrGsy H9JmkdPg2f2b0wpknx1dPd9Tevv8qCE0er4UBHwpUE9ziMg69OZzSCCW+L0T8lFFth8e tGMA== X-Gm-Message-State: AOAM532zRNMcN9DGQvyb8OD8Y0DDsdAd8jWfJ1kFw7CQin5jvCPIFl5p K4pGrfbp0hw0dhykrWFxhkAWa6cgXSIXCapdE7uSjg== X-Received: by 2002:a4a:6b49:0:b0:329:99cd:4fb8 with SMTP id h9-20020a4a6b49000000b0032999cd4fb8mr9484974oof.25.1651041008163; Tue, 26 Apr 2022 23:30:08 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 26 Apr 2022 23:30:07 -0700 MIME-Version: 1.0 In-Reply-To: <104b529b-946d-f171-5a82-6052aef2dbbb@quicinc.com> References: <1649939418-19861-1-git-send-email-quic_c_skakit@quicinc.com> <1649939418-19861-5-git-send-email-quic_c_skakit@quicinc.com> <010bd223-94a0-fe8c-d1ab-39153bb68a7d@quicinc.com> <104b529b-946d-f171-5a82-6052aef2dbbb@quicinc.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Tue, 26 Apr 2022 23:30:07 -0700 Message-ID: Subject: Re: [PATCH V10 4/9] mfd: pm8008: Add reset-gpios To: Satya Priya Kakitapalli Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Quoting Satya Priya Kakitapalli (Temp) (2022-04-26 23:03:08) > > On 4/27/2022 10:58 AM, Satya Priya Kakitapalli (Temp) wrote: > > > > On 4/18/2022 10:34 AM, Satya Priya Kakitapalli (Temp) wrote: > >> > >> On 4/15/2022 5:40 AM, Stephen Boyd wrote: > >>> Quoting Satya Priya (2022-04-14 05:30:13) > >>>> diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c > >>>> index c472d7f..97a72da 100644 > >>>> --- a/drivers/mfd/qcom-pm8008.c > >>>> +++ b/drivers/mfd/qcom-pm8008.c > >> > >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return PTR_ERR(chip->reset_gpio); > >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gpiod_set_value(chip->reset_gp= io, 1); > >>> Does this do anything? Does this work just as well? > >>> > >>> =C2=A0=C2=A0=C2=A0=C2=A0reset_gpio =3D devm_gpiod_get(chip->dev, "res= et", GPIOD_OUT_LOW); > >>> =C2=A0=C2=A0=C2=A0=C2=A0if (IS_ERR(reset_gpio)) > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return PTR_ERR(reset_gpio)= ; > >>> > > > > This is not working as expected. We need to add > > "gpiod_set_value(chip->reset_gpio, 1);"=C2=A0 to actually toggle the li= ne. > > > > I checked again and it is working after using GPIOD_OUT_HIGH instead of L= OW. > > reset_gpio =3D devm_gpiod_get(chip->dev, "reset", GPIOD_OUT_HIGH); > =C2=A0=C2=A0=C2=A0=C2=A0if (IS_ERR(reset_gpio)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return PTR_ERR(reset_gpio); > What do you have in DT for the 'reset-gpios' property? GPIOD_OUT_HIGH means the reset line is asserted, which presumably you don't want to be the case because you typically deassert a reset to "take it out of reset". Using GPIOD_OUT_HIGH probably works because DT has the wrong GPIO flag, i.e. GPIO_ACTIVE_HIGH, for an active low reset, or vice versa.