Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp869091rwb; Wed, 14 Dec 2022 04:01:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf780lLyAvV9RDUa9wQMKkw8Xa0LH104uZuK9gQmggZjOz64jS9sY3Ks4E9WoBS5ColVIV28 X-Received: by 2002:a05:6a21:9103:b0:a3:9aa3:c060 with SMTP id tn3-20020a056a21910300b000a39aa3c060mr31739350pzb.53.1671019316511; Wed, 14 Dec 2022 04:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671019316; cv=none; d=google.com; s=arc-20160816; b=VlgnoDyhnqjLRYrNHBAjWllXjeu6PU1OTnY9ON5tVw3MIx1xxWgC4gPOYOK/yryz7W qfEJsiwXJ+3hJjUR3WFeGeODgwLuql0KU/rPACach1GCltZuzk2AlXio0+JkhJdMKbaF JpHgrZL4Xuk1igT4tFEbr6WwbCcRtjmMajR7MT1sTLCya1TAsz9VC3klNxifZ60FYPMd y+llKbV/kq2kJ5t+PmroNpf7IDpWzOa2vlUjT4ZJgCWavxeSaimrcSIV3gC87aNKYOH2 d8YKGjITHWrbYEICGzBkKr/JExWeIrI/VWBBs3MjdpAUyt84fDnbuXhnqWzJdOCQfevk L3jQ== 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=c67tFgjZyTbXLcjFa1LSt865ViZuKm6e3UfDSz9QvPY=; b=1CEZSmZ1QXkIM6+ixhzlD3nKV5Cv+Y4NWQy/ZsdWX52L1oEC7T8K0G8Mz1hDnt1UwK t9LI3ALZ+EPUQM0A5aE7O6Vc72mS6UfMkeF2ekhvBTUU1G2GMjDk1r6EdRvoZfSAquqK uIcdfM0owmFg/Tfd5uHq8QEVjrK4mgSuoh7X2uLFolwJEJaMA2w4pY9eA7nKrjkQMcQX RhmPAtLUx95ARDrDvj1jYqzlsrguDDjfoNtmXGhNNDOyAaOg+lkAy15mZMi2zbroK2jq 85QblBbRCiPYWHtZW3fFkbPHSoyVobe/uVF9FQJmhbdqvHoSe3XFFf+DFOEyKQOVk1Ch cVLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jocMIDxw; 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 20-20020a630314000000b0047882ff26basi3968444pgd.475.2022.12.14.04.01.47; Wed, 14 Dec 2022 04:01:56 -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=jocMIDxw; 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 S237789AbiLNLnT (ORCPT + 69 others); Wed, 14 Dec 2022 06:43:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238332AbiLNLms (ORCPT ); Wed, 14 Dec 2022 06:42:48 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BCF420F7D; Wed, 14 Dec 2022 03:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671018149; x=1702554149; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ABJWidSLQnkvGeJdDDPuZHC7hKijESz9RFton+Q9SLo=; b=jocMIDxwA0wsCpe7lxqJYXP+vnQ15mdZsT7Erdsycgg/tKwqk47p8LKG VlxTCbNK2ObWk0uIUue9iufuaucvAXg2fCS+9mTEmQcKYBat96+hIG6KK fkj9aeCwiWeIwecSSb3O5Wno7xSnaSF3eRJCVgK9ToHoCkhgOiThotvWj 3GMip/VZ/GX9lhiBnp7qeULr0k+IENJtQY6zUnnYRaJA1UHgYfwcE9HJ9 GBMO9y2YCeeibCcy0rfLiJjIHRYkkS+7DPSub33+/IR8zJ6lRkjcizak/ mrFMvEMfga/KojfhjNwsv63YIxitn1tSU95MwchnKzW2XQs7cJyZQZfIM g==; X-IronPort-AV: E=McAfee;i="6500,9779,10560"; a="345451351" X-IronPort-AV: E=Sophos;i="5.96,244,1665471600"; d="scan'208";a="345451351" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2022 03:42:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10560"; a="681488896" X-IronPort-AV: E=Sophos;i="5.96,244,1665471600"; d="scan'208";a="681488896" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP; 14 Dec 2022 03:42:24 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p5Q9W-009mWy-3C; Wed, 14 Dec 2022 13:42:22 +0200 Date: Wed, 14 Dec 2022 13:42:22 +0200 From: Andy Shevchenko To: Hanna Hawa Cc: jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, jsd@semihalf.com, linux-i2c@vger.kernel.org, linux-kernel@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 1/1] i2c: designware: add pinctrl for recovery info as an option Message-ID: References: <20221214102707.60018-1-hhhawa@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221214102707.60018-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 Wed, Dec 14, 2022 at 10:27:07AM +0000, Hanna Hawa wrote: > The current implementation of designware recovery mechanism fit for > specific device (Intel / Altera Cyclone V SOC) which have two separated > "wired" GPIOs to the i2c bus via the SOC FPGA for the i2c recovery. > > This change add ability to get the pinctrl for the i2c recovery in order > to switch between pin configuration (I2C and GPIO functionality) if the > pinctrl exists. ... > + rinfo->pinctrl = devm_pinctrl_get(dev->dev); > + if (IS_ERR(rinfo->pinctrl)) { > + if (PTR_ERR(rinfo->pinctrl) == -EPROBE_DEFER) > + return -EPROBE_DEFER; > + rinfo->pinctrl = NULL; > + dev_dbg(dev->dev, "can't get pinctrl for i2c recovery\n"); > + } Can you explain, why pinctrl_bind_pins() is not enough? (You may also refer to the ab78029ecc34 ("drivers/pinctrl: grab default handles from device core") for more details.) -- With Best Regards, Andy Shevchenko