From: David Lechner <david@lechnology.com> To: linux-iio@vger.kernel.org, linux-omap@vger.kernel.org Cc: "David Lechner" <david@lechnology.com>, "Rob Herring" <robh+dt@kernel.org>, "Mark Rutland" <mark.rutland@arm.com>, "Benoît Cousson" <bcousson@baylibre.com>, "Tony Lindgren" <tony@atomide.com>, "William Breathitt Gray" <vilhelm.gray@gmail.com>, "Thierry Reding" <thierry.reding@gmail.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH v2 0/5] counter: new TI eQEP driver Date: Wed, 7 Aug 2019 14:40:18 -0500 Message-ID: <20190807194023.15318-1-david@lechnology.com> (raw) This series adds device tree bindings and a new counter driver for the Texas Instruments Enhanced Quadrature Encoder Pulse (eQEP). As mentioned in one of the commit messages, to start with, the driver only supports reading the current counter value and setting the min/max values. Other features can be added as the counter subsystem gains support for them. v2 changes: - New patch to move TI PWMSS driver from drivers/pwm/ to drivers/bus/ - Device tree bindings converted to .yaml format - Device tree clock renamed from "fck" to "sysclkout" - Dropped unused index and strobe signals from counter driver - Added synapses and actions to counter driver - Fixed base in of kstrtouint() - Clarifications in commit messages This series has been tested on a BeagleBone Blue with the following script: #!/usr/bin/env python3 from os import path from time import sleep COUNTER_PATH = '/sys/bus/counter/devices' COUNTERS = ['counter0', 'counter1', 'counter2'] COUNT0 = 'count0' COUNT = 'count' FUNCTION = 'function' CEILING = 'ceiling' FLOOR = 'floor' ENABLE = 'enable' cnts = [] for c in COUNTERS: function_path = path.join(COUNTER_PATH, c, COUNT0, FUNCTION) with open(function_path, 'w') as f: f.write('quadrature x4') floor_path = path.join(COUNTER_PATH, c, COUNT0, FLOOR) with open(floor_path, 'w') as f: f.write(str(0)) ceiling_path = path.join(COUNTER_PATH, c, COUNT0, CEILING) with open(ceiling_path, 'w') as f: f.write(str(0xffffffff)) enable_path = path.join(COUNTER_PATH, c, COUNT0, ENABLE) with open(enable_path, 'w') as f: f.write('1') cnt_path = path.join(COUNTER_PATH, c, COUNT0, COUNT) cnts.append(open(cnt_path, 'r')) while True: for c in cnts: c.seek(0) val = int(c.read()) if val >= 0x80000000: val -= 0x100000000 print(val, end=' ') print() sleep(1) David Lechner (5): bus/ti-pwmss: move TI PWMSS driver from PWM to bus subsystem dt-bindings: counter: new bindings for TI eQEP counter: new TI eQEP driver ARM: dts: am33xx: Add nodes for eQEP ARM: dts: am335x-boneblue: Enable eQEP .../devicetree/bindings/counter/ti-eqep.yaml | 50 ++ MAINTAINERS | 6 + arch/arm/boot/dts/am335x-boneblue.dts | 54 ++ arch/arm/boot/dts/am33xx-l4.dtsi | 27 + drivers/bus/Kconfig | 9 + drivers/bus/Makefile | 1 + drivers/{pwm/pwm-tipwmss.c => bus/ti-pwmss.c} | 0 drivers/counter/Kconfig | 12 + drivers/counter/Makefile | 1 + drivers/counter/ti-eqep.c | 460 ++++++++++++++++++ drivers/pwm/Kconfig | 9 - drivers/pwm/Makefile | 1 - 12 files changed, 620 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/counter/ti-eqep.yaml rename drivers/{pwm/pwm-tipwmss.c => bus/ti-pwmss.c} (100%) create mode 100644 drivers/counter/ti-eqep.c -- 2.17.1
next reply index Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-07 19:40 David Lechner [this message] 2019-08-07 19:40 ` [PATCH v2 1/5] bus/ti-pwmss: move TI PWMSS driver from PWM to bus subsystem David Lechner 2019-08-07 19:40 ` [PATCH v2 2/5] dt-bindings: counter: new bindings for TI eQEP David Lechner 2019-08-21 20:31 ` Rob Herring 2019-08-07 19:40 ` [PATCH v2 3/5] counter: new TI eQEP driver David Lechner 2019-08-07 19:49 ` David Lechner 2019-08-11 9:23 ` Jonathan Cameron 2019-08-11 19:15 ` David Lechner 2019-08-15 12:37 ` William Breathitt Gray 2019-08-07 19:40 ` [PATCH v2 4/5] ARM: dts: am33xx: Add nodes for eQEP David Lechner 2019-08-07 19:40 ` [PATCH v2 5/5] ARM: dts: am335x-boneblue: Enable eQEP David Lechner
Reply instructions: You may reply publically to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190807194023.15318-1-david@lechnology.com \ --to=david@lechnology.com \ --cc=bcousson@baylibre.com \ --cc=devicetree@vger.kernel.org \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux-pwm@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=robh+dt@kernel.org \ --cc=thierry.reding@gmail.com \ --cc=tony@atomide.com \ --cc=vilhelm.gray@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-IIO Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \ linux-iio@vger.kernel.org public-inbox-index linux-iio Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio AGPL code for this site: git clone https://public-inbox.org/public-inbox.git