Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp499352lqb; Sat, 16 Mar 2024 13:14:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWYlxtQCzzzcEkbnC4c9T3Y7JQ8YkTqivHkQzf5VfhoirL3jFJ3otDqkj+9igHAZKy0c6AAmWYiXavN7uzmn2I+F09jgR10vy1m6wk8SQ== X-Google-Smtp-Source: AGHT+IE8UlTn5a9w4uvB1N6bO85gF06PPlwgrtwZrrqwbenGa1DLo1C2ZybRArjPSwgPAdFsT0Nc X-Received: by 2002:a17:902:d511:b0:1de:f294:c9cf with SMTP id b17-20020a170902d51100b001def294c9cfmr6195536plg.64.1710620091085; Sat, 16 Mar 2024 13:14:51 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id mb12-20020a170903098c00b001e002b2628bsi990161plb.296.2024.03.16.13.14.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 13:14:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-105285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BE6D8281E9C for ; Sat, 16 Mar 2024 20:14:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EDCE1C69A; Sat, 16 Mar 2024 20:14:45 +0000 (UTC) Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 71FBE1C68A for ; Sat, 16 Mar 2024 20:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710620084; cv=none; b=RLABjwumfu1beU/LDnct1faEXLNsvaylo5H98Lt650Mb8qdBzyBBg1j/OlWmaNstTnaCE9zuY9lrYgLc7UnMwtsDOsZeTLQTUeR4N7/0/Gp7hVcbW/UMQdBfpd/05xAsUnwxO6e5HcIth9u4Qa8yhwGMmYZHwk1Gu0B+g/PJJqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710620084; c=relaxed/simple; bh=RauXkEzmN7SZO4F1m+jEV8VKhQgNgAvhOgY28JNq/wk=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VKSOD5eCrsKl4Mm9YuptakCrJwZIQjid9O+49BqnMIaVdZL5o5cXKVGHNwWyMXRKYaiDJZeyz3C6cN5Q1DYgKCe6klW+A65xjRE+SCN/H8xDVK1OXwr0//DAKqzdC+ThfEbw6ioMEEYmdC6tkQvQXz99LuErTsNtEtoQgMc8QRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-217.elisa-laajakaista.fi [88.113.26.217]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id cf37add6-e3d1-11ee-abf4-005056bdd08f; Sat, 16 Mar 2024 22:14:36 +0200 (EET) From: Andy Shevchenko Date: Sat, 16 Mar 2024 22:14:35 +0200 To: Dominique Martinet Cc: Jonathan Cameron , Syunya Ohshio , Guido =?iso-8859-1?Q?G=FCnther?= , 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> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240228051254.3988329-1-dominique.martinet@atmark-techno.com> Wed, Feb 28, 2024 at 02:12:54PM +0900, Dominique Martinet kirjoitti: > From: Syunya Ohshio > > When using dtb overlays it can be difficult to predict which iio device DTB IIO > will get assigned what index, and there is no easy way to create > symlinks for /sys nodes through udev so to simplify userspace code make > it possible to request fixed indices for iio devices in device tree. IIO > > For platforms without device trees of_alias_get_id will just fail and We refer to functions as func(): of_alias_get_id() > ida_alloc_range will behave as ida_alloc currently does. Ditto. > For platforms with device trees, they can not set an alias, for example > this would try to get 10 from the ida for the device corresponding to > adc2: > aliases { > iio10 = &adc2 > }; > To: Jonathan Cameron > Cc: Guido G?nther > Cc: Lars-Peter Clausen > Cc: Rob Herring > Cc: Krzysztof Kozlowski > Cc: Conor Dooley > Cc: linux-iio@vger.kernel.org > Cc: devicetree@vger.kernel.org > Cc: linux-kernel@vger.kernel.org Please, make sure you don't pollute commit message with these. Either use specific --to and --cc when formating patch or move them into comment block (after '---' line below). > Signed-off-by: Syunya Ohshio > Signed-off-by: Dominique Martinet .. > +#include What about ACPI? Please try avoid hard to use OF-specific code for the new features. -- With Best Regards, Andy Shevchenko