Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2406529rbb; Wed, 28 Feb 2024 00:12:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWa7N5UAUKnW5bNKb2bpWRag1tSKqDZFF4oKGlcGLHUoAn7GmfhQ7+g1/jOWYAn3FiwUN75NagEWJDhlPRZr82fl9EpHI2/VJxHeAcrSQ== X-Google-Smtp-Source: AGHT+IHPttUlRNzZnl3wrlsml4Gcq+8fhZ73s5arXgbO1WcQFdyG+rbmO/Qmcqs3Q+W413x4qQhk X-Received: by 2002:a05:620a:8cd:b0:787:1b11:d93b with SMTP id z13-20020a05620a08cd00b007871b11d93bmr3974526qkz.61.1709107946096; Wed, 28 Feb 2024 00:12:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709107946; cv=pass; d=google.com; s=arc-20160816; b=m+repuGXRdtVPo9EYPpqi0k262pUQY+qU0xY3fqmNpasqSfI2pTT8ax79NfAdUZhge MxLV9A8M6sHWbqTeP9Jdjn5wUMFIliifU279rLKyLtuBi394zHiTp67uVNeuZjdpptvD v0dCiNOVBE4EET92Uxtb3hmsI4/FyEamvfrX+iXV4dvhBkRD/dnKkIAZXoTtvgZdBuOM NvmRRRfTWMzle6PbX7gDdyosiX+65jKo9kJnp6KGWi8r8MNL3PbR7Q9rbGzC8Inx6jmO 7zYoT0umvR+g5/CVZQBIMONMYh6PLF5tPMJ8hR0knKekiWJ1lHbAKoMjnIX/xIQwXdid 7KdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=vA7tB+7PRAOKuOpgMeI08u1IIEyAtOz4wiPVqsH7x+k=; fh=T8ppY1MeQJbk9+24S0epysD5MW2NehSpzpnCS0Uvhnw=; b=SmIh/08D2oxuB++srixcWpgO5Be8/D5z2TElx7590KaLHYiXZkLofdKE1DT0St/R+d rxtY+RUwTEY0MXX+GPp4PHlh13cr9O6oMT/i14knk9Owkiryz5Hd9AYXJP9esCUlNI9G DdQeJT1kGCLVnBNDpvZMJzDdgPBJvpJtz6a3KVtxhnvKIjDzAhGRHOO8SI57MqIM7jEN 3EC+ovsfQ6hqiOaMAr9NYa4Xyjl93fUpWd+lUDEcltrBtDkQYrjIclQpRVK6phIhEwBJ Un1m+vT6MDjxXGaI8yzyEtcpq2N17Qun52gjgOgHaH42c5zpAsVdSpZmhy10CFfhQz55 b90Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@atmark-techno.com header.s=gw2_bookworm header.b=FA5njx6a; dkim=pass header.i=@atmark-techno.com header.s=google header.b=jt+ZOopt; arc=pass (i=1 spf=pass spfdomain=atmark-techno.com dkim=pass dkdomain=atmark-techno.com dkim=pass dkdomain=atmark-techno.com dmarc=pass fromdomain=atmark-techno.com); spf=pass (google.com: domain of linux-kernel+bounces-84654-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84654-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=atmark-techno.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y16-20020a05620a0e1000b0078716472ccesi3057579qkm.646.2024.02.28.00.12.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:12:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84654-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@atmark-techno.com header.s=gw2_bookworm header.b=FA5njx6a; dkim=pass header.i=@atmark-techno.com header.s=google header.b=jt+ZOopt; arc=pass (i=1 spf=pass spfdomain=atmark-techno.com dkim=pass dkdomain=atmark-techno.com dkim=pass dkdomain=atmark-techno.com dmarc=pass fromdomain=atmark-techno.com); spf=pass (google.com: domain of linux-kernel+bounces-84654-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84654-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=atmark-techno.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BF9B11C21DD8 for ; Wed, 28 Feb 2024 08:12:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0830928DA7; Wed, 28 Feb 2024 08:12:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atmark-techno.com header.i=@atmark-techno.com header.b="FA5njx6a"; dkim=pass (2048-bit key) header.d=atmark-techno.com header.i=@atmark-techno.com header.b="jt+ZOopt" Received: from gw2.atmark-techno.com (gw2.atmark-techno.com [35.74.137.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90EA52577D for ; Wed, 28 Feb 2024 08:12:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.74.137.57 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709107937; cv=none; b=i0wRO8Uht1CGKKmDcGKCYOZwg9cKqRw1d8CTdxJNptp6LaygQhlWYUJ5lNmlzR93QEwjGmyr3ji4hXibBzUY+KKwFVukX4CaPv8qmmDBPKNO5ju48bnLQKdFqaXK0OwlgyQ+JUHSXmhjBUURXu5OVr6R5Qhq+/kEcSOHcA3cCBQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709107937; c=relaxed/simple; bh=jg+SisA/AOLTpSAWQoZn0j7lDt00VMkoE7oP+xvQUpI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fWfMFkz3QirjFONo70hJiEDVvKsdry2Z7p340wBgN8eW+lYNKE8j0QgddrjmCRw6giBy658KERPUYoq94gNNUbZOwMF0kvLnsbWOOgQVgHq8t+CbwlN+qcZXUs7QOCRLIQ1jFGqRn/uOxCeBiquZ30V6YGAyIcNOaDv/zM8HFxc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=atmark-techno.com; spf=pass smtp.mailfrom=atmark-techno.com; dkim=pass (2048-bit key) header.d=atmark-techno.com header.i=@atmark-techno.com header.b=FA5njx6a; dkim=pass (2048-bit key) header.d=atmark-techno.com header.i=@atmark-techno.com header.b=jt+ZOopt; arc=none smtp.client-ip=35.74.137.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=atmark-techno.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=atmark-techno.com; s=gw2_bookworm; t=1709107934; bh=jg+SisA/AOLTpSAWQoZn0j7lDt00VMkoE7oP+xvQUpI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FA5njx6aFMYMtI1MXRV4ETrhyJHwhTLhXBD33H1MFpUNHHRFj0DkA/IUndht0AxmV Dk0ZBMQYlX4hHGd+dr0KHhSNnlo6SMnTOXBofXo5x48Kp93sdNuDfN4JWmz1NtVK7b d2h/tpYVLw4t9Nr6dvIDz6ZAr9OTLORSx7zYYYs6ssRpe4oax6QV+C3QJeuVynthqP pMV7vFOQE1ub8Id8avA+V/DVirz7oING7YiXh2zUfp6oMfuTLzJoEtXbuG2yofurYl UhbRcdxZFwVXiFxrf/u88k862fMggBoVaSi4P6mqiUWNmp2GOUEMSxyKUQYORHrGA7 e/BggwdYJe20g== Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id 92731B81 for ; Wed, 28 Feb 2024 17:12:14 +0900 (JST) Authentication-Results: gw2.atmark-techno.com; dkim=pass (2048-bit key; unprotected) header.d=atmark-techno.com header.i=@atmark-techno.com header.a=rsa-sha256 header.s=google header.b=jt+ZOopt; dkim-atps=neutral Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 39D97B81 for ; Wed, 28 Feb 2024 17:12:13 +0900 (JST) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1dc157e4778so48022855ad.0 for ; Wed, 28 Feb 2024 00:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atmark-techno.com; s=google; t=1709107932; x=1709712732; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=vA7tB+7PRAOKuOpgMeI08u1IIEyAtOz4wiPVqsH7x+k=; b=jt+ZOoptVIMx2DEYmJX/DIy6/V+J767vxh/yXVgo5FI/xCwpxzjhN1shZJLMuLU9ID 5JyzDK2jr4LPExUDHs3l37S6M+zd/21sgX4Ov2zthvPm9MYEnWbvML6MQqzXX17ogBVh l2by2SvvFVzdel+wefZxezClRpXJ4sfdNbBjmdMWoI66qp7STOjiPkcUB9E6qgC/ZwuK oG3n32udEMdmv6MPjjMjQWo2oo3cWdkl/3J1OczpBiCEQpVMn3UmlyG2MwVAqp1brS3k 1NomjEVshGNF7eVMEw+PR+6Wq8liKBFipjcKVvKMIb2Ud8l5ja0KfcqEzEtWQFcD9Dr7 97cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709107932; x=1709712732; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vA7tB+7PRAOKuOpgMeI08u1IIEyAtOz4wiPVqsH7x+k=; b=olsS8a69GYQ8VfKAkSpgZcNaee/EiSg7xjGl2BOXmysiAOJjmJp7DHM6eYRFZi6Gfg iyaXHodniH3bqeDxn/IegfDWIxViSMLsHBu7ACaX7+jmJpHuJbLYmVtmlIYfdCIybEGj yrCL3bBCVE045JJLujHdlwhcmINDpGT7ygzQ4Z/cXogO4Abx5ySW0Lqan7KBJmFeW3HC hrsjg6/VntZn9s1YB9Kb1C4fHHwKrxIyXR7Hu+6laQ3xQpzBdj8qgKoKjMbXspyOIOAJ z8WtLxvAysMe5m6ybsz0pSFBq5yRszBGpwYDf3fjZ0gEvJIFQ0jbWrXvFEHYAS3tJ+gr i8Hg== X-Forwarded-Encrypted: i=1; AJvYcCUu0UcnODVQbBB4CQ3fOyBU6VkB1JgDvmebFvzmQiLQabM8fwYcqTAfFALVqiA3dWGx6EWJLLI7UE6RU4ihY4rV+L+lxgzNKfejT02v X-Gm-Message-State: AOJu0YyBic51wJHdKf1o8PNA0EoFG7t/+xq+7f3fxvzMPFNDCoOSBs/0 tz1Iidv54pR92MV2Nckg1nr0WZtQnusP+Z5SPWdbljjRIOsv8ZySHj8o1jX4nOHwpO/ufduHClD /TiDbqcEfqpwKYDM3X88g28SHhab6GlwZLYKNbFlZQn18I57X/LfPch1GBfc+c2I= X-Received: by 2002:a17:902:f551:b0:1db:e74b:5bbf with SMTP id h17-20020a170902f55100b001dbe74b5bbfmr14270256plf.0.1709107932287; Wed, 28 Feb 2024 00:12:12 -0800 (PST) X-Received: by 2002:a17:902:f551:b0:1db:e74b:5bbf with SMTP id h17-20020a170902f55100b001dbe74b5bbfmr14270236plf.0.1709107931914; Wed, 28 Feb 2024 00:12:11 -0800 (PST) Received: from pc-0182.atmarktech (145.82.198.104.bc.googleusercontent.com. [104.198.82.145]) by smtp.gmail.com with ESMTPSA id o24-20020a170902779800b001dcc138d4afsm1907072pll.34.2024.02.28.00.12.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2024 00:12:11 -0800 (PST) Received: from martinet by pc-0182.atmarktech with local (Exim 4.96) (envelope-from ) id 1rfF2v-00GtLX-2n; Wed, 28 Feb 2024 17:12:09 +0900 Date: Wed, 28 Feb 2024 17:11:59 +0900 From: Dominique Martinet To: Krzysztof Kozlowski Cc: Jonathan Cameron , Syunya Ohshio , Guido =?utf-8?Q?G=C3=BCnther?= , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: industrialio-core: look for aliases to request device index Message-ID: References: <20240228051254.3988329-1-dominique.martinet@atmark-techno.com> <7f03bb12-0976-4cb7-9ca9-4e4e28170bdd@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Krzysztof Kozlowski wrote on Wed, Feb 28, 2024 at 08:42:46AM +0100: > >> Sorry, that's why you have labels and compatibles. > > > Setting up a fixed alias seems to be precisely what aliases are about > > (e.g. setting rtc0 will make a specific node become /dev/rtc0, same with > > ethernet0, gpio, i2c, mmc, serial...), I'm not sure I agree a new label > > would be more appropriate here, but perhaps I'm missing some context? > > Maybe I don't get your point, but your email said "sysfs", so why do you > refer to /dev? I wrote /dev/rtc0, but it also sets the name in /sys, right? For example /sys/class/rtc/rtc0 As far as I'm aware iio also creates character devices in /dev with the same name (/dev/iio/iio:deviceX), but our application doesn't use these at all and has to? look in /sys directly, so normal udev SYMLINK+= unfortunately isn't applicable or I wouldn't be bothering with all this.. > > I'm not sure I understand this comment -- would you rather this doesn't > > use aliases but instead add a new label (e.g. `iio,index = <10>` or > > whatever) to the iio node itself? > > No, the devices already have label property. Thank you for pointing me at the 'label' property, looking at other subsystems e.g. leds I see paths in sysfs that use labels as I'd like it to work for iio (/sys/class/leds/