From patchwork Mon Oct 9 20:53:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 115303 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2984446qgn; Mon, 9 Oct 2017 13:53:43 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBH5RxChme3V9qwtQ2O/dgC9ukLCZpqnBYy6hVYGHhtqDdvf4zJ2QgOjPhkXIxxr9sLanIy X-Received: by 10.98.149.71 with SMTP id p68mr10982449pfd.311.1507582423764; Mon, 09 Oct 2017 13:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507582423; cv=none; d=google.com; s=arc-20160816; b=q22prP1FjCdvTevITRVt6bIKRTNh2RczD8JtsWxjirlxanaNIsIcuRWs24KjM+Wuhm SzUAbAcoZBSJhfWK16s3IhiTuG1DCy6Sj3ojjko1fy4V2og1iTtPLbtcRhjis0vuX5wN 1TwKlPwGX0QvCMfRDHdNrhROEX1LMkXMG6SL8g4F/x98KOL6vwsW1lpVUz9Y/jCsP0rd PJd9TSs3714O4exKFjb+3+VhzhTimx/Yvdly6vY/4fluWCwYEvSysr0wMJcZph2xjL41 7XGbQ9UqaJSq/ovu53DmsYmhRx+7ypDt3TPExz+JTRLRJ1uaihm1Z/42LNGfhzVCkBvd qHTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ulRALeWpGvMjopoMgVuZq+otjY/zVBJgKWzjFcAPvFo=; b=Cn788QVctBJ2Yaug+EjRSFcHANdNA47UOZEF/rhkZuzyiOZffce08WBPnU4ReRBzzB 8UFT8tAvos9b40V2OkXSuocRc9xUV3RyrCVG7RFe9rio+Ly9JAbn/ExsEcstMrXzGlxx OJf9Aw3w/SVhmObUB4NJ2f0NLmm/ZU15pYba1a1ehqlUxpAR+38DVOJjL8s6yEIezMH+ N1D0bSIBrUhNY+BK2S6WtTApwQMtNLZE4Vmad2013WCpT+HugzSLxlXNn2D0Pr1WL4GE 6o5Vb2w8Q9UqP+vT0aF+TMvYSyCRgWF6p3EpIDfuV2r9Nq1UROhOyDSG1LYtFXMunx6J /oYA== ARC-Authentication-Results: i=1; mx.google.com; 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 a62si7730287pfb.349.2017.10.09.13.53.43; Mon, 09 Oct 2017 13:53:43 -0700 (PDT) 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; 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 S1755085AbdJIUxm (ORCPT + 5 others); Mon, 9 Oct 2017 16:53:42 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:44571 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755039AbdJIUxm (ORCPT ); Mon, 9 Oct 2017 16:53:42 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id C7F762092A; Mon, 9 Oct 2017 22:53:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LFbn-TOU-1-209-191.w86-201.abo.wanadoo.fr [86.201.56.191]) by mail.free-electrons.com (Postfix) with ESMTPSA id A291A208C1; Mon, 9 Oct 2017 22:53:39 +0200 (CEST) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , linus.walleij@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH v2 0/3] pinctrl: sunxi: Start to enforce the strict mode Date: Mon, 9 Oct 2017 22:53:36 +0200 Message-Id: X-Mailer: git-send-email 2.13.6 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi, Here is an attempt to enable pinctrl's strict mode on our pinctrl drivers. Indeed, our controllers should have had that mode enabled since its introduction. However, there's a number of issues with old device trees that prevent from just enabling it for all the devices. There's basically two of them: - Most of our old DTs have a pinctrl node for GPIOs, which will result in an error when the driver is going to request the gpio because it would already be requested automatically by pinctrl. We cannot break those. - Some of these GPIOs also need to change their pin configuration to add a bias or change the current output, and there isn't a migration path. Let's just keep the old behaviour for the old SoCs, and enforce it on the new one, and enabled it by default so that the situation at least doesn't get worse. This has been tested on an A83t (strict on) and an H3 (strict off) board. Let me know what you think, Maxime Changes from v1: - Duplicate the pmx_ops before modifying them - Disable the strict mode for R_PIO as well Maxime Ripard (3): pinctrl: sunxi: Introduce the strict flag pinctrl: sunxi: Disable strict mode for old pinctrl drivers pinctrl: sunxi: Enforce the strict mode by default drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun5i.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c | 3 ++- drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 3 ++- drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 1 + drivers/pinctrl/sunxi/pinctrl-sunxi.c | 13 ++++++++++++- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 1 + 13 files changed, 26 insertions(+), 3 deletions(-) base-commit: bba731ac5505e73c9b0681762ee0cfa52ccfffed -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Chen-Yu Tsai