Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1967635imm; Thu, 2 Aug 2018 04:13:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdIZKmsHWFKYjQOTuf6bLSvlL0w6slYqwIBjS1sdcZx858XG9vWlsK91ZjHW0jkhKEscj3C X-Received: by 2002:a62:34c4:: with SMTP id b187-v6mr2463770pfa.15.1533208408369; Thu, 02 Aug 2018 04:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533208408; cv=none; d=google.com; s=arc-20160816; b=ALNT36RdX+dVgDm/Hy6OQBW/MwVc/WzCbOc/bheaVGQuN2QxyIXmwdTlom3W2obkI/ jKKW7XeGnfEQYJ7Z4Q+2VorDqQUawvcm8J+91lRi52BIYSdV1v0WqxcrUaj7b6NJonBV IOhwJg9dhPmktbVQY1xgUWcy82qdUsxaoa8AFONu1h1/YIzAW9RcbXdhgI8ONfboK7fb 0WI4IAV2ovjKvZK9h/LfrRsFd7mkOCK2G3lRsiOvy1WNMuukp1q9+4ovH6W94YbiqOs9 RiKIuhEoXX9goOZXi8ZTYtnh1kuiQ0Jx9U3aqr3PrgdQwThEUF00z4ErNQ+nXrRX1EFk bWlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=ZnKNfg2FkoBzleSCEQnev6xVyvhZvYN0+QMbtw7RHh4=; b=pGsBJqcKO62Ug0K1b4PvsgaIc2lIETmH9+ict9yK1SIod8cQsmRPL/6NoYiIYQ+6Tn a+f2TupdcmWccFZLHSuD0jrRZZFFPNgf/9wqimABMidVAHzszvQRymdI2/JY6tnYytxZ r4KqMtkovW+lVoaNj+Ap+FX+a2WmpG2nYup6gHR382Y9N959Gx/Ga967qTHAbN5m6Bvj BPkO4uJi5e7jLniX4br8UTRCIMv3ClMfztpcgBz95I/E6DYIFOU4f5ZZ/zlB1+ObXxyd C5+6f9K5NN1hFZJSanLr4FLe5DguWe/g07Q7Fp5+B6gxPnn5Fu9JqsJarlmIuP81KmFD fOQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uQjUx0dF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24-v6si1718950pgk.632.2018.08.02.04.13.14; Thu, 02 Aug 2018 04:13:28 -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=@gmail.com header.s=20161025 header.b=uQjUx0dF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732191AbeHBNDE (ORCPT + 99 others); Thu, 2 Aug 2018 09:03:04 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34429 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732047AbeHBNDD (ORCPT ); Thu, 2 Aug 2018 09:03:03 -0400 Received: by mail-ed1-f68.google.com with SMTP id h1-v6so809440eds.1; Thu, 02 Aug 2018 04:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZnKNfg2FkoBzleSCEQnev6xVyvhZvYN0+QMbtw7RHh4=; b=uQjUx0dFTVIynbm7yZF9XgtqBhTEy6/tig4GsdwaB1uWIwiPSRGWDGxXhut1aphKvD axj3nLSHEPXpR+Rq6QY7LfEeFa0ecVrHV6wXFKZRnHOzbBG27JNPjAYUB/NOgUY9yhIt 1jq0H3/kmcnaBDxG3e4kDggCIifGTJR19UulABB+Vt+oh9draFIyDI0tzubuPzjwGYWn L8d9Oy725LYNgx3MbsD6oaK4q0BxEd316v/B9K4xs+SbCPXBFkIqWFXVe6kqOwJm/2PK mnwfTrAhpnLwKiIEJWKPATR2yHH9TqUP8aqBUweFfASTsYcVQnJUEN19pjis674vbXEh ebxA== 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; bh=ZnKNfg2FkoBzleSCEQnev6xVyvhZvYN0+QMbtw7RHh4=; b=F1jP7J3sPIQOlRmu4FP/4zPvDULf0x7LvG+5jx6+PalCQUOLM4V1K5q3YdfKLg++GJ 9YEhKx3BNPXiBVpyi683raeVzQIFIcyRHA8QOrlU+wle2dLSIYEVBjKczjdFKH5yFO8C AMWqTGbDSNDttjTSI954WaZc1jNkufvDprMP/RmngBulECwyLY6GdZtfZtuCBAw8t0kI a17xHudeekNXwWpyicuu6OAE9mtTQyJWKgheXtTzuymELCuVfsd2Z+qi/u5802psfEi1 Q80YcRyhVHfJRCVwEfdQLv8o/SeKQ3ytpWjbwoPU8jjWPwzqhUC1TsbwiqPzAwuM00ta 7z6w== X-Gm-Message-State: AOUpUlHjxcA7cJ9yCydg/G5k6yHrSoLxB3U1GdLyeZf4ugc0JFS7qE+U DRoQRzqCIMck0VZFjemX3xYO5zF3 X-Received: by 2002:aa7:d60d:: with SMTP id c13-v6mr2839263edr.301.1533208341762; Thu, 02 Aug 2018 04:12:21 -0700 (PDT) Received: from localhost.localdomain (109-252-90-13.nat.spd-mgts.ru. [109.252.90.13]) by smtp.gmail.com with ESMTPSA id c21-v6sm886933eda.21.2018.08.02.04.12.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 04:12:21 -0700 (PDT) From: Dmitry Osipenko To: Linus Walleij , Thierry Reding , Jonathan Hunter , Stefan Agner , Marcel Ziswiler Cc: linux-tegra@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] gpio: tegra: Move driver registration to subsys_init level Date: Thu, 2 Aug 2018 14:11:44 +0300 Message-Id: <20180802111144.12512-2-digetx@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180802111144.12512-1-digetx@gmail.com> References: <20180802111144.12512-1-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a bug in regards to deferred probing within the drivers core that causes GPIO-driver to suspend after its users. The bug appears if GPIO-driver probe is getting deferred, which happens after introducing dependency on PINCTRL-driver for the GPIO-driver by defining "gpio-ranges" property in device-tree. The bug in the drivers core is old (more than 4 years now) and is well known, unfortunately there is no easy fix for it. The good news is that we can workaround the deferred probe issue by changing GPIO / PINCTRL drivers registration order and hence by moving PINCTRL driver registration to the arch_init level and GPIO to the subsys_init. Signed-off-by: Dmitry Osipenko --- drivers/gpio/gpio-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 2d940785bad0..a53c77db9744 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -712,4 +712,4 @@ static int __init tegra_gpio_init(void) { return platform_driver_register(&tegra_gpio_driver); } -postcore_initcall(tegra_gpio_init); +subsys_initcall(tegra_gpio_init); -- 2.18.0