Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1455557lqh; Mon, 6 May 2024 08:12:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhOKKS6yJrf9kIok0Mg/Iz1KMiAuirlnJeblzhKVLyPNORrfdjxAVwOZQfIVFXWiRAnFxqjQ1PmCNTLG6Q1fRWL5HhJfjymRKHmEod5g== X-Google-Smtp-Source: AGHT+IGEC2DE20d6lYSYD2g7qD5INZc1wvB/sFeJWhG5jAXL1rKoeeeaU5eETaGOHpi/GwLzcLl5 X-Received: by 2002:a17:906:2c43:b0:a58:eba0:6716 with SMTP id f3-20020a1709062c4300b00a58eba06716mr5950070ejh.60.1715008364962; Mon, 06 May 2024 08:12:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715008364; cv=pass; d=google.com; s=arc-20160816; b=HZoIBY7fJfdn11gcVpbeIhu096j8i13gUFQYNOiGUS21+orqqDJ5apCJ4iNdDQ1yCy HrvQHd3azC4YKqEZ7y+Yxm/Uje5heP7iMLhQxI+SACRhXHWpBl6cuHFBP/CpO/YhkLlH sUzTJfCX3br2KYHJ20V//u+jxZAoIBdSyG+0c7LGB339r9BCTds1UQQ+xypI/wqwcYNn uZIcHpB/TdLfk2GHJaJg/odvMHOqfvv+KiA33bowSBcIpkTZo4Umv9il4AnzAeS5UuJp 9hggVQXdwcp2S2l58e7z1dgkUUmMMstF8S8CeJdS/S0vLYWH3ZeJ0bQ8T+xwf/W/T8qW LY9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hDHE1HnoLnLGUdaATAQQZQx0gteTjVtZLSTTA83MxsQ=; fh=Wj77nLC6hlOAsb1H1AZQ+yB5J8vH53oH67JdxycAAGU=; b=Su3L8AdUNrz6tL8R9xSOiLNijOYuMuE0LAr9pQk0YQ8mZFyIK8ewRC4ZeSMJCBb2tJ /AjJuPYiFE98HKvTAhVdbXBOCYMlRPghBNAKcGHfE5TmXER/o7jRS1PNvAKYTK+mv8s8 Ncmmdpr1lJdS7G6W5NR/+Ho4MMHBJcEsE3W6+i0PVeaoi/TEDIKJC2VV+xJfVVlrUYgb HKigB/mpW6e/rt4utzvrs83HpJw+a8ljVlJOZWWUyK7Vcrxr5uZa55/nbgKokNyDML/r BNHXD0wqXF86w5p+eRkLs4HjGeEu5GlsjUUYXZdjoGGfVLjRNOXt+Lg/vwKvybeJx41Q oLuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cn4l2ry0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170052-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170052-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t17-20020a1709064f1100b00a59a0503a3asi3371867eju.581.2024.05.06.08.12.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 08:12:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170052-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cn4l2ry0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170052-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170052-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6F7FD1F2410F for ; Mon, 6 May 2024 15:12:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0AF9157493; Mon, 6 May 2024 15:10:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Cn4l2ry0" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B4F615533B; Mon, 6 May 2024 15:10:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715008215; cv=none; b=Has7jwBuG0EGIgNHyS5ntO2vab0xhPpkVmF96/dSasTbNc1gshbUcqS9Wx475OnFEyjHh3aLypLarMpbmK3+j2tdU0WqQPqCKa08yuVGoI2QO750j1d7eVGM5137/9G/FnJU9kfuE+xT2//71TryucvOR5kwh26N4s5tO5e9dNg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715008215; c=relaxed/simple; bh=HmGUGhnzq6QWX6rTJF28CKXiwTy0X3WDlAtZACUyhGs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rmxVa+OlYYoMMwgNkHKQvARPjCiM3MpHvj3mzSsAbiqRbzep835XY8HgSy1P/jdGaAVnGsFvaS7qcB+lUPCPC6l8G/mwuVpCMi55HANENBmie1l/ST/mqHToFarUDNrf+JBttIGR/QWbX4hnGuaXdHYn1P95r2ijOa9/FCdMXjw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cn4l2ry0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC291C4DDE3; Mon, 6 May 2024 15:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715008214; bh=HmGUGhnzq6QWX6rTJF28CKXiwTy0X3WDlAtZACUyhGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cn4l2ry0hKT6yqFRwCGAXb20eJaRxo8ufaXe1rq3p25aXgXmMSXuQxsFcJVw1EBMi m/4k1KXL0hfWhHM5Yxohn/ZexZuaIcadzmh/Qp1/jW1vkmaNNbsfVvinsv2OKNznQ8 P2fzeBtQ7miyec2PfOEZ+z95Fpmjj0L0U7Tv+VT4AvA9llvYfkXoAGfGLtuZNt2ITq m2PaWC9PU8tDkafOWoSfuPhxJPVJmiU/rbzraFwNJDsYiYJXLmAW5LS1TsYgdnu81x +t5zksOxwU1xMQIhbzIcwBT5Cmh+YI49FWJjn0W4seekphkYUo6lWVvuH9KeRIsP95 M2hTBEhF8TC4A== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1s3zyq-000000006CD-0KE4; Mon, 06 May 2024 17:10:16 +0200 From: Johan Hovold To: Lee Jones , Mark Brown , Linus Walleij , Bjorn Andersson Cc: Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Das Srinagesh , Satya Priya , Stephen Boyd , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Johan Hovold Subject: [PATCH 03/13] mfd: pm8008: deassert reset on probe Date: Mon, 6 May 2024 17:08:20 +0200 Message-ID: <20240506150830.23709-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240506150830.23709-1-johan+linaro@kernel.org> References: <20240506150830.23709-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Request and deassert any (optional) reset gpio during probe in case it has been left asserted by the boot firmware. Note the reset line is not asserted to avoid reverting to the default I2C address in case the firmware has configured an alternate address. Signed-off-by: Johan Hovold --- 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 d53c987b0d49..d0f190c2ea2b 100644 --- a/drivers/mfd/qcom-pm8008.c +++ b/drivers/mfd/qcom-pm8008.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -158,6 +159,7 @@ static struct regmap_config qcom_mfd_regmap_cfg = { static int pm8008_probe(struct i2c_client *client) { struct regmap_irq_chip_data *irq_data; + struct gpio_desc *reset; int rc; struct device *dev; struct regmap *regmap; @@ -169,6 +171,10 @@ static int pm8008_probe(struct i2c_client *client) i2c_set_clientdata(client, regmap); + reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(reset)) + return PTR_ERR(reset); + if (of_property_read_bool(dev->of_node, "interrupt-controller")) { rc = devm_regmap_add_irq_chip(dev, regmap, client->irq, IRQF_SHARED, 0, &pm8008_irq_chip, &irq_data); -- 2.43.2