From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC9ADC4646B for ; Wed, 26 Jun 2019 03:44:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97E2E208CB for ; Wed, 26 Jun 2019 03:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520689; bh=nmVqm5LCFkN57JcvZZ3jWRa4TbV2CnF7sjsDTG8/21g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ceppqNWXMIEW/5ZlfO4XreTboD0hNSMFwNE8q6dBuD1KXozOiFTY7NX0SsYZJEj5b 5svEE9z6kCPRodDbTjm2jfkHcWoEBZIkWpA404CkPvF0O1CQdvtV1713RpOf7Zs3Bg 050qkVhchBCDD5HerYVoPabeSTk2CVbUjxEKy7b4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727655AbfFZDos (ORCPT ); Tue, 25 Jun 2019 23:44:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:56152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727651AbfFZDor (ORCPT ); Tue, 25 Jun 2019 23:44:47 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-98.mobile.att.net [107.77.172.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D428205ED; Wed, 26 Jun 2019 03:44:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520686; bh=nmVqm5LCFkN57JcvZZ3jWRa4TbV2CnF7sjsDTG8/21g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h+d9muqx5owDHTqM/1JOEvPotDZ3iXA8KlXFXDgzC0vEzSxjLTBc3bNyvwNP6EMCu AHaU2SWdxE6BHXzo1u2cerRx8ddd95dqd09hhCjcYwGLhZTb3Xeux+GuBABc7IyqlI vw3YJoy22nkQ/0f8oq4KukHesgeM9lzC+90XfUMk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Linus Walleij , Chris Packham , Wolfram Sang , Sasha Levin , linux-i2c@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 28/34] i2c: pca-platform: Fix GPIO lookup code Date: Tue, 25 Jun 2019 23:43:29 -0400 Message-Id: <20190626034335.23767-28-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034335.23767-1-sashal@kernel.org> References: <20190626034335.23767-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Linus Walleij [ Upstream commit a0cac264a86fbf4d6cb201fbbb73c1d335e3248a ] The devm_gpiod_request_gpiod() call will add "-gpios" to any passed connection ID before looking it up. I do not think the reset GPIO on this platform is named "reset-gpios-gpios" but rather "reset-gpios" in the device tree, so fix this up so that we get a proper reset GPIO handle. Also drop the inclusion of the legacy GPIO header. Fixes: 0e8ce93bdceb ("i2c: pca-platform: add devicetree awareness") Signed-off-by: Linus Walleij Reviewed-by: Chris Packham Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-pca-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index de3fe6e828cb..f50afa8e3cba 100644 --- a/drivers/i2c/busses/i2c-pca-platform.c +++ b/drivers/i2c/busses/i2c-pca-platform.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -173,7 +172,7 @@ static int i2c_pca_pf_probe(struct platform_device *pdev) i2c->adap.dev.parent = &pdev->dev; i2c->adap.dev.of_node = np; - i2c->gpio = devm_gpiod_get_optional(&pdev->dev, "reset-gpios", GPIOD_OUT_LOW); + i2c->gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(i2c->gpio)) return PTR_ERR(i2c->gpio); -- 2.20.1