Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp413992rdb; Thu, 5 Oct 2023 09:24:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+QYWV0/8sg9nJtDRY2J98U48XlYCqjwPtdLTU3JtBx/pztqxcmd2ZWi+F65mzjtyVT0KG X-Received: by 2002:a17:902:e80e:b0:1c6:2b9d:56ce with SMTP id u14-20020a170902e80e00b001c62b9d56cemr5730156plg.21.1696523039647; Thu, 05 Oct 2023 09:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696523039; cv=none; d=google.com; s=arc-20160816; b=tV65dLWMelpY/3pnHPsHay5qIQ+ogPMRXmv39HUlU4jkHD6wR+z0AbrALzjqN91a7G DQIUC9jlYpU6UnKZ70IeyHFG6LP0TrQ/sEguM3P7GXlGCttI3X61+xNlMZrCXoWLbweX Izb19sBfslo0ZNzDQ2YoctHlDh5X1hgEwjTaAuXIlsD05itkQ+X0EAd/T9faivF5P5A2 UyLbuMcmopWczXqPw4P1GseZF1TwtRoOyaCM7jorhuCpwURUtulfG3A3CK3to//Va7pb XxfQti8s2FStE+gSHDgT3FpDhmHczIx7VKLscRfTuH5oDD7szORzjh6lKbtBNd+e2uu3 cmGQ== 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=WIPUtpgijMmDn9tQCeaAXK1QL2D5dmaPFM04rK5dMRI=; fh=gXdKdTzXVpCzUn5wRwZJ/NCMvVwA1kGKWl4i6uq6pzM=; b=piaQBj1bYRTIKuK9/1nxTnqSiha2Ha0s/6yhGldT+16emkjMQgjgczaiNLAZMTn2Yb qzG3Ect0Mz/K4Yyc58k5QS84EokdPhvL7tnzdRx7p9MhIbHDKtiSe8AAvvEWrM98Ge/X lb9W4o+jMo4xHyg6+bMVJU7WFSCPZY7KflwMyVM7NSmMGDmhI9Gll6WvhKcDXBiN1Y8Y 3ZNKGqhD2zZXdZz1AoFEnOhq3e9rY50MSoOsGNKUL5mRd5zDxfoGBPmhq8RZxuGQrA27 msEjemWe8kxvnu6RZhOe4oR8Yo2ZUvJ/kAc4McCaibb5k6weTV/uvZE5rmDI3l1cuGkm sAnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=G8PgANzy; 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 ij15-20020a170902ab4f00b001c76a06b5b5si1753838plb.298.2023.10.05.09.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:23:59 -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=G8PgANzy; 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 B58F68032004; Thu, 5 Oct 2023 09:23:58 -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 S242259AbjJEQXT (ORCPT + 99 others); Thu, 5 Oct 2023 12:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242387AbjJEQUy (ORCPT ); Thu, 5 Oct 2023 12:20:54 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67986A250; Thu, 5 Oct 2023 09:09:38 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c17de836fbso14134071fa.1; Thu, 05 Oct 2023 09:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696522176; x=1697126976; 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=WIPUtpgijMmDn9tQCeaAXK1QL2D5dmaPFM04rK5dMRI=; b=G8PgANzy5LX7P9glIoxaRaMo4/uj7JFvaA3bjDNLwzN453U5ruH3Pd+5G84jwwWlCV Y1SZtKKyhjEekNyvQfC2BuL+IkDmPokghWhClRiCYdVa9XQkAt9DBbuSVF3aQnFG2LE3 lMoTVpVPW70JB1Lu6A3Xa8lQLoHg/hXU0HHhC7Wg5GGKCjdIA8aUDAZyQNWrkjKz6kAe YnPm5Vd1NlXUvlFkhoeYOxL1YBCk8fRsDEsXHAaEUNTC2CE2bPPRn6bQM+25TXTdz1Ta n0+ImAXyaDobkehyVO99gVE2HTYcLq4Jpyb6o2LOGxnj9aslK398CxSzd2k5FoG/nSdo m97Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696522176; x=1697126976; 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=WIPUtpgijMmDn9tQCeaAXK1QL2D5dmaPFM04rK5dMRI=; b=EMBSqXz3V49yZPIOmoY80ImXvhCbgfEYvfWtQiGrXbyqB930mC/Onel5/z0Ytlan2B oEpNwmdq0Hilai9wm6lGxhDNsfGLo18Bke9zpvBwzetmmqoKTITXGMVzy68di/v3IHhc tm5Uo1VFO/ZzAqP/ebK58ndpdgrODF00oSLu4qyaKuiS7oa1OhS44ea48tzXDkHucK97 V6ssy/wezLhcO59D0SzWW3JZf5WhKkXifmREqa2kQJFsf7BVNwRt4MZ3YOmESgV8wDR4 DMacfItbRto0P74GFEUis8NTTYuSFLw7GzS491Ta/jdmRuAkvwz45mEKHadNFmAsj7Ac pJTA== X-Gm-Message-State: AOJu0Yy09UxxQ7oqNUGsSFU+c386voW23OouTH1HfymFF1KTbNJL2Aj3 ceGy9pQGs/VHI6X6ZSNu2pY= X-Received: by 2002:a05:6512:203a:b0:504:33da:b659 with SMTP id s26-20020a056512203a00b0050433dab659mr4708583lfs.57.1696522175118; Thu, 05 Oct 2023 09:09:35 -0700 (PDT) Received: from localhost.localdomain ([46.31.31.132]) by smtp.googlemail.com with ESMTPSA id r16-20020ac24d10000000b00502ae64f46asm349088lfi.126.2023.10.05.09.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:09:34 -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 v3 0/2] Add maxim max34408/34409 ADC driver and yaml Date: Thu, 5 Oct 2023 19:09:28 +0300 Message-ID: <20231005160930.14665-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]); Thu, 05 Oct 2023 09:23:58 -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 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 | 270 ++++++++++++++++++ 4 files changed, 419 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/maxim,max34408.yaml create mode 100644 drivers/iio/adc/max34408.c -- 2.42.0