Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966577AbcDLU7r (ORCPT ); Tue, 12 Apr 2016 16:59:47 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:51132 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933798AbcDLU7m (ORCPT ); Tue, 12 Apr 2016 16:59:42 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Wolfram Sang , Linus Walleij , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 10/56] pinctrl: sh-pfc: only use dummy states for non-DT platforms Date: Tue, 12 Apr 2016 13:58:28 -0700 Message-Id: <1460494754-32183-11-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1460494754-32183-1-git-send-email-kamal@canonical.com> References: <1460494754-32183-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1719 Lines: 45 3.19.8-ckt19 -stable review patch. If anyone has any objections, please let me know. ---8<------------------------------------------------------------ From: Wolfram Sang commit 0129801be4b87226bf502f18f5a9eabd356d1058 upstream. If pinctrl_provide_dummies() is used unconditionally, then the dummy state will be used even on DT platforms when the "init" state was intentionally left out. Instead of "default", the dummy "init" state will then be used during probe. Thus, when probing an I2C controller on cold boot, communication triggered by bus notifiers broke because the pins were not initialized. Do it like OMAP2: use the dummy state only for non-DT platforms. Fixes: ef0eebc05130 ("drivers/pinctrl: Add the concept of an "init" state") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Acked-by: Sergei Shtylyov Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij Signed-off-by: Kamal Mostafa --- drivers/pinctrl/sh-pfc/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index 66dc62d..741e3ea 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -531,7 +531,9 @@ static int sh_pfc_probe(struct platform_device *pdev) return ret; } - pinctrl_provide_dummies(); + /* Enable dummy states for those platforms without pinctrl support */ + if (!of_have_populated_dt()) + pinctrl_provide_dummies(); ret = sh_pfc_init_ranges(pfc); if (ret < 0) -- 2.7.4