From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CFE0C433FE for ; Mon, 17 Oct 2022 10:00:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1YXKdcx4sBSHroEycTFDt0Xcj92tmMnVOC6Abx1dWHs=; b=3hHsLHE/JjgQC2 i0eaKcclFwRuzIfpECq3qjER7nxIRQWtAhLP25YD+XghdCeAOGowaq/P5XWmnN/hdmTYKed5Fwbrb NgcdKqFV9Rm9uLXbB/DTcbLITjpyikqaAlN3xP8YppccH5ykee2QSdVjMK/r1X3jgrMI+3aYxnd1T 8lP8WhUmarS/eSqFCQD3Q/KyPFVcu3bzma2YyAZA2qyyw+E0Rtwqkl+TK+sH6yhN0KKB2I7RKiol4 dC2VnuB94WWhcV9j1eK/31w0AJRqEVSMCCxeqb209n/kEN/kb7DOgPVt8k6Ef81vSmdX8Ez3Qmvso ZD4ggJytHJpQi+5kLRdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okMuV-00AAO1-GY; Mon, 17 Oct 2022 09:59:51 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okMuR-00AAA8-3R for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 09:59:49 +0000 Received: (Authenticated sender: kamel.bouhara@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id E234520008; Mon, 17 Oct 2022 09:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1666000781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/ju2ruVMd5poDtskfrZUzVLBoJhl/wGS81SOZUQfqfQ=; b=KXcSgIRB+yXNgvOUpibHDIBwJ7zhesMHhzi6kG/9/KKb4JMVwnSKTgMDEm9zS6eE4Z/eDB rPj+ZvLW1M0HdLjRlrvXxAHD5DAOSQ0VlLAquwbeHNIaVl5vk+ugfw6/9DUaJypkx6xJKt Z2VfxJMCOhiNu1+OUNih+ZG9XdfEzuTSDlv4w8Vgshtyf2KJKfKv4BuY3ajvwvH7H9QrrL dtP5HlL18nETzeX978wzTTzoBZ+/iHv/ysfSq9IGCa4qhCNgfNXzjw0cI8Su55F5oZd0/T A+xugTsJnrxPQUZF6+U8JtOSqj0CfvdTgF1hAcaadcWGKtov03dq52PZdwgsxQ== Date: Mon, 17 Oct 2022 11:59:37 +0200 From: Kamel Bouhara To: William Breathitt Gray Cc: linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org Subject: Re: Handling Signal1 in microchip-tcb-capture Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221017_025947_303271_CB335D9E X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Oct 15, 2022 at 09:52:27AM -0400, William Breathitt Gray wrote: > Hello Kamel, > Hello William, > I was looking over the microchip-tcb-capture driver recently and noticed > that the code doesn't seem to account for Signal1. In particular, it > appears that mchp_tc_count_signal_read() and mchp_tc_count_action_read() > don't check the Signal id at all and just assume they are handling > Signal0. This creates a situation where the information returned for the > Signal1 sysfs attributes are just duplicated reports of Signal0. > > What exactly is the relationship of Signal0 ("Channel A") and Signal1 > ("Channel B"); is SignalB only relevant when the counter device is > configured for quadrature mode? Indeed both signals are required when in quadrature mode, where the signal0 is representing the speed and signal1 the revolution or number of rotation. We have described all availables modes in details in the following blog post: https://bootlin.com/blog/timer-counters-linux-microchip/ Regards, Kamel > > Sincerely, > > William Breathitt Gray -- Kamel Bouhara, Bootlin Embedded Linux and kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel