From patchwork Fri Aug 3 01:42:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddartha Mohanadoss X-Patchwork-Id: 10554365 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 1EC9114E2 for ; Fri, 3 Aug 2018 01:42:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 068CF2C5B6 for ; Fri, 3 Aug 2018 01:42:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDD9E2C5D1; Fri, 3 Aug 2018 01:42:43 +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 1B3072C5B6 for ; Fri, 3 Aug 2018 01:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731986AbeHCDga (ORCPT ); Thu, 2 Aug 2018 23:36:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:44474 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731944AbeHCDga (ORCPT ); Thu, 2 Aug 2018 23:36:30 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4BCAB60B15; Fri, 3 Aug 2018 01:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533260559; bh=jSJRtM5qnzrQ2wvU+xK0mOQhpurE8Xl6WBqSEJdEaN8=; h=From:To:Cc:Subject:Date:From; b=ktLSBj9eMFbCfDaSIwV0SaYkq4G+pSUkeo9zq0ZYesgR4rBJlXioBntE22FaUwRsx LfOCEgVNnP688TJ12hda/pvvX1swG8EZQX99p5IkW8BbJ0vQWVijdmH6+Iq7+VLakH ZDcUblsn0PHsS5Y4PYAegCYuzT3CtVUE9yzwhDg4= 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 344946024C; Fri, 3 Aug 2018 01:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533260558; bh=jSJRtM5qnzrQ2wvU+xK0mOQhpurE8Xl6WBqSEJdEaN8=; h=From:To:Cc:Subject:Date:From; b=KK5UtqYdrS3GDijaSBz2GDuFxTp6/jYe7uqiMcAChuARRK2horpW5bQsNCWb1VDDi r4t99r/mbXPhNYhU2/hMGA4eHaHMLN8TXb2TizELCu+b5EvRqEOom9mpdGXShH69Kt UzNbxyDbWRKx/Oj/qSkVevuj3dkr0GQckI4jQCwg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 344946024C 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, linux-arm-msm@vger.kernel.org, Rob Herring , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Subject: [PATCH v5 0/3] Add QCOM PMIC5 ADC driver Date: Thu, 2 Aug 2018 18:42:26 -0700 Message-Id: <1533260546-11916-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 v5 patchset addresses most of the review comments from prior patchset. Changes since patchset v4 * Remove support to query channels raw ADC code readings. * Few minor changes. 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 , | 0 .../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 | 788 +++++++++++++++++++++ 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 +++- 8 files changed, 1220 insertions(+), 34 deletions(-) create mode 100644 , create mode 100644 drivers/iio/adc/qcom-spmi-adc5.c