From patchwork Wed Jul 25 23:42:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddartha Mohanadoss X-Patchwork-Id: 10544931 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 57241139A for ; Wed, 25 Jul 2018 23:43:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4625B2A92E for ; Wed, 25 Jul 2018 23:43:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 397952A93B; Wed, 25 Jul 2018 23:43:22 +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 CE46E2A92E for ; Wed, 25 Jul 2018 23:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731447AbeGZA5V (ORCPT ); Wed, 25 Jul 2018 20:57:21 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34994 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731420AbeGZA5V (ORCPT ); Wed, 25 Jul 2018 20:57:21 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1D5B760BFA; Wed, 25 Jul 2018 23:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532562200; bh=oZs53m+Clra2/5pDPqobWALBj+OLYXqjLC3Oc5FPUQw=; h=From:To:Cc:Subject:Date:From; b=LIuMy5DaXfeN7jpORZqsS/cCVcy+nflioLtlxiHhb3IZ/OyLZvM7nwjGzF0gAipHo Hah3kLh9CwyaNhR+VviFezW8FTknMzq92dYPvJMhgRfWHwWPk3lq7PQGiWh+s00P3D MMQEpygmG51P6hOryK8WuaE4eA5Ckk08myBCQw50= 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 9A77260B72; Wed, 25 Jul 2018 23:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532562199; bh=oZs53m+Clra2/5pDPqobWALBj+OLYXqjLC3Oc5FPUQw=; h=From:To:Cc:Subject:Date:From; b=HBVbAEnXWsv4NXg2XF5Ahq2z7PIkUViO1qOVzvEyTZ8DSrKkfu4Z7MvPJmW2TPtDV ySucZeBKMO7yFRQa4IouZLen0FzpKYkPiAjC95VV3qUNvOWxS4m6x54hB+agF7Tl9h lwqd5MwIkAovqDWwcpl2NV5VDRRMVh0hYUdZa9vw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9A77260B72 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, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring Subject: [PATCH v3 0/3] Add QCOM PMIC5 ADC driver Date: Wed, 25 Jul 2018 16:42:42 -0700 Message-Id: <1532562162-6350-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 on inputs connected to the PMIC ADC AMUX. Clients include reading voltage phone power and on board system thermistors for thermal management. The v3 patchset addresses most of the review comments from prior patchset. 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 | 864 +++++++++++++++++++++ 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, 1296 insertions(+), 34 deletions(-) create mode 100644 drivers/iio/adc/qcom-spmi-adc5.c