Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7151068ybi; Mon, 8 Jul 2019 15:40:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzR9dUyUQ3YfxtZ6M+yjxggF/o1R1x4curBTiQz6L7ekdRbWgdlBWIR+Td0ET06hm9gbHfs X-Received: by 2002:a17:90a:9bc5:: with SMTP id b5mr28786928pjw.109.1562625629988; Mon, 08 Jul 2019 15:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625629; cv=none; d=google.com; s=arc-20160816; b=alM+yip/MJOGJIeYPKfPRbOjjrwuB7/0mxDr7QUfMVAikgpAMCCw7tEYqKHvRB9Xcu l3BpRUsUgcrRr91T74QyzQKQjhmzrLzzVGyWW7Ro8OjPUDXkJTDrGfd+KbI9Ue8nc/Ij TimC1SgiXjJjcHlN22uaSfXEorbrYAvx6KxnuoEeMgzHRz+AegICs0ivunO32Gqw3mQ6 HTMbbEQTq0GluKXU0YwC9IKyH5fJcJRJQWStn0+b+vYCcsEOflT9EmqGwRh6nfx99wD+ khuSIZqmjGv0iCTj+nYUHDjsLHOyiZT9Ur2yryeTacc5+Qd9ZkdpSnQuLqJW8oKCgjg7 HVYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cgne592m8HrulQg68Em0WiVxQq7fDKEy/2SBS5KlmxA=; b=AOJT5DujXPZDog5631/qP/em7xVxMq5GI27KEln+iI7z8a94ynb9Nwc1u5dxxgzqef nMupG73HfSE5xNNG4mUpLwiIM5t4uLvEcyXRjJDFCqnxHbvC3xZHMv8nj+RBE7yFidUr bcBtEOKyvkdC4Fp8kbCZIrEFa0Y7SldcBhCpZ2N3A7AacAmn3f0J+8udjEybDKF1TDIg SAdAzZE3NM2tJarFUKPx3j8lDaJnTKS4UrFDFb/9a3HLnecyVYVbx87JGcXAIka9YqNN D66pfIg3SVmzmGbSFRUloP9p/yozTXj1GQuwuEUNL/KZEzQ30opnzL05zX/cHZ/zjXSj eiTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hc8PLI2j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j33si19342116pgi.89.2019.07.08.15.40.15; Mon, 08 Jul 2019 15:40:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hc8PLI2j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390880AbfGHPfE (ORCPT + 99 others); Mon, 8 Jul 2019 11:35:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:37214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390655AbfGHPeu (ORCPT ); Mon, 8 Jul 2019 11:34:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F19FF204EC; Mon, 8 Jul 2019 15:34:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562600089; bh=1y6TrxPpo4z/VeD6N4ELESCYUlwBI91glaQM5xDDCtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hc8PLI2jRy20ldAzu9exvzxgnLEh5iCGOvPFtT7FbSO6qWbnX5a+84RuJEgFatCLQ /jFfDJh3qrx6E4hdltMPNGIFdF+BL2c39BJ663aNHUbDvJIKun8FTMhlApzxyPTQun HFo/AimHSqvRf4Tf7wVzDkwtMF1itjPj35BLIEqk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Chris Packham , Wolfram Sang , Sasha Levin Subject: [PATCH 5.1 48/96] i2c: pca-platform: Fix GPIO lookup code Date: Mon, 8 Jul 2019 17:13:20 +0200 Message-Id: <20190708150529.113774328@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150526.234572443@linuxfoundation.org> References: <20190708150526.234572443@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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