From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933608AbcLNQQ6 (ORCPT ); Wed, 14 Dec 2016 11:16:58 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:51693 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755058AbcLNQQg (ORCPT ); Wed, 14 Dec 2016 11:16:36 -0500 Date: Wed, 14 Dec 2016 17:16:03 +0100 From: Andreas Klinger To: devicetree@vger.kernel.org, linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, ak@it-klinger.de Subject: [PATCH v3 0/2] iio: adc: hx711: Add IIO driver for AVIA HX711 ADC Message-ID: <20161214161603.GA13873@andreas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:8tQDisNWBhbZjp4dexEy2hcCe31orKyFY3nD7UOBJUaMNS9Oeod Nf8acSQ/iR0jlZbVL5UMuWBss6w22Cf1S7CBY34jzi3sVoLplp10kX1hUSo2ohw6NphHZkp GVM1C7IUOmKejf4KSbljis1EVcY7fxn9NzJc9CeuH8xp/eblJ1Ep2iWS9jznTJXLr8qkhpt uCUMohXgYZogkAcNbRSDg== X-UI-Out-Filterresults: notjunk:1;V01:K0:5+qeaT44zc8=:SF4DR3LDR3YB4Rht6+g8Dx CJuh9MY+AYb9Cx1/ejkphw424CBkIL63/5Sf51Qy4eKBkW+jKDnyg0Iuk9Rkwv00VOeaujQ/Q il2izuT5lslrPNQrcgzLjUbbwrhhTAvhX/jbyiif+n5ka4OoMc6H7Q04F7gv09BJ68CxOlwZW 563l45CDz2dVQJltj6Mj4oL0k1n7oBFzUEpDrWAQ+hsC0r9OSF4hviPawDNeiVZfKrjpSmXtb +i6DMk232tUxunSxe6RPJTyxvJTyZrev7RDVQQGZfhp1wXNSVNWqsnIanNp6vEPlNDwaZ+F5V 7lGNnyfDXa9XBqnR4T/7DgicWF/htbwRQAFA3b4iIDbUO2wsuJf1rOftmAQR3L5PbLJ9Kd29y TF+noRIYwIsyjjvg9ekd6WmPZ/oB4QD1dWd9IwV9SWHocF5Rozbcjj9fsnoRJ4UDoJyORMahP diRayp/3FdGpsCQafUpZKWACrMGC1rWB0dwDDWes7x8YWaLT1Cn9bnPbGarI9fRGl9xLZrcs1 i34FgUfXxHiGdKK8fJXVMhzUf4lq0q4EyC6prEDwJh8dT80M98X7bkVn3Zdg4fCYN0oOrffGu badFxtGW8g8qjJ36RtCQofLlMDkeAyksW6XLDw80yyeomiDSjvAdE+y4VEv7rFrnHPeY/NvS6 d31lUd5tQqU4/lWycEH6GeBQLMTU9I6XefXbV/ZwF3ymoNjzSJNIJ/18wHKxx+qRcXNA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds IIO driver support for the AVIA HX711 ADC which is mostly used in weighting cells. The first patch adds the new DT binding for which a new vendor avia was also added. The second patch is the simple IIO driver implemented as ADC. The protocol is specific to this device and implemented using GPIO's. Documentation of the chip can be found here: https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf Changes in v3: moved gain from devicetree to sysfs, according to comment of Lars-Peter Thanks for reviewing and giving suggestions * Patch 1: "iio: adc: hx711: Add DT binding for avia,hx711" - removed property gain * Patch 2: "iio: adc: hx711: Add IIO driver for AVIA HX711" - removed property gain from devicetree - added device attribute (rw) for gain - support reading from both channels now Changes in v2: Lots of updates thanks to Peters review. * Patch 1: "iio: adc: hx711: Add DT binding for avia,hx711" - typo - removed unneded section * Patch 2: "iio: adc: hx711: Add IIO driver for AVIA HX711" - updated help text in Kconfig - removed dead code - removed unused power management - reduced channel spec to what is actually used - added error handling in case reset of chip not possible Andreas Klinger (2): iio: adc: hx711: Add DT binding for avia,hx711 iio: adc: hx711: Add IIO driver for AVIA HX711 .../devicetree/bindings/iio/adc/avia-hx711.txt | 16 ++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/iio/adc/Kconfig | 18 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/hx711.c | 292 +++++++++++++++++++++ 5 files changed, 328 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt create mode 100644 drivers/iio/adc/hx711.c -- 2.1.4