Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2174402iof; Tue, 7 Jun 2022 22:11:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwvZEZN8IOM7dbNgtzPyyzzLE5ftPjh38iQV93kFclm9SVlLSf+Oh4TP67GnWc9ajs0OZk X-Received: by 2002:a17:90b:4f8a:b0:1e8:9018:dec9 with SMTP id qe10-20020a17090b4f8a00b001e89018dec9mr12260755pjb.89.1654665082416; Tue, 07 Jun 2022 22:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654665082; cv=none; d=google.com; s=arc-20160816; b=aYqcahwsFNu3l1p9S4UtE6oUzYb+6ZfYz9Z7o0IrUowqZ7z2L12nN0z4MZc448zICt MZJhcDowxAY+5Ob4SAiXN+X4W9zlMuYvC/4j27fLfUk+c42ylreAmCosV0MI+ZnmZDcM TY8gxJWcXXa9yUqFfTEPs/2wmSmqzwu0MyOSeRbZmiBbklYjx/avK+UIrkPyy8y0VoSR 0YnOBHrgvziQTR42bp1taflmyZTAEjVOBKyji5XO9CY6UpLNKbSi9Gy2neVy7nJGuLRq Pdh3gMd3257Li11zC6t2Ylz9KaVC7OfxodTvj/9SEgIN98+bgNlbVaJKNAZ7eMDeSjwP gmlg== 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=CO6l/wG0+aoEM1YitW/0+Zr5Ro8CLzdDD9Xyg5ysm10=; b=03cfZ2xVIl1X+75zdLRedUwQvX+Pv5QYShFC3zALYfhF30PW0jadr8N5UlUQX7J2Gy bmml1UfOrh6A4snVkJ73jQA+yvJhF0bWM9cYJhy/rQRnoyg32NxfjH/u4Ywe3jBw/L4b FxSYglejNDYp9ENzq90hr23kWl+X0ghk9jrVpWiW4kC/A/pOY0nqZRUzzD6kCLJWQxOY cKp2N5RaxUK9QhvPnufp+8HoX3Ppk5bKgKyViGfVrfV+CnGtODM8MZZOcA9JazZpzPYU F5hgXKsvdA31plqkhDVjscBTNGTr8X6wXxggNtcqHqz5p1A84uQHockBwqmNY5GbNhr0 eeoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=wZqH09y9; 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=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x37-20020a634a25000000b003816043efd3si27597563pga.456.2022.06.07.22.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:11:22 -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=@quicinc.com header.s=qcdkim header.b=wZqH09y9; 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=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 431D42AE9F5; Tue, 7 Jun 2022 21:41:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243150AbiFGLvT (ORCPT + 99 others); Tue, 7 Jun 2022 07:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243200AbiFGLvE (ORCPT ); Tue, 7 Jun 2022 07:51:04 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B48CB226D; Tue, 7 Jun 2022 04:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1654602659; x=1686138659; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=CO6l/wG0+aoEM1YitW/0+Zr5Ro8CLzdDD9Xyg5ysm10=; b=wZqH09y9QbUHd0vz9KuDEwwiFQRCpi5NP01HJNAntFrXib5Fl5ONvHCi V9nU7YLJpAhwXtDEJ5nfOQ9+On3uEreGvVU4VEgQvp0bYmIR9ePGhNnBE 1PTsNf3jub53Ea4BSRXHE2/71HUsIVOhOneJGQy515XS1I3SRpYydEyRV A=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 07 Jun 2022 04:50:59 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 04:50:58 -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; Tue, 7 Jun 2022 04:50:58 -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; Tue, 7 Jun 2022 04:50:53 -0700 From: Satya Priya To: Bjorn Andersson , Rob Herring CC: Lee Jones , Liam Girdwood , Mark Brown , , , , , , , , Satya Priya Subject: [PATCH V14 4/9] mfd: pm8008: Add reset-gpios Date: Tue, 7 Jun 2022 17:20:10 +0530 Message-ID: <1654602615-28849-5-git-send-email-quic_c_skakit@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1654602615-28849-1-git-send-email-quic_c_skakit@quicinc.com> References: <1654602615-28849-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: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Reviewed-by: Stephen Boyd --- Changes in V14: - None. Changes in V13: - None. Changes in V12: - Move reset_gpio acquiring above probe_irq_peripherals in pm8008_probe. 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);". 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..5a670b0 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) @@ -233,6 +235,10 @@ static int pm8008_probe(struct i2c_client *client) i2c_set_clientdata(client, chip); + reset_gpio = devm_gpiod_get(chip->dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(reset_gpio)) + return PTR_ERR(reset_gpio); + if (of_property_read_bool(chip->dev->of_node, "interrupt-controller")) { rc = pm8008_probe_irq_peripherals(chip, client->irq); if (rc) -- 2.7.4