Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2008713lqo; Mon, 13 May 2024 05:32:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyCxg4Qyln6diuBCpn8ej2ZSPHQ+u/v5Nfg0aCQ4koOFbyfo19d0YXXk50NpvYw9nSFT50Pr4VlQ+32wgpZnXfLwPw8KWOVGT3XqhjgQ== X-Google-Smtp-Source: AGHT+IE/Zsj7FEjnTDZA2HWFmqXktFlmjOjUA7cJjqO2keqmMkU0iwCd4LT2lDQomU/Adv96RHap X-Received: by 2002:a17:903:41c9:b0:1e1:3300:702b with SMTP id d9443c01a7336-1ef43d1558emr106927455ad.15.1715603544552; Mon, 13 May 2024 05:32:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715603544; cv=pass; d=google.com; s=arc-20160816; b=eNMEqaZoEI0fCUUvK6O2JdZ0okP1i760bfbyVSXPJKWP6PJ57DAiUg2MamZK1vC4qS 7Pe8lCGc209kFC8hQUQ+oXBhIvvlUhxGEP2UrB2v/dtjvlj81VySQ2UfTobs5owDFe2k aYPMf1Tyt8uKnCQej97ii8ROVIYMRnJEQg9VoZ5ca5xdL+KKQSrwQkQTdTBJFuycV0/X DQ5lTMM5ydVGuyNYTtZ0mfbyMEt42ujz8lTamz5tOy/vG12wWhS6GyiNEZ89u4TTAyEE NhQ7NEjrZg3V4NWjI1WfuH+v4OgCsfxe5p/vErgdK/DKVgkxgjjY2Gz389mLR7vb1P+O REUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization: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=xnmIFBXcdpdt+cLQdDsaNKH1oSUW4QqSa8m/WqOVhho=; fh=KYNA/QjkdAOCnGNE8L4AKhp3jYt5d+RdY78r/9AUbR0=; b=e7/PwzuKYZwjmpIt705cTau/eJ0tin0Xk1QHq1cvUXdxAa67ffAUg4BBdtW1ozIkea 6I1d/UQzY1NHMOgXiW8fWcz+/ffI3s7BHqhD3mj6frB7krXKfSf8v0v4DfJ9kbnjy0yx LbNJ5gxetrCWvO+RVRCsmRmFcPTEGDC04YNw4UGOWuECzRiWln9mzwWUDlJz4Qb5TfYH Q1UJqkJn1iRTjJ+/oUMX0HM629gLQqrqRG0QvavvqKl+3GQbbwwewuT9EwcgN8DdHvmV 4x4CDgAtyOl9GcaitY2t/rborvDTiqdXP4gfECMPlXtY2+Ows69gYCEMePGhvwHbPyui FfrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N64xO3GZ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-177496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177496-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 d9443c01a7336-1ef0b9cf479si91993535ad.1.2024.05.13.05.32.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 05:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177496-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=N64xO3GZ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-177496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177496-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 E8B57B22BD8 for ; Mon, 13 May 2024 11:20:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 161E614C5B3; Mon, 13 May 2024 11:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="N64xO3GZ" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 E53291487DE; Mon, 13 May 2024 11:20:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715599221; cv=none; b=VWD1W4BgSHaXTkxa5lt65ZqnPJLKQepSzDEgsFUHdY2G8vZDgzrO8eSzU51Jfwn1SkpzwIohsNP9WpdsENJbQr+UbsLXYJXML4YvrpsLBZauMABjJC2YZg3/YRxtuw4jysFIfU5GXo9n+ZyEWNR5sIXaBtkvl0FqzVkk9hkpSu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715599221; c=relaxed/simple; bh=RH4wkxhYNMrJGXF3Af+Oo/w1xDf5vFVpf71RPqH/jJ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dThPnUARbyMic1xbIqk1RM2XAEzwM1kuHbOgBwdpbANvaXnR9/bEpXwrCNIzr8WUrUTaytRIHM/sXiaAYEJii3jckeyZP9wheKX+mmPeMYPin83A4+SOQqnb9BOarmcQ21l2E2ZOaIEsxlee9IJK1Ex6Z1BZJ1/DBGH2VRiMEcc= 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=N64xO3GZ; arc=none smtp.client-ip=198.175.65.18 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=1715599220; x=1747135220; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=RH4wkxhYNMrJGXF3Af+Oo/w1xDf5vFVpf71RPqH/jJ4=; b=N64xO3GZ3owZy6uMOVYjpGhIL9x/eKQYJI/60d8DvjDXnxf3rcV055q6 mTixYGtHjQ1BXYEKxS/Y8GXbakDqvsMzKCOmyWpFhO6OgU7w7YyyVvgkq +2m0O2ZfLHhA0JPnzXrGXXlALW0smIOu0sR0Vm0mDNVs0I15a5XiJb8sI q0tXH/vbW1CrY1Xr3Kb2Q569y6J9P1KKfSszpJPBycCN/L3J8zca745B1 tn0p1U5TQuE02TDEoyP8ZYj4d4IBibJfZGsHZOjJdQqguv/qPIA5h65VV DYffnE0e6W9o65/H7KEbw0MDuJuLkpRm30ykkt9QMp4jhDIC2tQhvdaH2 w==; X-CSE-ConnectionGUID: kQ4ma5zSTQGmRJtf/aopiw== X-CSE-MsgGUID: xKfj1rizQ++dJkB6ubkgCA== X-IronPort-AV: E=McAfee;i="6600,9927,11071"; a="11688044" X-IronPort-AV: E=Sophos;i="6.08,158,1712646000"; d="scan'208";a="11688044" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2024 04:20:19 -0700 X-CSE-ConnectionGUID: J/4b2f0ARZOReGHXD88oMA== X-CSE-MsgGUID: AtogBFklRTOPGTXqvev16A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,158,1712646000"; d="scan'208";a="35067355" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2024 04:20:14 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1s6Tj0-000000076o9-0ukO; Mon, 13 May 2024 14:20:10 +0300 Date: Mon, 13 May 2024 14:20:09 +0300 From: Andy Shevchenko To: lakshmi.sowjanya.d@intel.com Cc: tglx@linutronix.de, jstultz@google.com, giometti@enneenne.com, corbet@lwn.net, linux-kernel@vger.kernel.org, x86@kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, intel-wired-lan@lists.osuosl.org, eddie.dong@intel.com, christopher.s.hall@intel.com, jesse.brandeburg@intel.com, davem@davemloft.net, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, perex@perex.cz, linux-sound@vger.kernel.org, anthony.l.nguyen@intel.com, peter.hilber@opensynergy.com, pandith.n@intel.com, subramanian.mohan@intel.com, thejesh.reddy.t.r@intel.com Subject: Re: [PATCH v8 10/12] pps: generators: Add PPS Generator TIO Driver Message-ID: References: <20240513103813.5666-1-lakshmi.sowjanya.d@intel.com> <20240513103813.5666-11-lakshmi.sowjanya.d@intel.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: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Mon, May 13, 2024 at 02:18:49PM +0300, Andy Shevchenko wrote: > On Mon, May 13, 2024 at 04:08:11PM +0530, lakshmi.sowjanya.d@intel.com wrote: > > + pps_tio_disable(tio); > > This... > > + tio->enabled = false; > > ...and this should go together, which makes me look at the enabled flag over > the code and it seems there are a few places where you missed to sync it with > the reality. > > I would think of something like this: > > pps_tio_direction_output() ==> true > pps_tio_disable(tio) ==> false > > where "==> X" means assignment of enabled flag. > > And perhaps this: > > tio->enabled = pps_generate_next_pulse(tio, expires + SAFE_TIME_NS); > if (!tio->enabled) > ... > > But the above is just thinking out loudly, you may find the better approach(es). You might need to introduce pps_tio_enable() counterpart, in such case it would be more natural to have enabled be assigned accordingly. -- With Best Regards, Andy Shevchenko