From patchwork Tue May 9 16:08:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 9095 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3004355vqo; Tue, 9 May 2023 09:13:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LE9GYHOJ3nSDmFt1KeVVgWGSypAXTVyKPdPR5bBH2KddaogxvbkDK8vu5X3CWPVmV076k X-Received: by 2002:a17:902:ee8a:b0:1ac:6c26:c32f with SMTP id a10-20020a170902ee8a00b001ac6c26c32fmr9283422pld.46.1683648809508; Tue, 09 May 2023 09:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683648809; cv=none; d=google.com; s=arc-20160816; b=l7R1EZwVPoAp9ok4LqRlTb6dEPpgf8tU9SNWv/WULhtcewZrrd+9ExU4ap7Rhfe6iV yZpX01+zxzicZ02M9mV6VdW9JM//UjnC7qH6fDFpv4Cnw+hSj0lSeksnxaP9zqqICm1B e9yBo5nJcJyeMcGNxHisU9JIbKGtIRhYiuFHuulIZAMQBMRiZSTNWC7cdI2JmQtc/TpD 40Db/kFcJDyDdkfVefnVGNgyHWB2QwhkQ6RkLYkN8fAoy9a6Bbah64/1tMGZ1EFoVQw3 iQ6Rxk68/NuJrekcyp7cIYWZcjAceVeB1nvco1xlmgrAtroXb0zGhM4GSRA9t1x6GgRw 6Q8w== 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=XDvcIZLjCP+8xu4zO/3UciqUCkhBzDJuHbcBf2HG88E=; b=ywLjOjMBJx5GLcl3Z6McqdISFDAVoj5FMaD06dV3qFDAvVXHQJ8zOIQu52Qu3zy1fs wvzcwzhidhZaIPg+oeH8TZN3U5xAGwUTmoqyq3DP5atR7qr9VzqOsdQ+vW7TKYJUvV9G 74/9/t4ZAymbUw58Z32GA56D4cTL8WmcwXfwCLGtGKr24A2JdMPRsr7Lmi0Eu8qhif9L mfhm24j02QnsiB8U/Rkm1JQwsTYIP0JZiEeFNDGPxphlAaiNIxTb5xfyFRQNL/Z5cz25 f26wDID9ESY/pdL2vh7TWQM/XarPfFssG3lCrgnYuZ+sjv+2XYzRY7+MBYcGtx2lSgET VFRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kG52DJBe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a170902e54500b001a8173f468fsi1949513plf.314.2023.05.09.09.13.15; Tue, 09 May 2023 09:13:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kG52DJBe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235333AbjEIQJQ (ORCPT + 99 others); Tue, 9 May 2023 12:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbjEIQJP (ORCPT ); Tue, 9 May 2023 12:09:15 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02EF818C; Tue, 9 May 2023 09:09:12 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id E257FFF816; Tue, 9 May 2023 16:09:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1683648551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=XDvcIZLjCP+8xu4zO/3UciqUCkhBzDJuHbcBf2HG88E=; b=kG52DJBeAxb2TVi8gOSoH+e2Pijux1idmzZT5Ic5pB3G5nLrsg2h8iiAANCIZH13Y1mILQ VwDl9kIGtc+/ukntzd8ki2eAEwObaSyW0FYV7tPoACU+bcfltKEJIewRaFMQ0GOeHWVRPO Uz78dLipKttcsfdwdHpBWvr7D1Pwu11EbBv+KkeVslt311UlanjEjUgFSonBW1o7mVQz9/ wVt5R6yOkSh9mNyWnYiE949Kd7m6YP2TeM/0veQppq6hJMrxx7Mx291zjhSLgQExhHW/E5 h4VlD59F8Sbf6Wi4TRTV5KFqpgB9O8SJryfsNStVG3hU8G+8GYzyyPV2vlAF9w== From: Herve Codina To: Herve Codina , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Christophe Leroy , Thomas Petazzoni Subject: [PATCH v4 0/3] Add the Renesas X9250 potentiometers IIO support Date: Tue, 9 May 2023 18:08:49 +0200 Message-Id: <20230509160852.158101-1-herve.codina@bootlin.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765433734104261096?= X-GMAIL-MSGID: =?utf-8?q?1765433734104261096?= Hi, The Renesas X9250 integrated four digitally controlled potentiometers. On each potentiometer, the X9250T has a 100 kOhms total resistance and the X9250U has a 50 kOhms total resistance. Compare to the previous iteration https://lore.kernel.org/linux-kernel/20230421085245.302169-1-herve.codina@bootlin.com/ This v4 series updates the binding, introduced the power-supply regulators and the write-protect gpio, uses spi_write_then_read(), removes spi_get_device_id(spi)->name, removes spi_set_drvdata() call. Best regards, Herve Codina Changes v3 -> v4 - Patch 1 Remove iio.yaml. Add 'vcc-supply', 'avp-supply' and 'avn-supply'. Add 'wp-gpios' - Patch 2 Get and enable the regulators. Manage the write-protect gpio. Use spi_write_then_read(). Remove the unneeded spi_setup() call. Get name from field added in struct x9250_cfg instead of spi_get_device_id(spi)->name. - Patch 3 No changes Changes v2 -> v3 - Patch 1 Remove the reg property description Use 'potentiometer' for the node name in the example. - Patch 2 and 3 No changes Changes v1 -> v2 - Patch 1 No changes - Patch 2 Use a define for the 0x50 value used multiple times. - Patch 3 No changes Herve Codina (3): dt-bindings: iio: potentiometer: Add the Renesas X9250 potentiometers iio: potentiometer: Add support for the Renesas X9250 potentiometers MAINTAINERS: add the Renesas X9250 driver entry .../iio/potentiometer/renesas,x9250.yaml | 78 ++++++ MAINTAINERS | 7 + drivers/iio/potentiometer/Kconfig | 10 + drivers/iio/potentiometer/Makefile | 1 + drivers/iio/potentiometer/x9250.c | 223 ++++++++++++++++++ 5 files changed, 319 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml create mode 100644 drivers/iio/potentiometer/x9250.c