Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp870842lqp; Sun, 14 Apr 2024 03:35:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXE1qfcRVhljEOM/fdIf9CFBOMifYl5QdMiGWb/8laJorOPWNiMrZvXjyZmK2m8G1XkMCVsPB90YV/VxsZWnM0nmOROSVbLSbnRaJzTrw== X-Google-Smtp-Source: AGHT+IGtaVwwdgSbFsCTZQmrOMvkClTWo7kSNpBIxRcH3MdIBy1dKxeLMQRVcEMveveft3aXkCGA X-Received: by 2002:a05:6102:1493:b0:47b:7034:da5 with SMTP id d19-20020a056102149300b0047b70340da5mr2622128vsv.10.1713090908544; Sun, 14 Apr 2024 03:35:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713090908; cv=pass; d=google.com; s=arc-20160816; b=Zsj9PyN0wACgQEsQz8s7vG45h2dSEQcbTtet6TOH3TcHGoP7hYl+HA7naQluA2cMrM SQyclTDkQGdNlYcY1vzrE4HEqo/e4piysEWrAA4aD7JGXOGAMq6HShBlmR0TuKOkpjV3 IrDCRENncOMoMeKgwp8yf1XgA4jb++8OHMZQ6O2kflkX9TUQZeTjcqrZ7cOTjei9xCqE 1HaZhr44TOLppFxcQWVy1Be+7E6EBkEfWvJDgVehpvYTndHHjO53SYfR1gpfwodnhKRP kOWn0igLsmHX17fE8NLC0OSsJYOJOq2V3Eyq1qO6uK0NvVivYp8UWFckwmUqq7DF++Sw xCdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3UQ++gxwD9lwMiCPaVI4itHAEaPjf5P2ziIdw7YNOfg=; fh=7p3E6+gnow+s6ZS8zJQCwPf9pxOEW7y37LTwvJe2kn4=; b=ztaSiuzX788uxj+TtsVMkECHuMQ/VDXUwocXsm7+Z7aEVkuS+AyKevYmdMDHDUVNWD qZSG24TTjkRKb9GDjbcO9bInvNUlMXoLXBqLDWU8SzqIJ9Q5Fx0jawguB58IMaHjDI97 /BR0XZobe+edsmpoqZnCqhRqU/KIl/bqUvTUza9D//9pOVO/VUmkhueZk2JS9jEAvTu7 LZVQ38NpCXZE0OLG8+9Nypay48FtQtzFzxEIXxZjvUm082aqePAZ2qXcsAigwttdG9LS pYnN6+KASrtx0lr6ZLWbKM+uKhqbGv0s/9FnT1r6nmZ7qVvHJfJ1Y/SlLajyvnXDS64O CPsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TbVAWPZW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-144105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v8-20020a0cf908000000b0069922e9d38bsi7441143qvn.383.2024.04.14.03.35.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 03:35:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TbVAWPZW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-144105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 477C11C20A1E for ; Sun, 14 Apr 2024 10:35:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 459F92E633; Sun, 14 Apr 2024 10:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TbVAWPZW" Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E018A1AACB for ; Sun, 14 Apr 2024 10:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713090900; cv=none; b=YsHd4we4T7hnSTq1D1Nybg8vhUmMZ7eys8Y6uRwxTRWcRcOTlhjlFyttDl95w5RNMjp8H7ozigA7DxpgW+/kNWaBKH+1dMHDimFP53Hy6alforRkXza2tPkHlMH3ho8Q5GOXfxeCokgRjPh3aSFa5X0xkSJG3xYDl7bFuro2gc8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713090900; c=relaxed/simple; bh=ZN/2Rkys9GxS+NsmV9Oq0Mou1cdT+ldCxQlnc+6y1vY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GREboflD4fxWBG2o+ukbpJk20bvF5xt7xaUDTeyy3yC4xFGmpyUNqQHD6lL3NvMxtZp3kPYJ5r0UX09PtiG4SHBQ+6f+SoMkimHvjNEBIW4Rk0LdEBfCCzk2DXnqYDmaWfTFPZoEgkch8OuehGjJpIAX1SzRy8roQnynQcC5PXI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=TbVAWPZW; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-518e2283bd3so141735e87.1 for ; Sun, 14 Apr 2024 03:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713090897; x=1713695697; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3UQ++gxwD9lwMiCPaVI4itHAEaPjf5P2ziIdw7YNOfg=; b=TbVAWPZW99jP3BcNiP677lo1DMX1oAodpK5mNVpNgxzWVzIUrMLna3n4c6jHBjNjRU Q8M1errvEFlQHPBG4TBwM/aFv0uElPUC50G1OqrIOnWy74ueKkquWYSgHtqFi7EGi0m8 Ju4nTuWqKjVgPu3FCFOl4QoHxL0qLt4rYferqAtydtyc+0i+ztZwklrstSOcG910W2x0 CDbkxRhtIbVNNxhcX5XbXndb/VZkAJtqChDA+3yltDkGtSrEZB+rq2WGW9VHvd5LBIpA Vj4E7wQBUqERVFfqTLgbJHUpwnVh5MDk8XCSyK4jTClY9sA1xQo3GeRqFxNAZ6Lken/r w/qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713090897; x=1713695697; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3UQ++gxwD9lwMiCPaVI4itHAEaPjf5P2ziIdw7YNOfg=; b=W6lVysKCKE6zMj5F8lOZO3XshwAtvsNHqubBvuk3aZ5F92jhDNx7ot/Zo3KJCaUOhK JcuTWfoSVo7uuzYyXyQ89hVT9gB6JBYt99Sq4Ir0Np/cEd48WUxbM/0WU2VPdrNdls8N 6P+HHOUrQgBFVVm98RJ2XfZpESY9BMeexW2NIpm6AQX1ItwmQjJ7msNZPb3iUSKp5jRS 72+bLuSxDRTzNR38Ft/1HliWeKQWljmHGLHlwcP/ytueQwxJAfCeNP7WHrhEwkGSBMoX lKroD9rRteZVuIFMacgxMvxeIuOjhT/G/rCSUg8EikYJJ5lhpiAgSqgu7DXZSnEgFzFT 8PJQ== X-Forwarded-Encrypted: i=1; AJvYcCXpXc0KGwLCClZ52xhVAMEVZfY5q/dnPYxom0oZsze5PgzxEXhyrAAKGR3XAT4Ub6gAhEzlK7hhB5w76US31jcOQ1gmPJSPtadDZkhu X-Gm-Message-State: AOJu0YxaVk4IXJvKpIaUuELr1NETB7wHni82OvME06cnG8ua5IN1LQMa rnBRVxOPwvq2wCGxJHiMfw7W49BdxjWWVvoo/Ne8c84O3wiJxCNQNujzOggu39w= X-Received: by 2002:ac2:53b3:0:b0:518:c2a5:5a3b with SMTP id j19-20020ac253b3000000b00518c2a55a3bmr1372919lfh.46.1713090896785; Sun, 14 Apr 2024 03:34:56 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id ne33-20020a1709077ba100b00a51b26ba6c5sm4032596ejc.219.2024.04.14.03.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 03:34:56 -0700 (PDT) Date: Sun, 14 Apr 2024 13:34:52 +0300 From: Dan Carpenter To: Robert Marko Cc: Hanna Hawa , andriy.shevchenko@linux.intel.com, wsa@kernel.org, linus.walleij@linaro.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, dwmw@amazon.co.uk, benh@amazon.com, ronenk@amazon.com, talel@amazon.com, jonnyc@amazon.com, hanochu@amazon.com, farbere@amazon.com, itamark@amazon.com Subject: Re: [PATCH v5 2/2] i2c: Set i2c pinctrl recovery info from it's device pinctrl Message-ID: References: <20221228164813.67964-1-hhhawa@amazon.com> <20221228164813.67964-3-hhhawa@amazon.com> <416340b6-33a9-4b9e-bdc5-c5a9cffb3055@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <416340b6-33a9-4b9e-bdc5-c5a9cffb3055@gmail.com> On Thu, Apr 11, 2024 at 07:08:56PM +0200, Robert Marko wrote: > > On 28. 12. 2022. 17:48, Hanna Hawa wrote: > > Currently the i2c subsystem rely on the controller device tree to > > initialize the pinctrl recovery information, part of the drivers does > > not set this field (rinfo->pinctrl), for example i2c DesignWare driver. > > > > The pins information is saved part of the device structure before probe > > and it's done on pinctrl_bind_pins(). > > > > Make the i2c init recovery to get the device pins if it's not > > initialized by the driver from the device pins. > > > > Signed-off-by: Hanna Hawa > > Reviewed-by: Andy Shevchenko > > --- > > drivers/i2c/i2c-core-base.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c > > index 7539b0740351..fb5644457452 100644 > > --- a/drivers/i2c/i2c-core-base.c > > +++ b/drivers/i2c/i2c-core-base.c > > @@ -34,6 +34,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -282,7 +283,9 @@ static void i2c_gpio_init_pinctrl_recovery(struct i2c_adapter *adap) > > { > > struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; > > struct device *dev = &adap->dev; > > - struct pinctrl *p = bri->pinctrl; > > + struct pinctrl *p = bri->pinctrl ?: dev_pinctrl(dev->parent); > > + > > + bri->pinctrl = p; > > Hi Hanna, > I know this has already been merged, but setting bri->pinctrl breaks PXA > recovery. This is patch is a year and half old so it's a bit late to just revert it... What does "breaks" mean in this context? Is there a NULL dereference? Do you have a stack trace? It's really hard to get inspired to look at the code when the bug report is so vague... regards, dan carpenter