Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp251137ybd; Tue, 25 Jun 2019 20:45:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDdbkiyi1Yg1mSE7EqI/HfoXZ7a+BcyldltTt5uJ9HCf24061UmL6FFs68PcN4PBINkunJ X-Received: by 2002:a17:90a:bb8a:: with SMTP id v10mr1845006pjr.78.1561520747379; Tue, 25 Jun 2019 20:45:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561520747; cv=none; d=google.com; s=arc-20160816; b=DsM62+7zKaeUGcfq/FbQ0ik1+WK7XwTmzr85RB4GoyxuXJXxuqRuv1MnH/LxfPybt9 RonkWUpeTbfx5Xg/km6Zkz37M6VvvClvJ1rrvoICjTdVn6er0DGzrYtavi650xfErAEX co7ePALVODAplrGVtcjgKyWQrMb9DfROZQ1UFx9QFCX9QYfGuJbpf/m/IA1YeB7QLQpb LqCAZqPdSkXFhBUmgFz8Xy+Rh9KM1M26iRVVapK8SYN7SnQ1G9PgVLhafQi6uaFuvRd+ No5tMvgdCoM3fT1xc5eYWRKFRPo0s/qSODewTouVDe9qRQqjAsAoJEyJatwy2143V3pK fR+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NXxLr4yx0yVqadku4pcp1mrmAPqCb5lvhjjznexwIdQ=; b=tGRy8JijYMK3GzKBVy8RvgCFj56ARJsMs4+FgTWdfr0tcT5sHGJKxCt+RNVH8ewfnT otd7HPpMZfe3RzSpSs2nmMPNTT9nw5SyyMUjql+sehBWjnV+OQBcS3m69pzirC64vdRm 90RM+G4/Yq9ejPytq/lHdvrpZ9so5cwGH6BVkF/uLYlgsdeSNTnBeN2SV8lP2ldCMF+O +mPTUZjJTQOthOiqWl6XrDfzpDfzfop9nCOyR6t6Boq1Y7DnQmSZO088W8DNj8ETcx2R 64xLSJKrYqG1cS5AjyppFsY8bZEd0uXS05CNWZmky5Nwcw4lgvQODKoLUk9fCd0gfT/H rKNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Oj3KhlkT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g23si16003492pfi.153.2019.06.25.20.45.31; Tue, 25 Jun 2019 20:45:47 -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=Oj3KhlkT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727336AbfFZDn1 (ORCPT + 99 others); Tue, 25 Jun 2019 23:43:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:54508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbfFZDnS (ORCPT ); Tue, 25 Jun 2019 23:43:18 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (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 C988F20659; Wed, 26 Jun 2019 03:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520598; bh=nmVqm5LCFkN57JcvZZ3jWRa4TbV2CnF7sjsDTG8/21g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oj3KhlkTDOL0SVQQZacBz9WkB7BPKTbaqBnuvXFQ7uAJLPHgG/PlrUnUowFxeXCAP d9Sk0HUBa0nlUWJjt+DTkxorCPO5mRTe2M8LE4E2CGp/A57H8OfJ6kVNijYqd7+Szj T0ihNz78K1g3kdPBR7qH3RbEPFSEcQUwK268yK8k= 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 5.1 44/51] i2c: pca-platform: Fix GPIO lookup code Date: Tue, 25 Jun 2019 23:41:00 -0400 Message-Id: <20190626034117.23247-44-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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