Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2118189rbb; Tue, 27 Feb 2024 11:08:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVXFJCyXIgdZwARPa4z52tm0ak9XI1sxmzpynIs1VHvxah91Md9VhGrxpIVxk7kWx8KiHfc+Xxmk+VvzcPz6HeC0QciAwc5Njdb0QthVA== X-Google-Smtp-Source: AGHT+IFMB9UGGDvzAZ0OlM+sjpoa3h4g275Ghl6gAclLu3fmqMinckMKj2CvtNu2wFznnRTmNTX0 X-Received: by 2002:a05:6e02:1b07:b0:365:267:8cc8 with SMTP id i7-20020a056e021b0700b0036502678cc8mr13389503ilv.19.1709060887660; Tue, 27 Feb 2024 11:08:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709060887; cv=pass; d=google.com; s=arc-20160816; b=EDaPYG707/WTHYOYKFuQxu42vIqn4slF6eO8DT5W63axvDY03H5Bd/uZOj1uRrMX9N I1SzkKzXdof7u45dlAc1aqB9tl3Katk1Fj8RcLhQGUE6bKZMG5BbEPj5yrocMRpdLWWA 2sFT8R20IG49tXgR95Ta336vYHPMzsK27CYORAxBUhbNKRIqYSXr51rPneVE4dRNa1L1 M6WMnentVZHFAXLMf2qjVef03/ZQR3Aw0KvHN6n+QTjsPEu0nQp8B4X1O1UkL7NV8wdr Vdh+Uz4pTodWjSM8KICR9TSDd06/4G3O9HNYGeWn9bvsSkHg13D/59Me4agoJPOhn122 NBWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date :dkim-signature; bh=J+lAqKhYUF9TljeztpJRjdIXUl0L2+EGsWChef77WSI=; fh=e1BirOvIFt1We8AZvrevgdCOlhZ2uDBWJKjTS6m35so=; b=CCTVkMqv276HkjyBXSG3TV/T+538BiEkHTOe3mRt3wOgT7+F0+4gVZdo10kqC7q4Nh JQMuin/IIH55Swmr5sijQiVuCGxZgd6cKNPmQyLImxjP3ExhKvtULs1L41ymJLawzSOh 0QLnm7PGFYfhzuMVrTv2kr4upo6RUj3AKVnPhMla9GuiQU/dft99u7SnTkgnIB15MPJ9 PoV59oH8xqRIxubrnP5B+1dvogx4lYDSvGO5iuTn93y7SIzv1pXYimi1xWLeSuHK7ZPV xTbamucxV2+Riz+n8GxrjxWldBJHA+gKdL2tDd+6CRc7lCbfAUaz0ObrMEq0UmMoRztG aF/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dniY1zKx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-83433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k6-20020a632406000000b005cecd95b6besi5877881pgk.685.2024.02.27.11.08.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 11:08:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dniY1zKx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-83433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C6FE9B228A3 for ; Tue, 27 Feb 2024 14:53:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12E9D13B797; Tue, 27 Feb 2024 14:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dniY1zKx" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E6BE54BFE; Tue, 27 Feb 2024 14:53:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709045619; cv=none; b=XV3KROtYH4/r6SMWdkE8D+GwnK0bLoxsUWrBmcOw3BRIS3P7sNfVpuv7x1A53ba+lBsQPucnvViHz33l4TNW9sqv4EceMr8VB2sXHv7OQyCKlz5uJ1myHLQp7qDIi0P1ZLrk6RNvYqVR6KYL4Bef0cUHk20X/01iIL3Tt+9rXUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709045619; c=relaxed/simple; bh=7/HCLIxM8m8H1jm7lU/8tplk21ZMnEDIzNTpS1ZlOpY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Mv5VkgcmVSI5SInGNSBHB/MN5ZJZcJtr2jAHfkmhrhtnpK+LidAz3ZphrgeLI1Ugaphza2mop4Hhqp4ZJhWlyzCnX+lSgO3iy2QjzNeJxGp/8bG4jTiQ2Ozc3ls1zrh3i4uRvw1OKIv4ez2n7sMLusVrW9oUEqEvG3cK90QpRNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dniY1zKx; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709045618; x=1740581618; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=7/HCLIxM8m8H1jm7lU/8tplk21ZMnEDIzNTpS1ZlOpY=; b=dniY1zKx53x/l8Jx7pQdXo+PH7oze7L9oX046VkrPn5AF++5/48IhiwJ J39lwlvK8T2gr99OQvRbBFNKOWR4HQxUMLumo3/MAl8vu7Ob8TSiQ6x1u WgBMQVzvF8/LDs2rlFJi8cOMPxLI528ogDOZXfIqRtMcjHUwqTWlvWOV3 t79XndhikQMgXIuj/H3mkUrrLu59xCiSRJfgSukzgaRu2K8jFlI68+u3b Oo7nIgY0fFYnEGsIH0VNIgur5dgSj/ZsMiKVuohy1lqxNjP4tBOwz+qKn 7OGVLERrpIHOPM/PM2ljsv3Mity/oz+YpT4iSnAywx6BwVoy4UY2hqUUn g==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="14537331" X-IronPort-AV: E=Sophos;i="6.06,188,1705392000"; d="scan'208";a="14537331" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2024 06:53:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="913914249" X-IronPort-AV: E=Sophos;i="6.06,188,1705392000"; d="scan'208";a="913914249" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2024 06:53:35 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1reypo-00000007yED-0xt7; Tue, 27 Feb 2024 16:53:32 +0200 Date: Tue, 27 Feb 2024 16:53:31 +0200 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Arturas Moskvinas , linus.walleij@linaro.org, u.kleine-koenig@pengutronix.de, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: 74x164: Enable output pins after registers are reset Message-ID: References: <20240226134656.608559-1-arturas.moskvinas@gmail.com> <3f629079-6809-4cae-bd4d-8b0ee4860196@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Tue, Feb 27, 2024 at 02:14:40PM +0100, Bartosz Golaszewski wrote: > On Tue, Feb 27, 2024 at 7:58 AM Arturas Moskvinas > wrote: > > On 2/26/24 16:01, Andy Shevchenko wrote: > > > On Mon, Feb 26, 2024 at 03:46:56PM +0200, Arturas Moskvinas wrote: > > >> Move output enabling after chip registers are cleared. > > > Does this fix anything? If so, maybe elaborate a bit the potential behavioural > > > changes on the real lines. > > > > Chip outputs are enabled[1] before actual reset is performed[2] which > > might cause pin output value to flip flop if previous pin value was set > > to 1 in chip. Change fixes that behavior by making sure chip is fully > > reset before all outputs are enabled. > > > > Flip-flop can be noticed when module is removed and inserted again and > > one of the pins was changed to 1 before removal. 100 microsecond > > flipping is noticeable on oscilloscope (100khz SPI bus). > > > > For a properly reset chip - output is enabled around 100 microseconds > > (on 100khz SPI bus) later during probing process hence should be > > irrelevant behavioral change. > > > > [1] - > > https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L130 > > [2] - > > https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L150 > > > > Arturas Moskvinas > > And this is precisely the kind of information that needs to go into > commit messages. I can tell *what* you're doing by looking at the > code. What I can't tell is *why*. +1. Please, add this to the commit message of v2, also try to find the commit that you can mark to be fixed with help of Fixes tag. -- With Best Regards, Andy Shevchenko