Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3148063pxv; Sun, 4 Jul 2021 09:08:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT3ON+wBqlE7IiJUJ/RZL7s9IXVN3PiiT6+MrsE082qQ50OjZ91afmfta0zpYFjVKNkOkI X-Received: by 2002:a02:a887:: with SMTP id l7mr8350770jam.71.1625414930620; Sun, 04 Jul 2021 09:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625414930; cv=none; d=google.com; s=arc-20160816; b=h34owE0kjn59DceoVOaGWu3sPEf6Lk5zwgBPCqsls4PZKHRRE5awhg6C6IcxYU+jxj ZIocx1X0kfMtAo7L6Rz3pqRxX5/XbLg2mdW/Wi99l7pZeyFHTr4ZJjHwoarAs7EjpFcc W7EUaM6gqq/gSpKRu3wYBj+Q8RU0LoT8qchDifbSIkedu/uyNfSRRKyKUCdVQcXDXyL7 EdCOmyHFQK3x1PIkxKRGhX8f86hoXT3sdw28Ylh6GUekEVFLefmgZ1c4hO6c0rMPavx7 OFiPKyLW1imVmbpDDS9fctDAUk8PqXkNbNZscp6e12LzLnzb7QXoQY1qF2nulUNe4EsU mK4A== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=IGV2WMWtHZ6xLqhsI8PmqA+3iG0LR7YmyiA+381HQww=; b=omT81h4k/em3rk2/nM1toFE1AyQbtja4W9ETkB+iUl2koDw7zF3BncHNvVqw966rVm XzzTd3Ga2KloPrq0QhQPD7yp+ojsRgvv2JibwdyZu6yL1FeQKG4l+zwBllszqLvnxf+j hTnq8GnVAqzYzlGmbehYlJ2iKutnp7JdnjMAsL8qpqiKA4E7ttXmb9Jivi3Kn3nSB1Nb 5ztdY3Os20vv3TJ/ojKX5qid28/FX6rZ4EezpnXrMxwli5zaP9u7WWOa0p9z8nu+FNKS Hcwy8+Ld9MxEdCvqBGQg3rV5ie2pqUCeOyc7woTYGGl82fNQYco/8Kr2SHCogQr/Qw6s 6khQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si3441614jam.104.2021.07.04.09.08.36; Sun, 04 Jul 2021 09:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229570AbhGDQKj (ORCPT + 99 others); Sun, 4 Jul 2021 12:10:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:40166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbhGDQKj (ORCPT ); Sun, 4 Jul 2021 12:10:39 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A4A2613B1; Sun, 4 Jul 2021 16:07:59 +0000 (UTC) Date: Sun, 4 Jul 2021 17:10:23 +0100 From: Jonathan Cameron To: Andreas Kemnade Cc: Discussions about the Letux Kernel , devicetree@vger.kernel.org, lars@metafoo.de, linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, sre@kernel.org, robh+dt@kernel.org, leonard.crestez@nxp.com, lee.jones@linaro.org Subject: Re: [Letux-kernel] [PATCH 0/4] mfd: rn5t618: Extend ADC support Message-ID: <20210704171023.6199826a@jic23-huawei> In-Reply-To: <20210703185540.5b6bec20@aktux> References: <20210703084224.31623-1-andreas@kemnade.info> <20210703165950.6e2aeb89@jic23-huawei> <20210703183932.75c7012a@aktux> <20210703185540.5b6bec20@aktux> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 3 Jul 2021 18:55:40 +0200 Andreas Kemnade wrote: > On Sat, 3 Jul 2021 18:39:40 +0200 > Andreas Kemnade wrote: > > > Hi, > > > > On Sat, 3 Jul 2021 16:59:50 +0100 > > Jonathan Cameron wrote: > > > > > On Sat, 3 Jul 2021 10:42:20 +0200 > > > Andreas Kemnade wrote: > > > > > > > Add devicetree support so that consumers can reference the channels > > > > via devicetree, especially the power subdevice can make use of that > > > > to provide voltage_now properties. > > > > > > Does the mapping vary from board to board? Often these mappings are > > > internal to the chip so might as well be provided hard coded in the > > > relevant drivers rather than via DT. See drivers that have iio_map > > > structure arrays. > > > > > Most things are internal to the chip, but > > AIN1/AIN0 are external and could be connected to anything. > > > hmm, iio_map stuff looks nice, so before messing with devicetree, > I could solve 90% of the problem by just using iio_map? For my use > cases it is enough to have the internal stuff at the moment. That would > simplify stuff a lot. > > So I could go forward with the iio_map stuff now, and if there is a use > case for AIN1/0, the devicetree stuff can be added later? I was just thinking the same. I 'think' that it will first try to find a mapping via device tree and then use the iio_map stuff. So you can probably get away with a mixture of the two. Worth testing that works though (hook up iio-hwmon to AIN0 perhaps whilst also using the iio_map approach). I might be completely wrong though and am not aware of anyone currently doing this... Jonathan > > Regards, > Andreas