From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751210AbdAQNtp (ORCPT ); Tue, 17 Jan 2017 08:49:45 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:52466 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbdAQNtn (ORCPT ); Tue, 17 Jan 2017 08:49:43 -0500 Date: Tue, 17 Jan 2017 14:48:47 +0100 From: Andreas Klinger To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, ktsai@capellamicro.com, wsa@the-dreams.de, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, trivial@kernel.org, mranostay@gmail.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org Cc: ak@it-klinger.de Subject: [PATCH v3 0/3] iio: distance: srf08: add IIO driver for us ranger Message-ID: <20170117134847.GA22869@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:OhuMy8pT2bKT3afUsTfu2Pd5TpO4L4eCuT1kmWMp0Ezmqf9z6Ek XodGSoADAa1ySTetvARJmsbMUGTD340bKv5eZ3shPXN4psygM0UjIUpKjuiIJtwTX4Ng5dp rVP2tin1sMrYOqYY5qakwU1eOH2J/iv1CVNYfYNhd/NEeGVehr3lZEjJvzFRb0DiebqYHOG Hwx+pHNEX57HrawoXrAeQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:+eWA5LwoixY=:r22cVz3GDWicBa+uNVX6gI NWDW2XVFWLo/OSU4KwdlYG5ccIl81jpqffLd8WQ/8/XGjwmQkPBpFKIxGzXu5/puYSi8chkzp sfpjYUvPEv40OGRYcfqTVZJ7ZWHETfqybV5t14uPTwtzxegGiFAvtqWelTOJdlQfb/SJQmtB/ m0RYP0AzQYUpWF4AVNlwAiXftTgdMo8UAN1o+mgJWKC7CX53qw4hRGr+NeLQKVO6LMQLFVyjE 1fn9B0tis+C+xTVXiL6DqKwg+FcdEp8zlq4/hjDytvsnJ5zFiN7Zd4RIdS5AaW5b8vZhcr9KP tuw3LDrjUy89GGNupBUB8WiFiNXKVTjDta+Rbr4jBAKuSENJTbHJkIqx1G2WWt/2Acdq62VNU d6HAyYagEB4ttuunfkRe9MNGEcO+A4XwL1tE2CJOd6j9Ya7LPgZ6HnJVeDa/PnW6ThpV66jtB DSUji1Td3QvsYVUF/fUVb3NEXhj9d+rKIKgTqCDmON+7VJ3qu729xKovjN4LtEgFFZE1U67hL bOz0WzNFJih2Rd4gStfeIycs5AcLyffvSGAUa6Js36p0sMEJA9cicRjK9cEsQktDHzfMb9cFL E1ZGxSVipkHKtoXPeziJTwBG0wkMuuzyVKvlkTzAYBNKC1uIL9mnuXL4AgeL1a+1yCm1o+LTI +9O3hUvG9ek+GnyizcsGV9FqhPI5825TzCjMs3Pph1e/39mQGqrkhatsHsjOuptafJwI= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds IIO driver support for srf08 ultrasonic ranger devices. The first patch add a trivial device tree binding for the device together with a new vendor devantech. The second patch is the IIO driver which in turn is using I2C to talk to the device. The third patch documents the added userspace ABI Documentation about the sensor can be found here: http://www.robot-electronics.co.uk/htm/srf08tech.html Changes in v3: Thanks to the reviews of Jonathan, Rob and Lars. Some changes to the driver were made: * Patch 2: "iio: distance: srf08: add IIO driver for us ranger" - defaults values for sensitivity (gain) and max. range are set in probe() - while waiting for ultrasonic echo first wait as long as the physically measurement need as a function of the max. range and then wait in smaller steps until the response can be read. - attributes are now called sensor_sensitivity instead of gain and sensor_max_range instead of range_mm - device-name is now "srf08" - config menu is now calles "Proximity and distance sensors" instead of a separate menu * Patch 3: "iio: distance: srf08: add driver ABI documentation" - newly created to document the driver specific interfaces Changes in v2: Lots of updates thanks to Peters really fast review within 30 minutes after first submission of the driver. * Patch 2: "iio: distance: srf08: add IIO driver for us ranger" - alphabetic order in Makefile - use of u8 while accessing registers - avoid endianness problems with 16 bit values - missing return value checks - some explaining documentation added Andreas Klinger (3): iio: distance: srf08: add trivial DT binding iio: distance: srf08: add IIO driver for us ranger iio: distance: srf08: add driver ABI documentation .../ABI/testing/sysfs-bus-iio-distance-srf08 | 27 ++ .../devicetree/bindings/i2c/trivial-devices.txt | 1 + .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/iio/proximity/Kconfig | 13 +- drivers/iio/proximity/Makefile | 1 + drivers/iio/proximity/srf08.c | 405 +++++++++++++++++++++ 6 files changed, 447 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 create mode 100644 drivers/iio/proximity/srf08.c -- 2.1.4 --