Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1989275rdh; Tue, 26 Sep 2023 09:04:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGowRpNUtHWBrapGTO7YnLIZnc8DizJka6Y5IHH41DA5cvADhfC5LiJYjsRjGvCCvbbMpog X-Received: by 2002:a05:6a21:819b:b0:15d:7ac9:447a with SMTP id pd27-20020a056a21819b00b0015d7ac9447amr8219055pzb.52.1695744282989; Tue, 26 Sep 2023 09:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695744282; cv=none; d=google.com; s=arc-20160816; b=RfPRztL0RpkxXXG0VS6RaOpLpliXUoNqz6+8mD+swPv40XAdDtUmhqffE93eCEmyUG Fspw3UVJ9tiJxrjUeZS+DOl2reAn7e+ZbVpWsuUDkye3f5SY1xfklUNyokitZ11dYKLH ZwA4JsGTNjhUFP49hbrdSw2D4fS9ZZVUmAeiSP888EG8gcQs9VBO5NIZSRsMYYfHvIls nb7YkIowk6+f9zcGXIRIEKaSp3SuVdFCLxt2yDF96aIdnujDKXlwG6OCK16G4gLlkhz3 ilsbjYGwzrhzbL81Eu30l5SRdRSOvXDnFOWqowjYfOBqyfleO5EBket78w6g8x/AdAvT svBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MYMcbgNdZdJAg/wlBeRETTfly0wLMXAdsUptQLiijU4=; fh=N4pcfyFfpVhTfDKcK0IHsEZfQsOTsr7AWcfiLFhVTUA=; b=HhqVD+UIX/xVel9FMOi12e9XBiKJuOROZFAoyrcTaKIUJmJRQCahumOPCWx4EO3XXj nbbK0H3vAstG8GGvNlSemDpvZUya61WbxFCUlr7B9UWPhhHC6qeypDBLHe4H5YP9aUA+ OUJE0Jtcl3xxTyWY8QX+wBSrwd+86dLScpA9PpzDM7bKMb4luQwgpvLTZig8Oz1bMu14 umL7Jb2SHYTUBHufHAWFyvvJkGPhcpIVOy/Qh9Rjx0cQihrovoDNvOBFXRkTFil68x8i 6HVep10bmSFkPaJJh1eesxOb+DhlfB8s9zttZwjyVAZrUpO+WJHEkKNg4Dzw1EMpYgJ/ mC9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura.hr header.s=sartura header.b=FYKpupAN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=sartura.hr Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e10-20020a056a001a8a00b0068fbbef790bsi13608262pfv.297.2023.09.26.09.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:04:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@sartura.hr header.s=sartura header.b=FYKpupAN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=sartura.hr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E5BCA81DDBE4; Tue, 26 Sep 2023 09:03:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233487AbjIZQDJ (ORCPT + 99 others); Tue, 26 Sep 2023 12:03:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235102AbjIZQDH (ORCPT ); Tue, 26 Sep 2023 12:03:07 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26DB3192 for ; Tue, 26 Sep 2023 09:03:01 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-533d6a8d6b6so7221778a12.2 for ; Tue, 26 Sep 2023 09:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura.hr; s=sartura; t=1695744179; x=1696348979; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MYMcbgNdZdJAg/wlBeRETTfly0wLMXAdsUptQLiijU4=; b=FYKpupANHnEtEcLPfvQwwPO4rAmRxa2/GzHC9FOWnXa9XkOvqcK9C4hUe1NsnQvzWv KWq0MdkGrQXHcxu/dPlfPYb/ANzIOkImFY7YQNWYo4SsEv2LIoPFOduOoR8awKh6a7ji lBaIZ2IT4zyC9Bi0OtJTwAmgDLan+whLhqT6ybmDkabyNv4Luz8ub/S4cMK3UeZvvOpS mwaEXZbSBRKbNiYYTvjDjwmJPHY1QBHFXGHMJVXndibZ1zuErUp+nPE0J9pXQLMcI0/O ddkC7RcjQgbqgubr6Vu2JCT2OKK4zSGE1b/3ktIEcCUTf6U+RAn9YlTBYxZTkYah6JHd lHCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695744179; x=1696348979; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MYMcbgNdZdJAg/wlBeRETTfly0wLMXAdsUptQLiijU4=; b=iuERi/viYy2OxzrEZ7UAB+NW3myCSP8DJ/AjWGWWUOSw6a39iz4vOewcKdMgI4dF8/ YMGdAjFdvIRAZpymYwFhliVjU3JgeCjqRJAKGqlGubqVZn1E/DhVQl3Oo2ENbWjgyVvP VopBtIr0CJi5irzUH/HtNqG0FhHZWYpwWl/DZMTmrkco8MoU5IkG/y5sB9jWtBStbh6b aYL86ivY+3WBzWrU4199dN6+Lf73RLnCZryLHb7Go89T+QLAl2qQZwZcd/mA6crsTmPx wJUZfb6ZkKzA5aEX+6/egXSZuLnwEij4bUMUn5Ra35RLWQ7RUeGbT4Gaz//D/sRPSb+o CjFQ== X-Gm-Message-State: AOJu0YyOaXwb1qFEGcCmKIKaMsMvWg39xKGTnxfCzZuburDK/00dW7hL l4pLjxEZpHdaIW4jl5L5+2/adQ== X-Received: by 2002:a17:906:e50:b0:9ae:7433:aec6 with SMTP id q16-20020a1709060e5000b009ae7433aec6mr8586774eji.60.1695744179436; Tue, 26 Sep 2023 09:02:59 -0700 (PDT) Received: from fedora.. (dh207-99-138.xnet.hr. [88.207.99.138]) by smtp.googlemail.com with ESMTPSA id d4-20020a170906370400b0099bd8c1f67esm7980174ejc.109.2023.09.26.09.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:02:58 -0700 (PDT) From: Robert Marko To: wsa@kernel.org, codrin.ciubotariu@microchip.com, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, linus.walleij@linaro.org, linux-gpio@vger.kernel.org Cc: Robert Marko Subject: [PATCH] i2c: core: dont change pinmux state to GPIO during recovery setup Date: Tue, 26 Sep 2023 18:01:20 +0200 Message-ID: <20230926160255.330417-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 26 Sep 2023 09:03:12 -0700 (PDT) Ever since PXA I2C driver was moved to the generic I2C recovery, I2C has stopped working completely on Armada 3720 if the pins are specified in DTS. After a while it was traced down to the only difference being that PXA driver did not change the pinmux state to GPIO before trying to acquire the GPIO pins. And indeed as soon as this call is removed I2C starts working. To me it seems that this call is not required at all as devm_gpiod_get() will result in the pinmux state being changed to GPIO via the pinmux set_mux() op. Fixes: 0b01392c18b9 ("i2c: pxa: move to generic GPIO recovery") Signed-off-by: Robert Marko --- drivers/i2c/i2c-core-base.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 60746652fd52..b34d939078a1 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -359,13 +359,6 @@ static int i2c_gpio_init_generic_recovery(struct i2c_adapter *adap) if (bri->recover_bus && bri->recover_bus != i2c_generic_scl_recovery) return 0; - /* - * pins might be taken as GPIO, so we should inform pinctrl about - * this and move the state to GPIO - */ - if (bri->pinctrl) - pinctrl_select_state(bri->pinctrl, bri->pins_gpio); - /* * if there is incomplete or no recovery information, see if generic * GPIO recovery is available -- 2.41.0