Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1716342rdg; Sat, 14 Oct 2023 14:13:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbLm8vzCFfokCqyr3nrebVeFDarLe5ghyNcv+I1BsvBTTseLpCFyTnvDRBAkFikrwamJPB X-Received: by 2002:a25:9c85:0:b0:d7f:d6a7:d57d with SMTP id y5-20020a259c85000000b00d7fd6a7d57dmr27447346ybo.27.1697318036775; Sat, 14 Oct 2023 14:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697318036; cv=none; d=google.com; s=arc-20160816; b=j9HZ+qhPb0u1zZMfJq75wyDv7MlPbs8lms0Y0TKNCB/07y1ZXCFYy9VfJTCH/vOixD pYvkIX0wTY4eYF3Orm4Nx624OlmMnM/ADxjeZ7c9pGzyrQnlVkCLgZstcgBoRJUmPjLb rGFoh5Sq/Ph5ohRQVneL3g/Fdy9ElTq+OFPdK9MyyZFjvaeaF0K+B5AKXE61stbXXkZu 9gmKY/9gghVcegQak1S6HqaskMp8Zbly+VFdNJLG8eRTX+bZzRmPuaeSG1L4H/XriOHH dr5KL5SiE3G1XC4P59D3707NABUtvNPzvWmaOzbk1zs12FJxL4b4aBIhmV4mfU2GwPQ8 ZEqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=y0kP5eY/UA3bzuOu4DpvQfR2TaaataaNhpPQGnL7330=; fh=gXdKdTzXVpCzUn5wRwZJ/NCMvVwA1kGKWl4i6uq6pzM=; b=othlXSsrRKNA+I1WV0OUyehFcpYGUeoA1K7McrfW2swwV8RfzYlC1s+grx30MOalMH 2b0egAHpA6OGFqkBQZv2gM4A+PBDBId9h8jgU1Czl6V9Lu8alHzNYWzIqVL1Q5LtuVTi +RYmP0ISzbBPgjHkmRzC7SdZPJM/GqObuHbGY0ZPO5ICMf/dvkT0NYY+xlpWnbOOD68C VXGjKZCXWH6u43IJikkHLvW+AuWyE1Mw3aQv8nlPF//6LEgT/1Sftuerk8NWU3ExmKGx WfoKt1sANW5xqfJEWboN94PE/ymeUBO5fvNXe9LhZT93qVxi5RitkIal1i+VwuYsUqSl HZqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ndvlOupf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y21-20020a056a00191500b00691019fd0efsi3276700pfi.75.2023.10.14.14.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 14:13:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ndvlOupf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C6AC1804597B; Sat, 14 Oct 2023 14:13:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233332AbjJNVND (ORCPT + 99 others); Sat, 14 Oct 2023 17:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbjJNVND (ORCPT ); Sat, 14 Oct 2023 17:13:03 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38B60CE; Sat, 14 Oct 2023 14:13:00 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5079c846dcfso1987693e87.2; Sat, 14 Oct 2023 14:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697317978; x=1697922778; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=y0kP5eY/UA3bzuOu4DpvQfR2TaaataaNhpPQGnL7330=; b=ndvlOupfmxT1Fy5dfv5QyO5AJGyVs/VhgnoLJQXBB7H/VgVHw2KGEGTsGIGjtrBzOO nRF27rVkM23zjoVXTEEGafQcrIyN4ATCfIiSLZV62iDhler5ZdH02/sILUY4B9FrWE27 LBGSkwWYKXT+eYkeqI2lL0EYxq5XRT9ee587dyO84hUT2esctL4QTt9oQ7xcCVHKNXT1 1v0BTiMerTCQet7B1iNJiXnmEHE30JHLMY0jDCUP+POyKubfmpl/27+7u22ykMs9b/VK K5UgkffqSL5bY8G99TxvTl2LLHl5t60z6p716lPsnwfti1nqYLC/EumtfwxupADxxJf0 +sPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697317978; x=1697922778; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y0kP5eY/UA3bzuOu4DpvQfR2TaaataaNhpPQGnL7330=; b=rqVU1vtOAN7Eh0NQ6eOo/C2MSLAsqwTk9J2nRj2vj2ifiYGM+b9Kj+J8+RtgQRCAZZ +D0km36PH99Pr5ZxaTBRacdrdy83oeqplzgMls9C+tjPA8RJpbpC3QK244Rim+UGgqlQ fKvkwAjfoIFDRvMw7xyeZM5aee1ox5cMYi3pCDHvko1hZiOzTMhuQRWGgJgbcKpu9vD8 xBET44Dg2N08Swk6NeDryrT9Sc4B9tiOgeET64W+d/BVcBkQde7JCteKV/MvMPiozL31 lNG1CuYYPIj1ckzTZbjBO2/KoSo4c820VTVF7FJJCkkWH35cOv6I/IPlpQXN9H7+r/VH xNnw== X-Gm-Message-State: AOJu0YxRjURfUWVFeShxCUhPIFA8RavLkPsU5qvrTI0HvlyRs7jrftQD gvAP/0qCBGGPz1Poew+EGL0= X-Received: by 2002:a05:6512:794:b0:502:cc8d:f1fc with SMTP id x20-20020a056512079400b00502cc8df1fcmr22437887lfr.37.1697317978149; Sat, 14 Oct 2023 14:12:58 -0700 (PDT) Received: from fr.lan ([46.31.31.132]) by smtp.googlemail.com with ESMTPSA id g3-20020a056512118300b00507a9b2eff4sm78759lfr.22.2023.10.14.14.12.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 14:12:57 -0700 (PDT) From: Ivan Mikhaylov To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Ivan Mikhaylov Subject: [PATCH v6 0/2] Add maxim max34408/34409 ADC driver and yaml Date: Sun, 15 Oct 2023 00:12:52 +0300 Message-ID: <20231014211254.16719-1-fr0st61te@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 14 Oct 2023 14:13:55 -0700 (PDT) Add Maxim max34408/34409 ADC driver and yaml for it. Until now it supports only current monitioring function without overcurrent threshold/delay, shutdown delay configuration, alert interrupt. Changes from v1: - minor changes from Rob's comments for yaml - add ena, shtdn and make 4 inputs for R sense from Jonathan's comments for yaml - add _REG suffix and make prefix for bitmasks and statuses - add SCALE/OFFSET instead of AVG/PROCESSED from Jonathan and Lars-Peter comments - add chip data from Jonathan and Lars-Peter comments - minor changes from Lars-Peter and Jonathan comments for driver Changes from v2: - add channels into hardware description into yaml - add rsense property per channel - rename pins for shtdn and ena pins - make one array for input_rsense values Changes from v3: - change *_34408_OCT3 and 4 to *_34409_OCT3 and 4 - change of_property_read_u32 to fwnode family calls - add i2c dev table - change of_match_device to i2c_of_match_device - change match->data to i2c_get_match_data Changes from v4: - minor changes in yaml Changes from v5: - name and minor changes to properties in yaml from Rob's comments - shtdn-enable-gpios -> powerdown-status-gpios from Krzysztof and Jonathan comments in yaml - minor changes to driver Ivan Mikhaylov (2): dt-bindings: adc: provide max34408/9 device tree binding document iio: adc: Add driver support for MAX34408/9 .../bindings/iio/adc/maxim,max34408.yaml | 139 +++++++++ drivers/iio/adc/Kconfig | 11 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max34408.c | 276 ++++++++++++++++++ 4 files changed, 427 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/maxim,max34408.yaml create mode 100644 drivers/iio/adc/max34408.c -- 2.42.0