Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10903116pxu; Wed, 30 Dec 2020 15:27:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxyROgv+qMQZ7KWZwLwzCCXZIxPZAapDl3COmG4DB5gCGxAntkHBMfJrpreEAE0NnaGJoYS X-Received: by 2002:a50:fc13:: with SMTP id i19mr53963078edr.281.1609370827991; Wed, 30 Dec 2020 15:27:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609370827; cv=none; d=google.com; s=arc-20160816; b=h9aCYEy2t2VT+pl2P9VN1VgtGBkl0D8v2lcCUovp+8gRhI6/cTboq0pwAg1DyfE4Dd gfXi2epvZfuicJorYVU5lT5k7stPaUHVwy7GbJhGPc3r+uvp1H4WctL+HCn9Vs1rvHUy sGrobQ4JTf/7PXWt13Rfj2BKyqzk8XPGmvDPAZfUnd1KUZxQbMgE+Ko69TPvqwmF7iGl Ey0xygwiSFJ2lSk5W7HoJiVB4SibzgGHlX++XYLkIP4L5ttjK6UVllIgla4NoTarqe4B CBphWXK54GO2jqXBdO+ag2yq7hUNDSrKnGwfQDSpSykAAaoamZy3+MJg+qZp7bOTafYW 3nKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=gR78gPmwmA3kImx4p1tfZOTvAzaVPgOtdhEAk6uVEuo=; b=lKPeNwOzG+DMiGFG8xMNtAuo3oyk7dGPmrwQsFu8A8D/65E8FzaiWTTWbg4/cjDIYY /I3oMjsv8RyH7WpVNOlbcNnMmxxJuX2axgJ4PT/jMtWo9M7f415NvNKtxAoJ/GwQzJXR GWHSt1MljTgHQSZY0fTzxMQhJt28vmpzdkLjQx58O8lo+XH3vEJT9VqxaE1faXbCw0vg CpwroXttIv1VM9O66LRe/c/3B5QxNKPkD1w+jS7qK+HsMq63qbeHqR7a51R2mXz3jOum IsR3gT8dZYZDnoJHuzd2bl17gPGZrk1mX4w5MFjBmpdUXUgLB2cvUbxNCf7pg8w2sksv fl4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=Ql8i79ZJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si21460679ejq.369.2020.12.30.15.26.45; Wed, 30 Dec 2020 15:27:07 -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; dkim=fail header.i=@lechnology.com header.s=default header.b=Ql8i79ZJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbgL3XZV (ORCPT + 99 others); Wed, 30 Dec 2020 18:25:21 -0500 Received: from vern.gendns.com ([98.142.107.122]:35810 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726348AbgL3XZV (ORCPT ); Wed, 30 Dec 2020 18:25:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gR78gPmwmA3kImx4p1tfZOTvAzaVPgOtdhEAk6uVEuo=; b=Ql8i79ZJySZkkEqx92KLopxutF nMiYp+T9LFAnRRiGu3UH5RLtJSLxptityXbUPrJLaqD7v4p6vmWO0gZovCI57dgUp5qcyPWAIm05z wWtBLCbngYwA8Mih1D4Q6N30Q+rv8Ohuff6VlBhSy87Co7n98XE3eRlsZZ/YGs9SaEC8swQ76CHQf 6t/HUlwy7vsQ0m/bsxi2vbS0QGDdTht0WJGXhL8XZa3sOBrwuqPS4Nec4sYGvtkfBDriO+Au3aHOm 4gveVMjkC9C77U3ktO0y+zpNcKKVLB4Cnxjqs5DgNOBEXGL6e24jK2vZyh8YhXPoAXDPRDUr9mJTG gjsoXeFg==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:42538 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kukpX-0004fK-Hz; Wed, 30 Dec 2020 18:24:35 -0500 Subject: Re: [PATCH v7 1/5] counter: Internalize sysfs interface code To: William Breathitt Gray , jic23@kernel.org Cc: kernel@pengutronix.de, linux-stm32@st-md-mailman.stormreply.com, a.fatoum@pengutronix.de, kamel.bouhara@bootlin.com, gwendal@chromium.org, alexandre.belloni@bootlin.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, syednwaris@gmail.com, patrick.havelange@essensium.com, fabrice.gasnier@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Dan Carpenter References: From: David Lechner Message-ID: <2f950b79-fb83-9800-2690-ec81c6be6348@lechnology.com> Date: Wed, 30 Dec 2020 17:24:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/25/20 6:15 PM, William Breathitt Gray wrote: > diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c > index a60aee1a1a29..6c058b93dc98 100644 > --- a/drivers/counter/ti-eqep.c > +++ b/drivers/counter/ti-eqep.c > -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) > +static int ti_eqep_position_floor_write(struct counter_device *counter, > + struct counter_count *count, u64 floor) > { > struct ti_eqep_cnt *priv = counter->priv; > - int err; > - u32 res; > > - err = kstrtouint(buf, 0, &res); > - if (err < 0) > - return err; > + if (floor != (u32)floor) > + return -ERANGE; > > - regmap_write(priv->regmap32, QPOSINIT, res); > + regmap_write(priv->regmap32, QPOSINIT, floor); > > - return len; > + return 0; > } This will conflict with 2ba7b50893de "counter:ti-eqep: remove floor" (in Jonathan's fixes-togreg branch) which removes these functions.