Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4446868pxb; Mon, 21 Feb 2022 21:54:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjmJlcmKOTxKX26FgQjLCdCc9fM2GbXggii6xdi4wqGIGFEDHxO2XA/Z9in95YIv8ZKJap X-Received: by 2002:a17:90b:110a:b0:1b9:eb62:7c00 with SMTP id gi10-20020a17090b110a00b001b9eb627c00mr2495559pjb.67.1645509284881; Mon, 21 Feb 2022 21:54:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645509284; cv=none; d=google.com; s=arc-20160816; b=u77W+9R3YY842VGJqes/BXvm5w0XWhoQZejiS33Nx+uaU0J7FdWLY1fJnnEw/biFMe jfngvL69+Q2JNOT15EgR7AsWvKPLdZw3mzZTNyFCL5edb2KKQnpMqziSzwx0T9icYivk WHlZJ8PQW+pMSlL4XKWLzg5kroZ60JlgPJ/SzfGf47iH7PsCO5C73rlXB4owDNW1iKrE /k4Gx6ODvdt29LWmDSDa7gbjI2L0aIim+bSsGDzmE8AS5Q5By/9gEMaRpDd62x5vHIjT IMw5K4cZ6CwLcEwcLR38EAktH6Z8TrdekILciRV4Ed4RYcGyKl1efnns9WQ+MK3i6UQa 2uQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kllIKaEP4ASYUGo7rizKiRa0ECvHNSY0zpurb7azwtM=; b=h1sBozC88pXUH/3t99SnE/AEtkvhmkZalBvtpV6Z0KE5vxHCCiVe1RWtFAk+qbkvRp opzKgWysSzOQK6b4oN6WPcCQ0Rvj8ach+0XeBp5rcnZterkFTOqB5vFtsPLq0N2AUGam e15mvXz6U+gyZv5y7/d+N23Hmzyv86XUsT/n8hY7g5rvbdxygQ1O9iuNoXvXQe2aZuS4 iYct1cq7lHFUesq6fEeE1XGpbQWzYT5slSYD2gCzVebmevAD8Dl5THEUp1s4zRBW1nI3 kMUA3VgrHfd8aobdyoRGhpF3No5Whr3D344rHTaLJVCuYv7QeDpSZHZegQiZuYfVUHxU ocsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NTYNErI+; 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 a15si8447316pgw.55.2022.02.21.21.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:54:44 -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=NTYNErI+; 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 D2485A9A6C; Mon, 21 Feb 2022 21:17:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233886AbiBUUl6 (ORCPT + 99 others); Mon, 21 Feb 2022 15:41:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbiBUUl5 (ORCPT ); Mon, 21 Feb 2022 15:41:57 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD447237E2; Mon, 21 Feb 2022 12:41:33 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id gb39so36273825ejc.1; Mon, 21 Feb 2022 12:41:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kllIKaEP4ASYUGo7rizKiRa0ECvHNSY0zpurb7azwtM=; b=NTYNErI+B4N/iyG4EIeQ19fiwh6NFceTnj/4C7jF960lYdT+aWuyYAcybrIbaTVQoc W4AM/51UUt0adUcPS9ZNucs2ccZbxHIzx4zPS8RZbn2dzrW6oqMi7/vXAtkjPRj75SdN nE68D7M2oyUZDYfUFBxiyp6di4CAnG0305IAZMfn63aGszk+SShrsDxe5pSuOqGTCA/W TjIVQtuUTtKJ+wv/7QS6nF6VWGgSigguXpgIluAHfmR09DTQ2N9xJJqQjXq+8stH66/R 30M8YqaIET4ml4FY94FD9HahCVfCj+9C2Ms5Ayu3pWrzzt9RNJtlX2LGMsJh9DSunlmd fiiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kllIKaEP4ASYUGo7rizKiRa0ECvHNSY0zpurb7azwtM=; b=k1S7N/DIgIQaa6UpO/LSdS0zZYYZzwacyJn2YoddJqyFLyR1wC8G0lyRb/rVz/7Kbm N74E2TlRh8TkCQRvZB4+YMJGImkYnYY9Q0toszDGor3nR79j2xGJCXXlX2n4sZsBgTDD Bf9NkP3FO5KIYksViaKo/8OS4h1mT1l2wh2i2FMSTwrAM1fZkx7VxqCyl2uCeAaVKqmi KhgIWdoS0vJNTtuz7z/J8afxyXB/o1lAd1Ct8CInXK5fGWdGoJVKep/aIPWHEtkaItEE ILqVhhJd8Y47EpNPmpXBY5qVZElaziTF5CCj9XNS+SipZTSXJmc+4/RVjwHC9i0iXEUv MV0g== X-Gm-Message-State: AOAM530BfUCrVlAdb68JrF1TYhHSnWEjdN7OTAM9ULXy7c0nvbTwSmlj HrAkD23OZBEHXRCQd+uFFiARH320Eh44IBRNJ8HNO4xCh7jjkQ== X-Received: by 2002:a17:906:cc12:b0:6b5:ec8f:fdf2 with SMTP id ml18-20020a170906cc1200b006b5ec8ffdf2mr16739434ejb.579.1645476092274; Mon, 21 Feb 2022 12:41:32 -0800 (PST) MIME-Version: 1.0 References: <20220218042038.15176-1-jagathjog1996@gmail.com> <20220218042038.15176-4-jagathjog1996@gmail.com> In-Reply-To: <20220218042038.15176-4-jagathjog1996@gmail.com> From: Andy Shevchenko Date: Mon, 21 Feb 2022 21:40:56 +0100 Message-ID: Subject: Re: [PATCH v3 3/6] iio: potentiometer: Add channel information in device data To: Jagath Jog J Cc: jic23@kernel.org, lars@metafoo.de, sst@poczta.fm, robh+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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 On Fri, Feb 18, 2022 at 5:20 AM Jagath Jog J wrote: > > Adding each device wiper count and channel information into > device private data. > Utilizing addr member of struct iio_chan_spec to get the > wiper register address so that the value can be read or write > to the same address. Looks much better! ... > static const struct ds1803_cfg ds1803_cfg[] = { > - [DS1803_010] = { .avail = { 0, 1, 255 }, .kohms = 10, }, > - [DS1803_050] = { .avail = { 0, 1, 255 }, .kohms = 50, }, > - [DS1803_100] = { .avail = { 0, 1, 255 }, .kohms = 100, }, > + [DS1803_010] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms = 10, > + .channels = ds1803_channels, > + .num_channels = ARRAY_SIZE(ds1803_channels) }, > + [DS1803_050] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms = 50, > + .channels = ds1803_channels, > + .num_channels = ARRAY_SIZE(ds1803_channels) }, > + [DS1803_100] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms = 100, > + .channels = ds1803_channels, > + .num_channels = ARRAY_SIZE(ds1803_channels) }, > }; Now, you may see you touch still the lines that are not changed, so consider in the _previous_ patch to define each entry like the following: [DS1803_...] = { .avail = {...}, .kohms = ..., }, -- With Best Regards, Andy Shevchenko