From patchwork Thu May 30 20:24:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 165463 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1438318ili; Thu, 30 May 2019 13:24:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv+pP261nvKDBu0cVB6lMue3CURb5QQW88oRV0fS8Yn9HAhoZV3C6UilH3VhC1dSqI+3OB X-Received: by 2002:aa7:99c7:: with SMTP id v7mr5542701pfi.103.1559247872458; Thu, 30 May 2019 13:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559247872; cv=none; d=google.com; s=arc-20160816; b=XcNQLPx0e6uEMK0RccKicwIGRDtuxgjh4SfTFBSW74AZgqbaQ+RDnMthMODQSo6bOk opgbOOmp+HD9cEK2iS9TKBstnPSXQR+NiRxlw1RR1uo9g4TqCiKcxu2XMgztUxc6+Q3G 4ecVTPAzzYgpFjX/p9ZRn80DLL7fI3GEgxyu0SVOmJqxN7kyfr/EZ6+OKULW40H0xbsb Drgh7skLNIqySp3gFkpypTuA2DXgRPWaAp1ylRl7f6ff7phmsLb3N17aBgF4KfBHtCN3 roMSYMHE47+aAeKRgJwCImAWVt5tnfQLAb9UOJkXtoMJa3TCO/r4dHgln9Re9tfxjJI4 PqRA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=gxwr3xbO19CasYGAT7+jegs6MVWG/SlYD1TekcW6ZEA=; b=JN4liIiJyc1eop/YPhAsw9s82o2N1u84IXhDfZROTAj/i+SCfOXojBxBP0uezgqa1T ErjFRoKdraeiNO+lSOybLqmZPptg2Mc1VYYCT3/BP1Uu0U51fml5I33pL/hORsCO2F/k 636aAFJhOVC2PsNyjoAS2i1F1W/8toxOJOTKrUDM2m8w74eO6IZJCdfPurovXL24hAQy Nid6AMThy0D6e17MF6zquySpJ5/IkrrSq3abxs+wiiqxXVC6qm9Dvj4U+0j5Ix2ZbcLf Zmqz92o4FvYtttPmK5amPQ1DJkqcAkHfk483Arh3o84CE8OetBiDxjvLvYlPi33xP1jK /Nmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SWRBHHR4; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si4778190pfq.10.2019.05.30.13.24.32; Thu, 30 May 2019 13:24:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-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=@linaro.org header.s=google header.b=SWRBHHR4; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726285AbfE3UYb (ORCPT + 2 others); Thu, 30 May 2019 16:24:31 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33248 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726080AbfE3UYb (ORCPT ); Thu, 30 May 2019 16:24:31 -0400 Received: by mail-wr1-f66.google.com with SMTP id d9so5051897wrx.0 for ; Thu, 30 May 2019 13:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gxwr3xbO19CasYGAT7+jegs6MVWG/SlYD1TekcW6ZEA=; b=SWRBHHR4QADF09rs4t6qSm0wb7qRZhgiQCk3Bvmg3FV8GetUkxN3BEENYMxKK6reUM F6a5aLmd4zu5L2gnvjpSYRz1yFWYtTxxvKEe682QgHI7+sfqyYRle5VZYtdfEV7o+3oB h5U86P6Dl8rgTMy8wmJLLh0kVTlg2VZJzlAYRuYSgxmp59ndERlqJkGuQRdz+vtcx0NW j78mnwKfYpJyraeDh+hwUFS+Bg7KhbWqpkEZzDWG2poYFlSYmPtcmv51xZeEx/G64+LL b5G7f0DLe/+K7W5Gj2CCzenoWCgdnLAAYFjFl8flrV/OiWA/ihujIG2yoWVObhCtAMPb d3sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gxwr3xbO19CasYGAT7+jegs6MVWG/SlYD1TekcW6ZEA=; b=ZSly7t4YQJhTuAV7h8rY3L+6NUCZANa7m/q+1irvvTHTZUsbKK9Vv+bnervaGXXDOr sunInFRdcVTRP/rDEtGeCic8Y1temII0eIaMG5ERkib0oTQJ8b4t2Gasf39S8EYZyvkH VQQrQxpY2htw88bAyUgcVB6TiINTXl5tEjgOltua2psUL4HQx/kICHfMyg9SxFuiPgyQ d9zCrobrimOavmallexDA/eO9eZzk5sV9vDjiTOkzf9z/foDjQmZ4CQ3o+pSp6/w58yk 3ZCFlzq1H9ebD81wEghJfudV+em7ep3ATgN0Yl28kqbiORi96ea5eXdcTMnzdVIEc0Dc MTHA== X-Gm-Message-State: APjAAAWQc251pm2kWcNGHaY4s+iBW52hEOQeVqv7BZ9NiiuB3K8zVt7W BuqrVgYcwX47j4uHvr2VUlueYyN2H2M= X-Received: by 2002:adf:cf0c:: with SMTP id o12mr3826396wrj.182.1559247869790; Thu, 30 May 2019 13:24:29 -0700 (PDT) Received: from localhost.localdomain (catv-89-135-96-219.catv.broadband.hu. [89.135.96.219]) by smtp.gmail.com with ESMTPSA id y2sm6409472wra.58.2019.05.30.13.24.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 13:24:28 -0700 (PDT) From: Linus Walleij To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Linus Walleij , Chris Packham Subject: [PATCH] i2c: pca: Fix GPIO lookup code Date: Thu, 30 May 2019 22:24:24 +0200 Message-Id: <20190530202424.13937-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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") Cc: Chris Packham Signed-off-by: Linus Walleij --- drivers/i2c/busses/i2c-pca-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Chris Packham 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);