Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp497076rdb; Thu, 5 Oct 2023 11:57:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYdP0iU6BlgP0gppNFnl02T10o/s6YfgD0aXnVqMJsZmbyJzpIPyUM9EuZBAgC3hYz6k6f X-Received: by 2002:a17:90a:af86:b0:277:4be4:7a84 with SMTP id w6-20020a17090aaf8600b002774be47a84mr3235737pjq.19.1696532255691; Thu, 05 Oct 2023 11:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696532255; cv=none; d=google.com; s=arc-20160816; b=SWSRIzYuzof5o7eUqll3S7PxUTT5IB1zmXppzrlCJmXHjEeUDeULxI2qJoBJoqMlpL lbO8JCaWtRBpfaJSeeUVZQ0fLhWT8sVpto2Ftuv6zCFtj5raXAR8Moj6KIGmmiuu61yC j9VK97SNi5tKIMHlMwsg/+A35CkFHCh30C0Ol+T6W8h4JWHjJluCZ+rf6YqoTjEz0Pt8 4UvwpCuuN05npeS3ZoayXBemZum90jZKcPI7IgiX14u++GuJxvJYATQ3p3qsSGhOHlI4 LiQhV4dt8l1Db1Z5rTKfY+FEgGJPB4PCkHyVDzYczPYVsNoHmHS5uNWi93+m6A6IzwoI Nzaw== 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=MWYpFdaVGut5Npp6T7pkp8bwOXgHapwNlMwFZnUGk7w=; fh=gXdKdTzXVpCzUn5wRwZJ/NCMvVwA1kGKWl4i6uq6pzM=; b=l1noEhYPbvhe50neHeFw4PNPgZBOVp9QoZQSCdSIUEc5wpomncJ2TyAOdI5cT2Wq3Z s42dq9SQPJdVsc6XCvIzGh++n/M8SUN7mkkMZfVcMUW72wNWe0WQ5biJZkuW8hu43K0K iXe/2Js78+LyxiQ6mGvUJwcJu0EQPW1xHCnofDQg/uR0ZbZ3CK8HTHCpJ+A6R9WVXIvC /OtvPVuIA3v/NpW/Fo+MgEf42WmNKxHfbYUj2keip5frbQqg+gBdxY1wAS3Vlr6Vn9Yw bZTNU12ojE8JDrYkXOer5A1DK+WpSGDL0j4tAcT6mEnzGRPxB729ECpVNqejO9kAGYot UXsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="FJZ6/yTx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id j13-20020a63cf0d000000b005704979833csi1898224pgg.855.2023.10.05.11.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 11:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="FJZ6/yTx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 AB3ED8090047; Thu, 5 Oct 2023 11:56:00 -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 S230466AbjJESz5 (ORCPT + 99 others); Thu, 5 Oct 2023 14:55:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbjJESzz (ORCPT ); Thu, 5 Oct 2023 14:55:55 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8629798; Thu, 5 Oct 2023 11:55:54 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5043a01ee20so1695157e87.0; Thu, 05 Oct 2023 11:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696532153; x=1697136953; 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=MWYpFdaVGut5Npp6T7pkp8bwOXgHapwNlMwFZnUGk7w=; b=FJZ6/yTxRuzOMR6Sweo4Pazyb130kOqWqIcCddCKv0ahnIeDA9jE4MJhrjfSBBVlgM FG/w/dvl8os8jAZkyOeX9rmyGkRz++bcprYu0ocUlKhB5lWTLEiXV+RDbbFc4B73OnaP DKAhebanyXaPO0iVFwZ8VG14aGhXmNJJvsWfM6oxzu9eIIczUjpNnEvKDB6CsfIe97eL 0Bp6xzxSuRIUTlWpuUpOQ8DLDSsgcl7uSPEyKUvlflaSP5yMXpKkXrFXe+MlZgcctTW6 2TR+DTk/7G2VyoL4aCIoj/8TkgwfxlLE6TaQZIBuO+ygyJku5exVEPvS1vH5pWixdgeJ hj0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696532153; x=1697136953; 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=MWYpFdaVGut5Npp6T7pkp8bwOXgHapwNlMwFZnUGk7w=; b=B6kk7UqamgBfsGboqSPchVzbH6RhQAKVeBFri6jd9DHXmlLrLh72ZotQ+a3/ijxa3r JDOSbeZ0OBzXP8t6WV+4IfjNG/oXLhqsBVB4t/K5esPWm0STOMJOWgRxgTg6m+APRraf bawxL33bFBtJcBIMiBmGrRHRBa9avmVzSODKPJZMBJ+STWpGygEvwKoi7Mo+c3oYSdBX iYWzHN6tKv9crLDd/9qOSyGbD23Bl1pz+t6ZdPhCQCPnkxDcenOmkcBKe66y8vBUpsNh OO1SL3i29IaoKpyRyBn5xWTNk1rfgTvBzuH0G9tuuFWTQqbj1sWVo74Zn3rSDT5v+yOq 9UUg== X-Gm-Message-State: AOJu0Ywlzl0Q3U5vsZYXJZ5NqXA2QnH245m1EKivEqsmJqG6LEYkoTLT EJPRhVoYRvmvEGy1RhWfgIA= X-Received: by 2002:a05:6512:523:b0:500:9a45:638 with SMTP id o3-20020a056512052300b005009a450638mr5397514lfc.2.1696532152323; Thu, 05 Oct 2023 11:55:52 -0700 (PDT) Received: from fr.lan ([46.31.31.132]) by smtp.googlemail.com with ESMTPSA id q1-20020ac246e1000000b004fe48d0b639sm402341lfo.83.2023.10.05.11.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 11:55:51 -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 v4 0/2] Add maxim max34408/34409 ADC driver and yaml Date: Thu, 5 Oct 2023 21:55:35 +0300 Message-ID: <20231005185537.32267-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_BLOCKED,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]); Thu, 05 Oct 2023 11:56:00 -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 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 | 137 +++++++++ drivers/iio/adc/Kconfig | 11 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max34408.c | 278 ++++++++++++++++++ 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