Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1048743pxm; Wed, 23 Feb 2022 16:49:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLbLIwoBWG2GyJaFz6YXJoaD+jbxelmbPQt98QUmUrhl6abWeuhsnKHBzxEi/dKxqUvVjG X-Received: by 2002:a17:902:7c0e:b0:14d:3a2d:3a01 with SMTP id x14-20020a1709027c0e00b0014d3a2d3a01mr411883pll.34.1645663787765; Wed, 23 Feb 2022 16:49:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645663787; cv=none; d=google.com; s=arc-20160816; b=nroppwEWxe2uaBQZcK17s210pd8Ef8vdpNLcTc4XtwU2lggayZv5+j3wjjBERxtrZm 0afo+y58JNhOy/4+LegqhzZyx+SmfRtlWeVTjPLV17l+mPwAmf9kiOr4y4+7gNZ8AoGF eFqM3cTh4unRgso5PQxhbr4Ypqb9OE4xkaDHYK4iuNFDZr2LdrDVqRuV+2Mh/aYqkVKM qQ5J0zSrgzya7qpZWLieUAHmwAdofjctPVkYUq7KAuoOAP7d0HhkSmYq25vlw6Tgme3D D3TUcJ9m7dIk1/rK635l43pNu3U1/+VtiFXgZVUHmsE+AWnzbFt3h2O7WWbO+h30V0+x totQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=oH1ou976HmXhvnLbgu7IxgeGoD4+eYCbPOT2XRjgKEM=; b=O4RMNtL+YzzHqo11orp7NR9dLESyinRccJOYsgdVWkOE4Z33iD1reqad1xngh1h6Ba hZKYplXD+IlQZ927udK1Q4JF59MNsI9xvnJCTeur2qahrS1BesCyJ89YjNJKawmMkdDc UqsWPG6MKa/mbYYL30TugRDq8JUs0lGS0hcYpbsXco92Y0uNsFXbm5zm812JfzTrsxr7 VPyxoHP2Y9OvrBHLz6UoDBM4ixKNZWZX9A66nCra3A0zAJZn4dcLGEqfg7EPNZZRUak4 RczQigiAlYZen+t27iSJ30xqkYFW6YkFdha21hk2X5N29UINqVXu8mn54TqkEDPEUE6P /JNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jlsREVy8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x186si989406pgb.787.2022.02.23.16.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:49:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jlsREVy8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDE23F2136; Wed, 23 Feb 2022 16:44:49 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242864AbiBWQgG (ORCPT + 99 others); Wed, 23 Feb 2022 11:36:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242859AbiBWQgB (ORCPT ); Wed, 23 Feb 2022 11:36:01 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31BDC55BCF; Wed, 23 Feb 2022 08:35:33 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id f8so20496986pgc.8; Wed, 23 Feb 2022 08:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=oH1ou976HmXhvnLbgu7IxgeGoD4+eYCbPOT2XRjgKEM=; b=jlsREVy8R49OrDspMhQiqfPgjB0/PK5psEoO54u0TavB4obO/MKWx6aTTR76F0Kr+h oet2VkFZ756FkA/XakrGIVvYz1lATkQe5DtwJjrufsNlmY4vwnfEyn0s4vLnC4LzEFDw cjyeF5YJcss6GxXzdqMbN+RTDKW4UAzYNHbRylGJ/MX4bEqHs/uSDAVRyzNsEt7je4Qb Qc37ysfzIf9jmIyAOGV8lkZe+LMRGaXh/a1qgwlz8qcSeoe90jz3gxZlj16f9Kjcqtq0 eEMQj7PS8RDojDDxR7SnM4pTqUcZGybjjVOw22Iuand6EJhIcPdD9y9u686eB/CB63AQ TUVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oH1ou976HmXhvnLbgu7IxgeGoD4+eYCbPOT2XRjgKEM=; b=oPv9jfmNTbsiC5TRnGXud2sZpw8FHXXC/l6KmweNGgV/MOPF0nO8sUjBY9OJ8s+BHY GbPWqzXmGqZA4HX8gGBFppM7708/r4pt1IakevNvirv6/V9RXpnxfEZOHPKynCgAT9e4 pzXQIfG+Uq+x+qFUzovqJzZR0qV7UF1qzHzsZEANsaO8nMJ3xPjbVHoco0/i+T5Gmc7P L3uBgNkev4B25F4N+QMDGIckHwk5Ug3diLurinFroMSKxU+p6c6/nTBO6K6RXKtCsaKV DkPDl23r8o+xMFg0T+2A1y0RXKU2S/KFpuXNCq9bByZNG+M4wjJcFH6muoDqb1ULK24X 5u1g== X-Gm-Message-State: AOAM532OTRiye33WnL3vcT3Rm6Vc0smxm5FkJ85cq+IQIiA5boIUW+Zg 5NUGrPyZDRPfh/wyjviYF8GQJKa3/O7ox/I3 X-Received: by 2002:a05:6a00:24ca:b0:4e1:cb76:32da with SMTP id d10-20020a056a0024ca00b004e1cb7632damr538969pfv.81.1645634132533; Wed, 23 Feb 2022 08:35:32 -0800 (PST) Received: from localhost.localdomain ([27.7.190.133]) by smtp.gmail.com with ESMTPSA id q93-20020a17090a4fe600b001b9ba2a1dc3sm3455106pjh.25.2022.02.23.08.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 08:35:32 -0800 (PST) From: Jagath Jog J To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, sst@poczta.fm, robh+dt@kernel.org Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/7] iio: potentiometer: Add support for DS3502 Date: Wed, 23 Feb 2022 22:05:18 +0530 Message-Id: <20220223163525.13399-1-jagathjog1996@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Add dt-bindings and support for Maxim DS3502 into existing ds1803 driver. DS3502 is a 7 bit Nonvolatile Digital Potentiometer. Changes since v4: 1. Included property.h header which has device_get_match_data() function prototype. 2. Removed blank space in tag block of the commit message. 3. Style changes for ds1803_cfg structure. Changes since v3: 1. Dropped the chip type switch statement in read_raw function. 2. Added device specific read function pointer in their structure. 3. Added two separate functions to read values from two different types of devices. Changes since v2: 1. Addressed Andy Shevchenko comments. 2. Adding device name in Kconfig file. 3. Spliting up of patch into 3 patches. 4. Adding channel info into ds1803_cfg in separate patch. 5. Dropping the use of enum in firmware data instead using previous pointer method for accessing device specific data. 6. Separate patch for using firmware provided data instead of id->driver_data. 7. Adding DS3502 support in separate patch. Changes since v1: 1. Fixes the alignment to match the open parenthesis in separate patch. 2. Adding available functionality for ds1803 driver in separate patch. 3. Moving maxim_potentiometer members into ds1803_cfg structure. 4. Droping of the INFO_ENABLE channel type. 5. Firmware entry with data is used instead of id->driver_data to to retrieve the chip specific data. Jagath Jog J (7): iio: potentiometer: Alignment to match the open parenthesis iio: potentiometer: Add available functionality iio: potentiometer: Add channel information in device data iio: potentiometer: Change to firmware provided data iio: potentiometer: Add device specific read_raw function iio: potentiometer: Add support for Maxim DS3502 dt-bindings: iio: potentiometer: Add Maxim DS3502 in trivial-devices .../devicetree/bindings/trivial-devices.yaml | 2 + drivers/iio/potentiometer/Kconfig | 6 +- drivers/iio/potentiometer/ds1803.c | 170 ++++++++++++++---- 3 files changed, 138 insertions(+), 40 deletions(-) -- 2.17.1