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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DB4CC4CEC4 for ; Wed, 18 Sep 2019 12:16:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 41DED205F4 for ; Wed, 18 Sep 2019 12:16:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dlmmrAUw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=st.com header.i=@st.com header.b="mgB12bKF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41DED205F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FMOlXsyogymHYcjdMmiQYwbRFPzlugAkqx3GudZAdLM=; b=dlmmrAUw7nCN7s A4b6p76dhOKe5nGLYKoP1NUDaYToDlv93IuTYxEmQyRicir1osBVSQjQKm2KXekmSyOeeHtcfAcDO Y+ycDChV3HEVtVoAEnJTbYM5FCoD9d8dMllGULjxQ1SL8c0rEUbSaY7gZuMySIV5VOPi76cZAaoUq OnFQQ4GPMlNsEdWscQw/X7h//pGyEdUkkCKtLvB3BYuLZw5HueV1qfrPJRbTcfNmukZHHloeAVR5S xTMWjkePnk96tWF5LUfQRqOsk+qkAj/62Hl8BUhs+Vp4vaUkmbqNWnzhjfD6PuYGRNnJivQ8Hw+HQ ODKMPny0ZFwf2yeqzv8A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iAYtC-0002Ly-TV; Wed, 18 Sep 2019 12:16:54 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iAYt9-0002LU-4u for linux-arm-kernel@lists.infradead.org; Wed, 18 Sep 2019 12:16:52 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8ICGHlD023163; Wed, 18 Sep 2019 14:16:46 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=8ZrDgpdMzmVLj7n/V3GIOKe3N2fmdar22nZB+6Ict7A=; b=mgB12bKFeCYXRhIpeAtPbS9Zfwm43cBJZp0bNavNip6flNtwPIumKcFTh6OLAOVMAsAx COfjJjXm6iBTbFUQDOSFEhrsJWTccbg7j65Rs6jn0RZOEquxh6qKKY5YiIftRd5a0gb7 el1zYHht8VrLnzV1fwVfrOP/EYjtE3kQi4txyEHgLhhi29+2bT6P07GSoPr+5vjwvH0u FXT7au5v8AAI0ejYQKs/os6aqsz28tmPt6byktnAs4azLc24Q67B8lQuF6iiIIp59ACK sKHe2uIr+JDjma+shOJC10MjBnLzjQ3WKhLp7LQVMs3EiZu1q6DqyIq7OZP9X+NBmScn zg== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx08-00178001.pphosted.com with ESMTP id 2v37kmc2ps-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 18 Sep 2019 14:16:46 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 8DAFA24; Wed, 18 Sep 2019 12:16:40 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 154F22C4735; Wed, 18 Sep 2019 14:16:40 +0200 (CEST) Received: from SAFEX1HUBCAS22.st.com (10.75.90.92) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Sep 2019 14:16:40 +0200 Received: from [10.48.1.232] (10.48.1.232) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Sep 2019 14:16:39 +0200 Subject: Re: [PATCH v2 7/7] counter: stm32-timer-cnt: Update count_read and count_write callbacks To: William Breathitt Gray , References: <327fe01b7ce4feb0fc3d854393691664a6a36b40.1568792697.git.vilhelm.gray@gmail.com> From: Fabrice Gasnier Message-ID: Date: Wed, 18 Sep 2019 14:16:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <327fe01b7ce4feb0fc3d854393691664a6a36b40.1568792697.git.vilhelm.gray@gmail.com> Content-Language: en-US X-Originating-IP: [10.48.1.232] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-18_07:2019-09-17,2019-09-18 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190918_051651_555178_CE362A9D X-CRM114-Status: GOOD ( 17.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.torgue@st.com, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/18/19 9:52 AM, William Breathitt Gray wrote: > The count_read and count_write callbacks pass unsigned long now. > > Cc: Fabrice Gasnier > Signed-off-by: William Breathitt Gray Hi William, I tested your series for STM32 timer and LPtimer drivers. Maybe you can squash as suggested by Benjamin ? With that, you can add my acked-by for the two STM32 drivers. Thanks, Fabrice > --- > drivers/counter/stm32-timer-cnt.c | 17 +++++------------ > 1 file changed, 5 insertions(+), 12 deletions(-) > > diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c > index 644ba18a72ad..839083543323 100644 > --- a/drivers/counter/stm32-timer-cnt.c > +++ b/drivers/counter/stm32-timer-cnt.c > @@ -48,34 +48,27 @@ static enum counter_count_function stm32_count_functions[] = { > }; > > static int stm32_count_read(struct counter_device *counter, > - struct counter_count *count, > - struct counter_count_read_value *val) > + struct counter_count *count, unsigned long *val) > { > struct stm32_timer_cnt *const priv = counter->priv; > u32 cnt; > > regmap_read(priv->regmap, TIM_CNT, &cnt); > - counter_count_read_value_set(val, COUNTER_COUNT_POSITION, &cnt); > + *val = cnt; > > return 0; > } > > static int stm32_count_write(struct counter_device *counter, > struct counter_count *count, > - struct counter_count_write_value *val) > + const unsigned long val) > { > struct stm32_timer_cnt *const priv = counter->priv; > - u32 cnt; > - int err; > - > - err = counter_count_write_value_get(&cnt, COUNTER_COUNT_POSITION, val); > - if (err) > - return err; > > - if (cnt > priv->ceiling) > + if (val > priv->ceiling) > return -EINVAL; > > - return regmap_write(priv->regmap, TIM_CNT, cnt); > + return regmap_write(priv->regmap, TIM_CNT, val); > } > > static int stm32_count_function_get(struct counter_device *counter, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel