From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan.Cameron@huawei.com (Jonathan Cameron) Date: Wed, 5 Jul 2017 16:23:45 +0800 Subject: [PATCH V4 0/2] timer: add imx tpm timer support In-Reply-To: <1499222112-9988-1-git-send-email-aisheng.dong@nxp.com> References: <1499222112-9988-1-git-send-email-aisheng.dong@nxp.com> Message-ID: <20170705162345.0000020e@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, 5 Jul 2017 10:35:10 +0800 Dong Aisheng wrote: > The Timer/PWM Module (TPM) supports input capture, output compare, > and the generation of PWM signals to control electric motor and power > management applications. The counter, compare and capture registers > are clocked by an asynchronous clock that can remain enabled in low > power modes. TPM can support global counter bus where one TPM drives > the counter bus for the others, provided bit width is the same. > > This patch only adds the timer support. PWM would be added later. Hi Dong, Not relevant to this patch - just an observation! Just came across this thread and took a look at the hardware. I see some of the timers (particularly the flextimers) support quadrature encoder modes. Just thought I'd point you at some on going discussions on the IIO list (linux-iio at vger.kernel.org) trying to improve the interface for such devices. Might be of interest (or not depending on whether support for that functionality is of interest!) http://marc.info/?l=linux-iio&m=149904379731556&w=2 Jonathan > > ChangeLog: > v3->v4: > * also add ETIME explanation in function > v2->v3: > * address a few minor comments from Daniel Lezcano > * add more explaination on ETIME check in commit message > v1->v2: > * change to readl/writel from __raw_readl/writel according to Arnd's > suggestion to avoid endian issue > * add help information in Kconfig > * add more error checking > > Dong Aisheng (2): > dt-bindings: timer: add nxp tpm timer binding doc > timer: imx-tpm: add imx tpm timer support > > .../devicetree/bindings/timer/nxp,tpm-timer.txt | 28 +++ > drivers/clocksource/Kconfig | 8 + > drivers/clocksource/Makefile | 1 + > drivers/clocksource/timer-imx-tpm.c | 239 > +++++++++++++++++++++ 4 files changed, 276 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt create mode > 100644 drivers/clocksource/timer-imx-tpm.c > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752512AbdGEIZL (ORCPT ); Wed, 5 Jul 2017 04:25:11 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:9354 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472AbdGEIZJ (ORCPT ); Wed, 5 Jul 2017 04:25:09 -0400 Date: Wed, 5 Jul 2017 16:23:45 +0800 From: Jonathan Cameron To: Dong Aisheng CC: , , , , , , , , Subject: Re: [PATCH V4 0/2] timer: add imx tpm timer support Message-ID: <20170705162345.0000020e@huawei.com> In-Reply-To: <1499222112-9988-1-git-send-email-aisheng.dong@nxp.com> References: <1499222112-9988-1-git-send-email-aisheng.dong@nxp.com> Organization: Huawei X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.206.48.115] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.595CA223.00EE,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2823ba529bc6d14079cdcf4bb17e7d16 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 Jul 2017 10:35:10 +0800 Dong Aisheng wrote: > The Timer/PWM Module (TPM) supports input capture, output compare, > and the generation of PWM signals to control electric motor and power > management applications. The counter, compare and capture registers > are clocked by an asynchronous clock that can remain enabled in low > power modes. TPM can support global counter bus where one TPM drives > the counter bus for the others, provided bit width is the same. > > This patch only adds the timer support. PWM would be added later. Hi Dong, Not relevant to this patch - just an observation! Just came across this thread and took a look at the hardware. I see some of the timers (particularly the flextimers) support quadrature encoder modes. Just thought I'd point you at some on going discussions on the IIO list (linux-iio@vger.kernel.org) trying to improve the interface for such devices. Might be of interest (or not depending on whether support for that functionality is of interest!) http://marc.info/?l=linux-iio&m=149904379731556&w=2 Jonathan > > ChangeLog: > v3->v4: > * also add ETIME explanation in function > v2->v3: > * address a few minor comments from Daniel Lezcano > * add more explaination on ETIME check in commit message > v1->v2: > * change to readl/writel from __raw_readl/writel according to Arnd's > suggestion to avoid endian issue > * add help information in Kconfig > * add more error checking > > Dong Aisheng (2): > dt-bindings: timer: add nxp tpm timer binding doc > timer: imx-tpm: add imx tpm timer support > > .../devicetree/bindings/timer/nxp,tpm-timer.txt | 28 +++ > drivers/clocksource/Kconfig | 8 + > drivers/clocksource/Makefile | 1 + > drivers/clocksource/timer-imx-tpm.c | 239 > +++++++++++++++++++++ 4 files changed, 276 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt create mode > 100644 drivers/clocksource/timer-imx-tpm.c >