From patchwork Sat Aug 14 17:55:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mugilraj Dhavachelvan X-Patchwork-Id: 12436773 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC90DC4338F for ; Sat, 14 Aug 2021 17:56:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2CDA60F42 for ; Sat, 14 Aug 2021 17:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238841AbhHNR5B (ORCPT ); Sat, 14 Aug 2021 13:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231137AbhHNR5A (ORCPT ); Sat, 14 Aug 2021 13:57:00 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BC23C061764; Sat, 14 Aug 2021 10:56:32 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id u15so569817plg.13; Sat, 14 Aug 2021 10:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=cs6oaPPljTB0+S+sPjJM9MtEY7KAmNyX9Kmkft2EBOk=; b=auBm+DwETbmdnf9jS5r3/nRRLZ6dderzen1M1VtP9EvFVNeVZ+DBFvC0VEIxJz3iuU 8l8gY8vTi1wG4DvgMYY4ZULxpzDsvWzKFthOIPBLmYXFbaNNk5lkhJ9fVEcWSRPvuC24 FF+AkusJPfNx5i2l6AQk0lJCZShh+z4S3tlfY+nu0YmLjQPibs2VyaukngCXZfkOf/No xwrUQ7aO2eq3zuqab/xPGhg+RWvq9B75BkeILpHe6jcHAZ9lgtJSr8qwl1YR5WRnk2ZC i4TWF6iSR4VzeBV2j3/61sMZqjMm1rUD0SuAdUEilXP66FoAnw3isFDYNUCm0W616eiX ofdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=cs6oaPPljTB0+S+sPjJM9MtEY7KAmNyX9Kmkft2EBOk=; b=Op7a5zWZaZ2/OF/6sPHpLbBly/tf2ctjCMixKe8wylYqiw639O3oDaxPxMn9NFOrUu BsS3pj9CngcuSl9xT6nCiiM1H7JAyYcQt+2Oy2861n9WJxYN4hzQcBwVY2FBFOkRjbr+ DXelH69C2fzRpAFCay74Cq9TNkmSJHGDqZ3GzEOkOI1arIIJBn6zh4BlFMQec92FMsd+ IOFZhBCOS8AwDJoKfc9DmjjT4sZDSXWb3bAmBnmkHX0I97++CqB4297urVzk69rYw2x+ KTteSETZSd0uDRNOBupC1F27i68DdcodGsIUdgbRGoMWps3zQPjW9LNSMhwi/Do0Th6J LTeg== X-Gm-Message-State: AOAM533tkyK9K9JopMaIFcuO0OQ6NDqCM01HAnWBZ1rVshmuBgL9XO1E MCFbzW2oQWCa8JvSAKTTeOE= X-Google-Smtp-Source: ABdhPJza6zQ5SXSPH8L5SUcy077tZ6Y1AFseIkpXjdhBlTOwKmG4EHXy97qMeGXM7SyNH/w2pR1J0g== X-Received: by 2002:a62:7e41:0:b029:3e0:9c3f:ab50 with SMTP id z62-20020a627e410000b02903e09c3fab50mr7956500pfc.57.1628963791526; Sat, 14 Aug 2021 10:56:31 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6293:2348:f0eb:567b:5544:c735]) by smtp.googlemail.com with ESMTPSA id q26sm6305380pff.174.2021.08.14.10.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Aug 2021 10:56:30 -0700 (PDT) From: Mugilraj Dhavachelvan To: Dragos.Bogdan@analog.com, Darius.Berghe@analog.com, Rob Herring , Jonathan Cameron , Lars-Peter Clausen , Mugilraj Dhavachelvan , Michael Hennerich , Guenter Roeck , Chris Packham , Alexandre Belloni , Krzysztof Kozlowski , Alexandru Ardelean , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH v3 0/2] iio: potentiometer: Add driver support for AD5110 Date: Sat, 14 Aug 2021 23:25:38 +0530 Message-Id: <20210814175607.48399-1-dmugil2000@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Add dt-bindings and driver support for AD5110, a Nonvolatile Digital Potentiometer. Changes since v2: - Drop Redundant blank lines - Add missed prefix name - Add comma to non terminator line - Add missed error code return when ret < 0 - Explanation for msleep(20) - Change to IIO_DEVICE_ATTR_RW() - Remove comma for terminator line - Drop data->cfg dead code since I'm using probe_new() Changes since v1: - Drop 'shared_by_type' since it's a single channel - Add error check for i2c read/write data bytes - Simplified calculation for tolerance - Add shift for eeprom wiper pos read - Change new custom ABI to existing ABI - Allow top-scale mode by writting max_pos to val Mugilraj Dhavachelvan (2): dt-bindings: iio: potentiometer: Add AD5110 in trivial-devices iio: potentiometer: Add driver support for AD5110 .../devicetree/bindings/trivial-devices.yaml | 2 + MAINTAINERS | 6 + drivers/iio/potentiometer/Kconfig | 10 + drivers/iio/potentiometer/Makefile | 1 + drivers/iio/potentiometer/ad5110.c | 345 ++++++++++++++++++ 5 files changed, 364 insertions(+) create mode 100644 drivers/iio/potentiometer/ad5110.c