From patchwork Wed Aug 1 23:31:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddartha Mohanadoss X-Patchwork-Id: 10553119 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 31BC713B8 for ; Wed, 1 Aug 2018 23:32:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CD582B59F for ; Wed, 1 Aug 2018 23:32:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10C792B5AF; Wed, 1 Aug 2018 23:32:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4F8C2B59F for ; Wed, 1 Aug 2018 23:32:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730957AbeHBBUh (ORCPT ); Wed, 1 Aug 2018 21:20:37 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45824 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729616AbeHBBUg (ORCPT ); Wed, 1 Aug 2018 21:20:36 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0DAB6607BD; Wed, 1 Aug 2018 23:32:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533166343; bh=9VO0b7+IOEScFa0pJN6axp+/OyO9lXwVJtNti9DpnHA=; h=From:To:Cc:Subject:Date:From; b=WcOzDtr8hb93quohlcwjZHYI6uXDKbttLTfTVybMfGpHWwywEjlU/oDR2poYjEDSE 87NmL0buNR7nowcvBH+ML0sipWdhGZ3wE/DAipXQfx5bzqFC134bLpdBsMA2wHj3NV d8IfKpautC4pliWcEdlgektd4mbXIjJ/BhkHHMTg= Received: from smohanad-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: smohanad@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5E79B60275; Wed, 1 Aug 2018 23:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533166342; bh=9VO0b7+IOEScFa0pJN6axp+/OyO9lXwVJtNti9DpnHA=; h=From:To:Cc:Subject:Date:From; b=R1hZdEGVntiWZBxmGesIb2DHr+7Y/+9Tix2Xcs6lRkwk4Ygn99bZ/IzMobscnhTaQ mynDRKD7dCMKPzya4ic3EVM3dAco5nKTIVbsFfvIYqWrnfP71dk5Ga3EFqSz1UVNNr MRET5dmvzpb4WDj7U59QwE8y1+GaMl5nH5PDGbQs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5E79B60275 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=smohanad@codeaurora.org From: Siddartha Mohanadoss To: Jonathan Cameron Cc: Siddartha Mohanadoss , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Subject: [PATCH v4 0/3] Add QCOM PMIC5 ADC driver Date: Wed, 1 Aug 2018 16:31:58 -0700 Message-Id: <1533166318-18055-1-git-send-email-smohanad@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series adds the PMIC5 ADC family of chipset that supports clients to measure voltage and current on inputs connected to the PMIC ADC AMUX. Clients include reading voltage phone power and on board system thermistors for thermal management. The v4 patchset addresses most of the review comments from prior patchset. Changes since patchset v3 * Few minor changes. Changes since patchset v2 * Removed support for current channel as part of this series. * Fix pointer arithmetic for iio_chan. * Few minor changes. * Update license to SPDX format for ADC header file. Changes since patchset v1 * Merged DT bindings with prior PMIC family instead of a seperate DT file for PMIC5 family. * Updated documentation for 'label' and 'value' property. * Updated using unique prefix adc5 for functions and defines specific for this family of chipset. * Refactored scaling functions to use function pointer for scaling lookup. * Added documentation comments as requested in the scaling functions as applicable. * Added utility functions in the scaling API to avoid some of the code repetitions. * Use consistent hex format for adc_data and use specific length while assigning data. * Added support to determine controller version and check against supported hardware settling delay values. * Various minor changes. Siddartha Mohanadoss (3): dt-bindings: iio: adc: Add DT binding document for PMIC5 ADC iio: adc: Add QCOM SPMI PMIC5 ADC driver iio: adc: Update QCOM ADC license to SPDX format .../devicetree/bindings/iio/adc/qcom,spmi-vadc.txt | 77 +- drivers/iio/adc/Kconfig | 20 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/qcom-spmi-adc5.c | 798 +++++++++++++++++++++ drivers/iio/adc/qcom-vadc-common.c | 189 ++++- drivers/iio/adc/qcom-vadc-common.h | 54 ++ include/dt-bindings/iio/qcom,spmi-vadc.h | 125 +++- 7 files changed, 1230 insertions(+), 34 deletions(-) create mode 100644 drivers/iio/adc/qcom-spmi-adc5.c