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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 48FB1C606C1 for ; Mon, 8 Jul 2019 15:27:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21E6A20665 for ; Mon, 8 Jul 2019 15:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599665; bh=1y6TrxPpo4z/VeD6N4ELESCYUlwBI91glaQM5xDDCtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=IY+x59gg0Mjr2P7/vE2QoM+eCp9cSO4U81dHct+LovSEZimcOZ6+COj5PzQxIt5Se UKVtSTMLgxpeW72H2oz5ohJnCfq1iYHnoB95R0bA7hak7vVmx/Q9LEz3uRpXNh6+oY 2SSZtxYqUlgPJgVGnXTqsLgXYzBf/3wpqquQ5YBw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389128AbfGHP1n (ORCPT ); Mon, 8 Jul 2019 11:27:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:55924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389116AbfGHP1l (ORCPT ); Mon, 8 Jul 2019 11:27:41 -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 42EB320665; Mon, 8 Jul 2019 15:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599660; bh=1y6TrxPpo4z/VeD6N4ELESCYUlwBI91glaQM5xDDCtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ViqgjE5JbFzlO51oDc9wuwlzQfLuFXhr9K0nepVfEtEbMM4+7jdTyCdPv08mK1df1 ocZbGth8JRx37IUShICr7s86NHKwO9Vxh1hikHge8bvD3fh5y3bmDM8lLzAPE/j90C sIsZFIW8EomDmZrSdftAwjr//5TzWkuPXJUKW7L4= 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 4.19 33/90] i2c: pca-platform: Fix GPIO lookup code Date: Mon, 8 Jul 2019 17:13:00 +0200 Message-Id: <20190708150524.275620662@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150521.829733162@linuxfoundation.org> References: <20190708150521.829733162@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