From patchwork Tue May 14 22:58:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 10944045 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 914FE1398 for ; Tue, 14 May 2019 22:58:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75BD5288BA for ; Tue, 14 May 2019 22:58:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62A0628978; Tue, 14 May 2019 22:58:48 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 C063F288BA for ; Tue, 14 May 2019 22:58:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726283AbfENW6r (ORCPT ); Tue, 14 May 2019 18:58:47 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:36247 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbfENW6r (ORCPT ); Tue, 14 May 2019 18:58:47 -0400 Received: by mail-lj1-f196.google.com with SMTP id z1so758374ljb.3; Tue, 14 May 2019 15:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gkD4gxzoy6M/6Uyme9PNzGTsnVPGlvJZdl9aKPy2J08=; b=WcXdM/OjwPVpt+kZRbKWgfllCF/2LwUxAbvyokqyGgTsGOvlqSQIyd2Q/QTL/+8s/0 x836KMIcFMgIKklHjn29ktdxoyleBMOhlOZw8JPvfcraio6qBraCbj70jituB0JcYlcq hk+6lyf99nhlG5TsgfXRfTwkavD8Na3bxtUPW9w6uS4eiC2NhKjRFHCVYMufzcxF/3l4 s7xq8cM4glP9S8VJCmI5bUfKqqp5oen2mQcliGs1VmeEUHI9y0qXKvEAPQuHYniI9P2N ILdyk1qam/PBQIx2izuTRwXPvxtwbG0ObNosh0nxtwIGMxlRsUETvVCVZvy3xPl4VtEG Qo2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gkD4gxzoy6M/6Uyme9PNzGTsnVPGlvJZdl9aKPy2J08=; b=Ljor0nxy3o4ttvRXaboKm7PEVPy99kuJ68m/+9JfF1iNYQ6k8f0ZZSuJiUGY2ulwKl SVqs7B7aerBFrpTwn86K+s4OaDNkJsDD+kH9h5D3kSxTBY6lkncur9nW8+x4d0uWyueZ cKG4yMEQNVknCDe6ldq+wmdWpsCw83ro6OOqZNPhaIBYW+P7CwD7Rx9mEcITEe/lYLC7 mx3ODYunxgKsYXLQDkQtp/yLmAT0G98jlwWrFu0YNRyoRzjrNP0o4LwKmgWGKUE0Ccvc oELcv2eUaViDLpVn7SdCJ+dkVoVuDTWZ40ZHDVDJnLZE6l19nZsx7XB5dZwyAs+fR0d5 RCQA== X-Gm-Message-State: APjAAAWpuP4GuYy1pOVBUhjBr0c+xeHbVBeudkdItA97Z5Q4h+V9F5L3 0AHTNl7iPYZHlMieqrTdWmMbhLcjFoM= X-Google-Smtp-Source: APXvYqxzoU6BYRCsYnRzsgIF0xJ13h0v9nBKhZEIJfqLoWG7P/6Qa4ANxez76TkoF4S3veVRMoWLuA== X-Received: by 2002:a2e:4e12:: with SMTP id c18mr18773817ljb.3.1557874724881; Tue, 14 May 2019 15:58:44 -0700 (PDT) Received: from localhost.localdomain ([5.164.217.122]) by smtp.gmail.com with ESMTPSA id n26sm30342lfi.90.2019.05.14.15.58.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 15:58:43 -0700 (PDT) From: Serge Semin To: Jean Delvare , Guenter Roeck , Dirk Eibach Cc: Serge Semin , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: [PATCH 0/2] hwmon: Add TI ads1000/ads1100 driver package Date: Wed, 15 May 2019 01:58:07 +0300 Message-Id: <20190514225810.12591-1-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This a simple single-channel ADC device similar to ads1100 series, but with much less capabilities. These ADCs are working over i2c-interface with just one differential input and with configurable 12-16 bits resolution. Sample rate is fixed to 128 for ads1000 and can vary from 8 to 128 for ads1100. Vdd value reference value must be supplied so to properly translate the sampled code to the real voltage. Even though ads1000/ads1100 devices seem more like ads1015 series, they in fact pretty much different. First of all ads1000/ads1100 got less capabilities: just one port, no configurations of digital comparator, no input multi-channel multiplexer, smaller PGA and data-rate ranges. In addition they haven't got internal voltage reference, but instead are created to use Vdd pin voltage. Finally the output code value is provided in different format. As a result it was much easier for development and for future support to create a separate driver, which is opensoureced by means of this patchset. Signed-off-by: Serge Semin Serge Semin (2): dt-bindings: hwmon: Add DT bindings for TI ads1000/ads1100 ADCs hwmon: Add ads1000/ads1100 voltage ADCs driver .../devicetree/bindings/hwmon/ads1000.txt | 61 ++++ Documentation/hwmon/ads1000.rst | 72 ++++ MAINTAINERS | 8 + drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/ads1000.c | 320 ++++++++++++++++++ include/linux/platform_data/ads1000.h | 20 ++ 7 files changed, 492 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/ads1000.txt create mode 100644 Documentation/hwmon/ads1000.rst create mode 100644 drivers/hwmon/ads1000.c create mode 100644 include/linux/platform_data/ads1000.h