Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp393073rdb; Tue, 5 Dec 2023 08:12:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGY6a5eRToDnkJYfab4GJR0F1VX2czbl0D2OiHbzd5c0yLZ5ceFffZDVXdqxuyZNpKS1Vrq X-Received: by 2002:a05:6870:ec9f:b0:1fb:75b:2fb8 with SMTP id eo31-20020a056870ec9f00b001fb075b2fb8mr6740256oab.79.1701792760121; Tue, 05 Dec 2023 08:12:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701792760; cv=none; d=google.com; s=arc-20160816; b=ktkgA3cg8uRvtYsYLOxvUAg93oYmkSc9o+fMSeBrcxwvfS2SulKGVxLjWiCaDJOb/4 dDHCZdxr/3fu7Le6d0dkNA9fGYJOGE1Vm3JyhEHGdWLiOdt7C5dfNo7ux2WzeUFw7aVJ YySjokiIjwsIr4HoRg/LHrN/xul2FJR7KW7684+3s5xHnBAq+ZqE49hX40PeALvD09Xr j9PHv1BGGH+l7LmZYHtqvKFBwTSl4Gb7khydrNiftS7dUKrQVRMub6IU648BmAuL5QXX xIN1WLn1EzU5mN8r2mVNc/qz35GzyO8LNpKzYMayx7qgjfciuGSpe2exY4iE8NiSkG6e /FPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=oezG7B8/HBZJztf0xXD9ra4YKdN/gDOchCXNN5JSFq8=; fh=ZhTVNNPuGeV7sl3Q9xKMe9n3kfhnGV7Q7I317bqa9iU=; b=Y7O+dv1zJXfHo34hv18yO7D3D3I+46mmRFgRvrPtM7G+mD7Cnn4GAETMOdOwf5E9XD E7aw6qZNfqziOveTLdaLp5XIQKn/tNjGuqCTAKmhmR/vrTYE5Z0BMAQTdcEpFrEnPSqA 4O2RkUwGNzXAzsZZyH498rX41Z+UZPjkFPKulDhg3Vd7TSdTb/B19YC8w781CTrt0xcI 4tt3ogdZ+Gv/RHtkm6NzyUbSh/WAkyZl/Ue3E7nGiwxOwTuHKSx4VyohseebxriETD9e 6qnTEjrjNO3o6pbaqJrxZYe9oZctZlw1NAlRnFlaHdVuv3a1qeyz8Dy3qTgdw56GDsPc h6EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NzFuhvk+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id e3-20020a63d943000000b005aebc9096d4si9734048pgj.150.2023.12.05.08.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 08:12:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NzFuhvk+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4DD0E815831D; Tue, 5 Dec 2023 08:12:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232123AbjLEQMS (ORCPT + 99 others); Tue, 5 Dec 2023 11:12:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbjLEQMR (ORCPT ); Tue, 5 Dec 2023 11:12:17 -0500 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F3A418D; Tue, 5 Dec 2023 08:12:23 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2ca0c36f5beso25493601fa.1; Tue, 05 Dec 2023 08:12:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701792741; x=1702397541; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=oezG7B8/HBZJztf0xXD9ra4YKdN/gDOchCXNN5JSFq8=; b=NzFuhvk+WKJnutOVFHFT9+H498k4umcFVehNOtyFT/lhZHG/7TtOYOq8rsJaelqfYB gazvdR1HuQPvrgNUVUijNqzS7UqYGqr6RzYGzOd2ZP0H5N2x0zvfAYnuAZVS2tKoAM4j QVuZDZGmzu8wFo0XVhZkhZ6/tJnjk8zZkowaEHYYiAVbRbHagVGWP8Z6NvjjZHWktKuh b+ra9u3C22Fv11F7+pMwQ7P9JY56DEurG+QKp58uhk2rCHqK4NbU+w8SFeNvts1OyMD/ vVm7Oudc8+e0P1gu84UUYFkUHRLHAgV09m/utgopdJPOVcQPi/Y2EuIPpmloiEeimfrB t7PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701792741; x=1702397541; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oezG7B8/HBZJztf0xXD9ra4YKdN/gDOchCXNN5JSFq8=; b=jvR7gKzcWJxACpw+OLaU2nAEdoV1jVHqQokfcfJc1KUTDy7qT8QZmaKK5GMgSqyPN0 BTHRxPMVtYXkHK3VV441ksM6gKA4BgMRHDoO68y5ur4pbtCmjFAPPGjhYuMqaQzhPy+U CqbwQxhomFPvmXn5kSZfDsfJ/gGP2VGC7InyeP5ilL8R3sUxqod4visSLtilnduLwxav BsAV/TYx0ZMkcPqRxZq2vrCFKXqnh5URdG1ywOzWx8gKH3pd36s9jlISWoWoW6QTRc+P Z6JLSvENjNpcFMG7FVNPLXnc/ld31T2ZJ7tIW+jDjxnQ5ob0KPnzblZlWzFyf+8wyDoI PyvQ== X-Gm-Message-State: AOJu0Yw7gV2DCk5aEs+P1CxEM7+9gVfDFUCQrSTSXYL3hayMUeuxTzd/ KBTA2uaAqNkwjkUh41X9wHQ= X-Received: by 2002:a2e:9782:0:b0:2c9:f1c6:e20d with SMTP id y2-20020a2e9782000000b002c9f1c6e20dmr2119970lji.49.1701792741330; Tue, 05 Dec 2023 08:12:21 -0800 (PST) Received: from [172.25.98.130] ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id gv11-20020a170906f10b00b009de11bcbbcasm6982621ejb.175.2023.12.05.08.12.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Dec 2023 08:12:20 -0800 (PST) Message-ID: Date: Tue, 5 Dec 2023 18:12:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 2/2] iio: adc: ad7173: add AD7173 driver To: Andy Shevchenko Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , =?UTF-8?Q?Leonard_G=C3=B6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231205134223.17335-1-mitrutzceclan@gmail.com> <20231205134223.17335-2-mitrutzceclan@gmail.com> Content-Language: en-US From: Ceclan Dumitru In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 08:12:35 -0800 (PST) On 12/5/23 17:28, Andy Shevchenko wrote: >> + ref_label = ad7173_ref_sel_str[AD7173_SETUP_REF_SEL_INT_REF]; >> + >> + fwnode_property_read_string(child, "adi,reference-select", >> + &ref_label); >> + ref_sel = match_string(ad7173_ref_sel_str, >> + ARRAY_SIZE(ad7173_ref_sel_str), ref_label); >> + if (ref_sel < 0) { > Can we use fwnode_property_match_property_string()? fwnode_property_match_string() searches a given string in a device-tree string array and returns the index. I do not think that this function fits here as the DT attribute is a single string.