Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9988948pxu; Tue, 29 Dec 2020 10:23:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKAmr/pDACqdPtAAFCc9Cn1Ydth5j6AA74+sUgoTkB3AdZrXuGv5zaupHCuHwuDrRz7nyG X-Received: by 2002:aa7:c891:: with SMTP id p17mr19691308eds.309.1609266215551; Tue, 29 Dec 2020 10:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609266215; cv=none; d=google.com; s=arc-20160816; b=hAn0A7uNh+O2zymgWjy7BraE4RRXGNf+rhIN24J7y0BbE49IwkTm6PXHBLa7HlL9Ci czljpbIS29U4ycOQsqVy/tFnLGu3uDwG0EZdoA1nAZMTGuuBjjYvZz+j/epOdYGKjLP6 F4bg272n/+ad13uBcL5xsnojcZMlE1YBr5ZbRDZGitz5UVcQ1oplH7KSLNaAISGHEWjj +P72FykjKBbUbQKNVrXbfZmWsFnqUpm6+6LYsHqAfqNmtQJPmkyscID0kSn/kAabB55D v+JxT7OQ9s+J9XrSe6c4Ei7RSgoaxWQeSTHYL5eA63jZKuTvpMGpow3OWfoWxmSqJWGP cY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=y2qmPsZI+JWO6C6Y+yaO9VF0DUahpD//C+tDo/KviL8=; b=VhmJIQ7TtHFeZ7yT9PMC03dy25lT4fMlXbF9yLlgbiz5zDYKFXYZvSQhLpv5mHJBp4 v5L1uSeYHNWepmYLuC3Lm4FUH1RldM7F0cDrPRj7HSWvuWYP9MqUl78xy6Aa2cL32T0k g0pDv/DzUfFziViD4riOLIVg5nTgVpya9Wz32yOt20PdnW5oDoG9ghud9ivtcMcAIA0C qAV1tU73qAHSlyp4ZcSMAnG7W/j2Kyrqw0CXnBogR/iGBxsYQ9rr1CxJPdnG6f7y76hY o9Vq5QB979nwnhYS5ClkeIvNIpPFVtRCcgIF3oa1VXTR91k2+KK3sCqbd5k+t2OqzTmR 9b4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s25si20369396ejz.414.2020.12.29.10.23.12; Tue, 29 Dec 2020 10:23:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbgL2SVe (ORCPT + 99 others); Tue, 29 Dec 2020 13:21:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:35922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbgL2SVe (ORCPT ); Tue, 29 Dec 2020 13:21:34 -0500 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E75FE207AB; Tue, 29 Dec 2020 18:20:52 +0000 (UTC) Date: Tue, 29 Dec 2020 18:20:49 +0000 From: Jonathan Cameron To: David Lechner Cc: William Breathitt Gray , linux-iio@vger.kernel.org, Jonathan Cameron , linux-kernel@vger.kernel.org Subject: Re: [PATCH] counter:ti-eqep: remove floor Message-ID: <20201229182049.3ef72268@archlinux> In-Reply-To: <88a5ed56-ac49-bf64-4d52-8ada6d3af4ef@lechnology.com> References: <20201214000927.1793062-1-david@lechnology.com> <88a5ed56-ac49-bf64-4d52-8ada6d3af4ef@lechnology.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Dec 2020 08:05:44 -0600 David Lechner wrote: > On 12/14/20 5:46 AM, William Breathitt Gray wrote: > > On Sun, Dec 13, 2020 at 06:09:27PM -0600, David Lechner wrote: > >> The hardware doesn't support this. QPOSINIT is an initialization value > >> that is triggered by other things. When the counter overflows, it > >> always wraps around to zero. > >> > >> Fixes: f213729f6796 "counter: new TI eQEP driver" > >> Signed-off-by: David Lechner > > > > Is the QPOSINIT preprocessor define needed at all anymore, or should it also be > > removed? > > There are already many more defines for registers that are not > used, so I didn't remove it. Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan > > > > > Acked-by: William Breathitt Gray > > > >> --- > >> drivers/counter/ti-eqep.c | 35 ----------------------------------- > >> 1 file changed, 35 deletions(-) > >> > >> diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c > >> index a60aee1a1a29..65df9ef5b5bc 100644 > >> --- a/drivers/counter/ti-eqep.c > >> +++ b/drivers/counter/ti-eqep.c > >> @@ -235,36 +235,6 @@ static ssize_t ti_eqep_position_ceiling_write(struct counter_device *counter, > >> return len; > >> } > >> > >> -static ssize_t ti_eqep_position_floor_read(struct counter_device *counter, > >> - struct counter_count *count, > >> - void *ext_priv, char *buf) > >> -{ > >> - struct ti_eqep_cnt *priv = counter->priv; > >> - u32 qposinit; > >> - > >> - regmap_read(priv->regmap32, QPOSINIT, &qposinit); > >> - > >> - return sprintf(buf, "%u\n", qposinit); > >> -} > >> - > >> -static ssize_t ti_eqep_position_floor_write(struct counter_device *counter, > >> - struct counter_count *count, > >> - void *ext_priv, const char *buf, > >> - size_t len) > >> -{ > >> - struct ti_eqep_cnt *priv = counter->priv; > >> - int err; > >> - u32 res; > >> - > >> - err = kstrtouint(buf, 0, &res); > >> - if (err < 0) > >> - return err; > >> - > >> - regmap_write(priv->regmap32, QPOSINIT, res); > >> - > >> - return len; > >> -} > >> - > >> static ssize_t ti_eqep_position_enable_read(struct counter_device *counter, > >> struct counter_count *count, > >> void *ext_priv, char *buf) > >> @@ -301,11 +271,6 @@ static struct counter_count_ext ti_eqep_position_ext[] = { > >> .read = ti_eqep_position_ceiling_read, > >> .write = ti_eqep_position_ceiling_write, > >> }, > >> - { > >> - .name = "floor", > >> - .read = ti_eqep_position_floor_read, > >> - .write = ti_eqep_position_floor_write, > >> - }, > >> { > >> .name = "enable", > >> .read = ti_eqep_position_enable_read, > >> -- > >> 2.25.1 > >> >