Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3876603rwj; Tue, 20 Dec 2022 03:13:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Ndtv1TOBaPGaKvDRmhXBpqo/rt4n/Qxu1GIFpUqeSgGx0LxhXkJkmvDq4X7wfoq9MXyab X-Received: by 2002:a17:902:8c8f:b0:188:f9e2:7da4 with SMTP id t15-20020a1709028c8f00b00188f9e27da4mr43950187plo.27.1671534816699; Tue, 20 Dec 2022 03:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671534816; cv=none; d=google.com; s=arc-20160816; b=nWVs1DSdZMqzMPPz8M6eh2F4/XBOP/TrZhTglPQ5cAA1+8ud3XYd77ocvWASOqLHko Bpy7x31PXtbIoyEhiydYxrEsJZIBqQiygB7sYXw6c82QAdvDmeOG6ocDBeve4nJCxgdG fdgF6mtJz1gZ7SoyQuUIp/hgFKibWUJimk0d4q8WilM7NU195l3OZEVX/S3X/fVeAaWL WR8CpzxOdKYZYCbIZHhFNc3Q8shSexNgSTDlUsPkOOR6a5kHmoUzdGMszlhDdlnVtmMN axBKNONK07mXHM1aHw1eLlomSa3cOcefSQmqFWxzz/rG7da+GbQZ3kKQQSU9d5axsFqX h/ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=pGsoWK/+s5baLW7j0UtwlMDg/+Np7SBqjmRiKR2Hkmk=; b=m+sb1zOuR4C7bYeUYirRBjrL3jZGpxgjI4pPdwxrfgd7mvA+E9Db1GWFzii78Vicjv D69xUV3jZad1hp+tb4fdu5HjATZZzWy/jVP8iDZQpX3I80me0N9T3TeDsVHAbgnIqg7W eoU9yvaOTuSuKW5HD7lVLlHjBDquEd0C19bAAMYemKb1RLXj8my6UH98lE9/t0VkX4Eq 9hOK+H0fIrBveRLTH8iYhfM/FY4BGitnTaqrDJHCMlVz9DpEpIbV+omVxo0IwQcKY4h6 HHIEebQqN3+5D7T+69Yc+Xq2QarmlWOBYIDYHldVXeslR3tmcZH2Gu7Rb7lAZwfZT4Kt dPPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=b+B01QdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x7-20020a170902820700b0018996404dd9si5248510pln.267.2022.12.20.03.13.27; Tue, 20 Dec 2022 03:13:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=b+B01QdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233507AbiLTKxi (ORCPT + 70 others); Tue, 20 Dec 2022 05:53:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiLTKxg (ORCPT ); Tue, 20 Dec 2022 05:53:36 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9777186BD; Tue, 20 Dec 2022 02:53:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671533614; x=1703069614; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5Z8MBPZB+ZK2HRknMDeyqvMRYRdmnVfz8oCMD9fMC5s=; b=b+B01QdLOae6SdOtd/f5gyaemaLod+dBRNu+pduUq2j8BaVGQY3abQ2t fLlWeBjlt7jG0mnKTdkG5M6Y0DLVROee+KnqqdEioav4Qm3P4R94vrulR jZ6nji7naftVh/7pEJLS1H7XmJcFkVqeXMW4Z3lHnf2O7mTOafoZtO9YX xob4R8PWG/72rplghS2+AMpkWR45iOJsYxsBNvBVWova+wFg4iMBZrMHV L7cfcrfICre6ObAIR75f9FDi2wzdlDqyyljirUBHdmXC2oMy3XyeNLE2C 11WTTQB2GAypAB3T8MsWQMRQG/E5kwb8sfP0Mgg2FhvwyGY/4DlGHK82o Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="319637062" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="319637062" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 02:53:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="758032678" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="758032678" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 20 Dec 2022 02:53:31 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p7aFV-00Cpal-1K; Tue, 20 Dec 2022 12:53:29 +0200 Date: Tue, 20 Dec 2022 12:53:29 +0200 From: Andy Shevchenko To: Hanna Hawa Cc: 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 v3 1/1] i2c: Set pinctrl recovery info to device pinctrl Message-ID: References: <20221219193228.35078-1-hhhawa@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221219193228.35078-1-hhhawa@amazon.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 19, 2022 at 07:32:28PM +0000, 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. > > Added new API to get the device pinctrl. > > Signed-off-by: Hanna Hawa The same comment about changelog. Place it in the correct position. > Change Log v2->v3: > - Add API to get the device pinctrl > - Make the i2c init recovery to get the device pins > > Change Log v1->v2: > - set the rinfo->pinctrl to dev->pins->p instead calling > devm_pinctrl_get() > --- > include/linux/pinctrl/devinfo.h | 11 +++++++++++ This should be a separate patch. ... > +static inline struct pinctrl *dev_pinctrl(struct device *dev) > +{ > + return dev->pins && dev->pins->p ? dev->pins->p : NULL; GCC supports Elvis, you can use it to simplify the above. > +} -- With Best Regards, Andy Shevchenko