From patchwork Thu Jan 17 10:23:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 155813 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1784289jaa; Thu, 17 Jan 2019 02:23:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN4i56Ag2nHaKxraXjg5c+ZGiIioG0cIb7MJQCeyTkG+SH0QXLJar1sudjP9uR38S9mBljy5 X-Received: by 2002:a63:8d44:: with SMTP id z65mr13016573pgd.57.1547720611501; Thu, 17 Jan 2019 02:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547720611; cv=none; d=google.com; s=arc-20160816; b=SJOxcpYdS0pAnOsgYYsZU8JhRsbnT4aeg6Cr5BQsagwiozDe63gdr2IzBYkNBAqqZc hHrLEo8xvgCuDfHc+9eJw7kCo4kTmpUjDKU8sPVGdeqk0EruX9wLeJn4co0BsOBklxTY GjEP2AflyTxTvM+RXb1hTzavAAuN4jGIhJ8xxUKJVg/cEhSO95nf7Gzg4Z+XUHyeDaAp 4NFPPEGt/U7cwjP59GZd9bgZdQRtokUZIFCtrjFMGptidOvTcAhfEJJdUXRSqPkm9eu4 n8tS3CiWcKiwBoUTHp0Ta0pVXasXxrMlB2mJnGScfXJyGqfZ2JHnfLegQP/aUR51EFQo Qi6w== 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=/Tf+jWcbQvaP/wZHxbjP4tGEHKpoydocGjOeujE6LsY=; b=fUdntKVuBjyebTN8LnuC93hIoqBiAOrGCaQsvVkxFhAo9VhNa4P7OFXbXUwf/As5Wn nNg6NPbk15NIVxW8bBo7/dUamAFCY8o/4SXhr5XYS7XYj6RPFyDFePj7T1moqvDOfV6e q5PkPAXuq/CQde6ARCjOwR20gbxK1b2sijFmRKFbLhSxLmUOQEcCZUD03uyHf/icDwFV sC5w6iFtFa+TD31uu9tMXcPpRdSn9UzqNEX82FfEzWdowPEdZYuqHunXvDYy79ftb8xg ZUjw8tk/2lJ6hWwu+TmbkeQHvm+uzTxL4zY1rmYhm3eluISJ1MkGzTMXer9CARzjbaRO wmOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=YECdKmns; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 be9si1259343plb.143.2019.01.17.02.23.31; Thu, 17 Jan 2019 02:23:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=YECdKmns; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727994AbfAQKXa (ORCPT + 5 others); Thu, 17 Jan 2019 05:23:30 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:36978 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727929AbfAQKX3 (ORCPT ); Thu, 17 Jan 2019 05:23:29 -0500 Received: by mail-wr1-f67.google.com with SMTP id s12so10369695wrt.4 for ; Thu, 17 Jan 2019 02:23:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/Tf+jWcbQvaP/wZHxbjP4tGEHKpoydocGjOeujE6LsY=; b=YECdKmnsLma30+5hkWrT0/AErkw+qY1sW+4PEBA5VOPC3jiyD4mfoO7JIHmc8iFBsC EtYlOtTc0y7kuXV5Yslhbp/mze3r5AzNYQYCo3oBHahOoaJHA9SuDD+KGTZprnVb7d1y gqOR7mOgTpyQmGXveaMybagkJaVIfxpwDvBx3+E8gyDREbSHSX5r3cfb6RJtSnwKI8z1 D7fiXOrbVWV4H2+l6YnuwFg+mT41dt0DtBtpuFPD5GfjL4JgeWcLSFTV7mEeJiUs21GF K6qTTvMdfiG4gfmZsxMq4FknElK5Kt6pS5E3DoKjQYUs9tWhkLvCbfkc6DH2JoJeJ0Eo upoQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/Tf+jWcbQvaP/wZHxbjP4tGEHKpoydocGjOeujE6LsY=; b=eaJsLscrcOMk6eJGd8Uq9xIBXEtdoBCNUYXN81unF6JrXBjtnTjVSFkHY/1mQnBo1L sj2UWKjDBhRxO5mmzbtbEB9jbEcGzuOkONxglAbkGpTw8kAxE9gegBagw21tLiMYL+qY owSaErkrVkFn00gbTHPWxfFb9FoZkixzH/TC6LAzKhFUdxShkCT1B5k7uKI4Vx0AEDNs hCxeKeyNgaqYVRehKwJMl2s3nXkScVSBw6s2cSmVT5vFYhKhhxrFzYTBMdTvJvAUoj1s bRR4yu4NYGEuZmb84Z/aP95vnYDFI8uQ0gpHxgn5CVyOb9SVU0JV9es+NIypWgXMd3dK nNnw== X-Gm-Message-State: AJcUukct8PLqFWbiDvsks16JbwvCArevbXHibHbBHPc5M1gGwJRADogP fFOA0x0iEqx9y8fFLtOc7lI4Uw== X-Received: by 2002:adf:9382:: with SMTP id 2mr11151661wrp.269.1547720607627; Thu, 17 Jan 2019 02:23:27 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id u10sm66400530wrr.33.2019.01.17.02.23.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Jan 2019 02:23:27 -0800 (PST) From: Jerome Brunet To: Linus Walleij , Kevin Hilman Cc: Jerome Brunet , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] pinctrl: meson: add optional region for drive strength Date: Thu, 17 Jan 2019 11:23:15 +0100 Message-Id: <20190117102315.1833-4-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190117102315.1833-1-jbrunet@baylibre.com> References: <20190117102315.1833-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On the G12a, there is a new 'region' to handle the drive-strength. This is optional since the older do not have this. Fixes: 29ae0952e85f ("pinctrl: meson-g12a: add pinctrl driver support") Signed-off-by: Jerome Brunet --- drivers/pinctrl/meson/pinctrl-meson.c | 6 ++++++ drivers/pinctrl/meson/pinctrl-meson.h | 1 + 2 files changed, 7 insertions(+) -- 2.20.1 diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c index a4ae1ac5369e..96a4a72708e4 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.c +++ b/drivers/pinctrl/meson/pinctrl-meson.c @@ -507,6 +507,12 @@ static int meson_pinctrl_parse_dt(struct meson_pinctrl *pc, if (IS_ERR(pc->reg_pullen)) pc->reg_pullen = pc->reg_pull; + pc->reg_ds = meson_map_resource(pc, gpio_np, "ds"); + if (IS_ERR(pc->reg_ds)) { + dev_dbg(pc->dev, "ds registers not found - skipping\n"); + pc->reg_ds = NULL; + } + return 0; } diff --git a/drivers/pinctrl/meson/pinctrl-meson.h b/drivers/pinctrl/meson/pinctrl-meson.h index eff61ea1c67e..5eaab925f427 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.h +++ b/drivers/pinctrl/meson/pinctrl-meson.h @@ -120,6 +120,7 @@ struct meson_pinctrl { struct regmap *reg_pullen; struct regmap *reg_pull; struct regmap *reg_gpio; + struct regmap *reg_ds; struct gpio_chip chip; struct device_node *of_node; };