Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1911924iob; Thu, 5 May 2022 10:40:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAJHHw+T+0Po6wFuOYJ2QRz8S+Z2ZzdaomQ9NREjSUXk3Ss0aSU/z6ObGmZ59QsE8XOqXU X-Received: by 2002:a17:90b:3142:b0:1dc:c4c9:cdf8 with SMTP id ip2-20020a17090b314200b001dcc4c9cdf8mr3267718pjb.125.1651772417766; Thu, 05 May 2022 10:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651772417; cv=none; d=google.com; s=arc-20160816; b=V/OZZ+h0Snb7jw3baicSc94ni+agXrVWqA0T7Okk/HHuQHmwMd7/F08eNUpzpoSbcu qFSvgsQLdOvtUe9rQLoCp7okmpVfdybCnG0cq/mvUTukh+7cgGb6GheVypNWAm6Wg3Dt LRHimlGIFmYbB3u4syxPcyOm1E8/Z4M2w4UM6V1cTf2uq8cwi6R7w1BwamfsOCjqgyBe eqv081vzQodyy6N97owIsb0dWAr81ycs1HjHgzN4cOvBuBlHpS5My5DMJphZ0k98YJG8 1zSzVs/gRMt8lPgDIKKSbTA3I16xjltOhjA7GCl2f1Dnbrvk2VB98++E0T6uESM0fOpR pFwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1avKMT5v2Dea6h8kovhPl7uIrb6vpMam0UarYxyyFN0=; b=c0xa/66D1ldwT3kej/u2KUy9CTA4I0wHo4w887LjYiobyWQMzQS2cxxKAQsvyb1w7X sGM63wKDnIqcNM2ozrtoDDipHqZCIUqY6YvaNx7tqlUoNdsCgmikF7g+Op6H7kFPALUL 2XXu2sxIYtx0l9SLe9PgMUSi+rM98OgmMs+YeZOgEqVWUNmmcvWpnkp275D8OjRrjMfZ vLV9Bt391cOiYQ4dNfLahklBicovurX77I5nsM/IJfsvAxoTd5aQM0GtBMwCwQ7h0KKQ 6KIN8/Nr8FPOXp/SG8kwbyIDy5yxy+HfVVjPBTcKgU26lOMNhk5GesmHzZgHbsXQ6x8U rEqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=eWlqEf9n; 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=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x20-20020a17090a531400b001d931aa3f3fsi8166807pjh.184.2022.05.05.10.40.02; Thu, 05 May 2022 10:40:17 -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=@quicinc.com header.s=qcdkim header.b=eWlqEf9n; 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=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353357AbiEEJaz (ORCPT + 99 others); Thu, 5 May 2022 05:30:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353358AbiEEJai (ORCPT ); Thu, 5 May 2022 05:30:38 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE1E4E3A3; Thu, 5 May 2022 02:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651742815; x=1683278815; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=1avKMT5v2Dea6h8kovhPl7uIrb6vpMam0UarYxyyFN0=; b=eWlqEf9nwQ+OypodqJNtQiswfAsiduS5qWYM+fisj/DR/Dny9yynfjzc XJ6g4Igq5anR9gc4k5x0FiOYfXDXLX1I+fVeFm+4THOQxqPlUG00LXseY QI7Axj1bF1t91ArfC8AAsPgtf6ft+iDBRF2nMp/eTHii1R0+b/F5FK9sE E=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 05 May 2022 02:26:54 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 02:26:54 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 5 May 2022 02:26:53 -0700 Received: from c-skakit-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 5 May 2022 02:26:49 -0700 From: Satya Priya To: Bjorn Andersson , Rob Herring CC: Lee Jones , Liam Girdwood , Mark Brown , , , , , , , , Satya Priya Subject: [PATCH V11 4/9] mfd: pm8008: Add reset-gpios Date: Thu, 5 May 2022 14:55:34 +0530 Message-ID: <1651742739-12338-5-git-send-email-quic_c_skakit@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1651742739-12338-1-git-send-email-quic_c_skakit@quicinc.com> References: <1651742739-12338-1-git-send-email-quic_c_skakit@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 Add the reset-gpio toggling in the pm8008_probe() to bring pm8008 chip out of reset instead of doing it in DT node using "output-high" property. Signed-off-by: Satya Priya --- Changes in V11: - Use local variable for reset_gpios as it is not used outside of probe. - Use GPIOD_OUT_LOW flag to initialize the gpio and remove below line as it is not required "gpiod_set_value(chip->reset_gpio, 1);". Changes in V10: - This has been split from [V9,3/6] as per comments here [1] [1] https://patchwork.kernel.org/project/linux-arm-msm/patch/1649166633-25872-4-git-send-email-quic_c_skakit@quicinc.com/#24803409 drivers/mfd/qcom-pm8008.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c index c472d7f..e7c3b32 100644 --- a/drivers/mfd/qcom-pm8008.c +++ b/drivers/mfd/qcom-pm8008.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -221,6 +222,7 @@ static int pm8008_probe(struct i2c_client *client) { int rc; struct pm8008_data *chip; + struct gpio_desc *reset_gpio; chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL); if (!chip) @@ -239,6 +241,10 @@ static int pm8008_probe(struct i2c_client *client) dev_err(chip->dev, "Failed to probe irq periphs: %d\n", rc); } + reset_gpio = devm_gpiod_get(chip->dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(reset_gpio)) + return PTR_ERR(reset_gpio); + return devm_of_platform_populate(chip->dev); } -- 2.7.4