From patchwork Sat Sep 9 18:32:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 811978 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xqN8y3Zwbz9t3C for ; Sun, 10 Sep 2017 04:32:50 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756216AbdIIScs (ORCPT ); Sat, 9 Sep 2017 14:32:48 -0400 Received: from mailout1.hostsharing.net ([83.223.95.204]:47147 "EHLO mailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbdIIScq (ORCPT ); Sat, 9 Sep 2017 14:32:46 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Organization Validation Secure Server CA" (not verified)) by mailout1.hostsharing.net (Postfix) with ESMTPS id 0A3A910193E92; Sat, 9 Sep 2017 20:32:45 +0200 (CEST) Received: from localhost (5-38-90-81.adsl.cmo.de [81.90.38.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 14AB761146C9; Sat, 9 Sep 2017 20:32:41 +0200 (CEST) X-Mailbox-Line: From c5a93c6dd0859cb8ed093e222970cdca3a61aa9a Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Sat, 9 Sep 2017 20:32:41 +0200 Subject: [PATCH v2 0/6] IIO driver for MCP3550/1/3 To: Jonathan Cameron Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Mathias Duckeck , Phil Elwell , Oskar Andero , Andrea Galbusera , Akinobu Mita , Manfred Schlaegl , Michael Welling , Soeren Andersen , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Mark Rutland Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org One speedup, one cleanup, one kerneldoc patch for mcp320x.c plus support for the MCP3550/1/3 used by the "Revolution Pi" family of open source PLCs (https://revolution.kunbus.com/). Changes since v1: - Drop two patches which are now queued. (Jonathan) - Move kerneldoc to separate patch. (Jonathan) - Move support for continuous conversion mode to separate patch which is marked informational / not for merging. Rename device property to "continuous" for consistency with the existing similar property of drivers/iio/light/us5182d.c. (Rob, Jonathan) - Rework calculation of raw value in patch [5/6]: Instead of byte-wise mangling, convert the big endian value clocked out by the chip to host byte order and mangle the resulting 32-bit value. Reduces the amount of code and improves readability as the bit numbers referenced in the code comment and datasheet are used verbatim in the code. - Use switch/case-statement instead of if-clause when applying chip-specific quirks in mcp320x_probe(). (Jonathan) - Expand code comment explaining the two consecutive conversions in mcp320x_probe(). (Jonathan) Thanks, Lukas Lukas Wunner (6): iio: adc: mcp320x: Speed up readout of single-channel ADCs iio: adc: mcp320x: Drop unnecessary of_device_id attributes iio: adc: mcp320x: Document struct mcp320x dt-bindings: iio: adc: mcp320x: Update for mcp3550/1/3 iio: adc: mcp320x: Add support for mcp3550/1/3 iio: adc: mcp320x: Support continuous conversion mode .../devicetree/bindings/iio/adc/mcp320x.txt | 23 ++ drivers/iio/adc/Kconfig | 5 +- drivers/iio/adc/mcp320x.c | 240 ++++++++++++++------- 3 files changed, 188 insertions(+), 80 deletions(-)