Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2756730pxb; Tue, 19 Jan 2021 05:32:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmwdupF01lOEAnkJiGlrs2gnSoAW9BJOKlh7C5uRwTOOv8kPKwKbZzLcdg+EwpCxebG0V6 X-Received: by 2002:a05:6402:318e:: with SMTP id di14mr3389211edb.223.1611063122554; Tue, 19 Jan 2021 05:32:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611063122; cv=none; d=google.com; s=arc-20160816; b=zjdqms+C7fqylbfUrZAGrAqsFCG8lvFK/aLCqi4GK2PoTQcAeBQM7Qx6kxTJptMkjs ISp2Q47Fi+Xcw2k5RdrARQX0psnhuLHwLN4xsHCfnmqqQ8NwAGCxY8sq6Ct/6qTRZFhR Z+Bfq0XC8zMBavxweSuA9jv2TysHKHZOClGk7XHH7o0aVaR1PhHanW1DFrobjMGcCr2G TmMQstcVCLc5Eapl737RsWOWoGuzVL1XlTO/PAawZ3e/JyXtrHTfq878FdT3NrdW+2CL qipxg1RVDT4c828vlVDVSJ0irEmQX3whOnS/T+D4RqV0H97yGfGk7irg3bZFEyqqMV5U 0H9Q== 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; bh=wxvsvsxyrpOZ/oY0spXlDXsPyT4qu420p3DmEnH6sfU=; b=yuM6LmB0L/GXHVlfjBbk6j53PeVAru1cvWbiEVgCuER9Jaaqjw/YPYHA2yStVA/X1n 27Q/lEFQMx21cYT/zQ36e5KFmJls6gdh6e6NwgoNy5q2tGuj+DhKYGMIv+diwDya9Tly sxLqC1ZMJLU9iqv4iAH2Yuv0yebKQAKkZrOcAE3ygcW6o6MgnTFyPQVfLJMp1Z8g4/C3 fkEHslmnN4KCyYFVSsko6wLa5QIgLNclmaGkIrs8feJb1+mpq1gjm7dZFfP0CkfqtN12 uEnCMDIF/+snh/33VIsl6aZFSWj1ORrJuI0kIkAETLN7ow9jkVPUXKzrpMwGfwZWDWyV +P5w== 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 gg14si5315808ejb.367.2021.01.19.05.31.39; Tue, 19 Jan 2021 05:32:02 -0800 (PST) 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 S2393559AbhASN2w (ORCPT + 99 others); Tue, 19 Jan 2021 08:28:52 -0500 Received: from mail-ot1-f44.google.com ([209.85.210.44]:38261 "EHLO mail-ot1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390548AbhASNQU (ORCPT ); Tue, 19 Jan 2021 08:16:20 -0500 Received: by mail-ot1-f44.google.com with SMTP id 34so8870534otd.5; Tue, 19 Jan 2021 05:15:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wxvsvsxyrpOZ/oY0spXlDXsPyT4qu420p3DmEnH6sfU=; b=C7wqhDP881vKuRJx4NtLfuZjZGmBJsIQrLDCx47XV0OF/4dM5uoX6p/JUIDHW0vV77 VwsHE2cg70S6Nncx0BxDd4cD94/YhBJFE5B7rh+OVogNaSxiZM8U5CVQ+yAZb4EOicK/ i1hnEvBoNigSBeb12JDfGHd9iQu+Ej77JxDUF4xj6LOAEHseSgYYEMJQm+JjCio0+O5G 9GNCW0mqaAVvx19o9z+vX2NX9K1W6wWyqXuKIaQNtXmdKtc9e9SMg4zCk9vVZrADlYwo P2Z7YfKKEzzaD9V8oN/X39MaJ7L1X3ILBmGM+ZdLljJAt9he7jzr4iNADjbKe8DVhZZZ 88Bw== X-Gm-Message-State: AOAM532jeKNkUBYdvL1O4Sglw2i3wVayK5VcspLs2DGDZzt2T0rfeE3J IRE4mauSJ5Jr/104mmPWg+rug9mLlnKH5VuCKbdJHncX X-Received: by 2002:a9d:1710:: with SMTP id i16mr3359773ota.260.1611062133927; Tue, 19 Jan 2021 05:15:33 -0800 (PST) MIME-Version: 1.0 References: <20210118003428.568892-1-djrscally@gmail.com> <20210118003428.568892-3-djrscally@gmail.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 19 Jan 2021 14:15:21 +0100 Message-ID: Subject: Re: [PATCH v2 2/7] acpi: utils: Add function to fetch dependent acpi_devices To: Daniel Scally Cc: "Rafael J. Wysocki" , Linux Kernel Mailing List , ACPI Devel Maling List , linux-gpio@vger.kernel.org, linux-i2c , Platform Driver , "open list:ACPI COMPONENT ARCHITECTURE (ACPICA)" , "Rafael J. Wysocki" , Len Brown , andy@kernel.org, Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Wolfram Sang , Lee Jones , Hans de Goede , Mark Gross , Robert Moore , Erik Kaneda , Sakari Ailus , Andy Shevchenko , Laurent Pinchart , Kieran Bingham Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 18, 2021 at 9:51 PM Daniel Scally wrote: > > On 18/01/2021 16:14, Rafael J. Wysocki wrote: > > On Mon, Jan 18, 2021 at 1:37 AM Daniel Scally wrote: > >> In some ACPI tables we encounter, devices use the _DEP method to assert > >> a dependence on other ACPI devices as opposed to the OpRegions that the > >> specification intends. We need to be able to find those devices "from" > >> the dependee, so add a function to parse all ACPI Devices and check if > >> the include the handle of the dependee device in their _DEP buffer. > > What exactly do you need this for? > > So, in our DSDT we have devices with _HID INT3472, plus sensors which > refer to those INT3472's in their _DEP method. The driver binds to the > INT3472 device, we need to find the sensors dependent on them. > Well, this is an interesting concept. :-) Why does _DEP need to be used for that? Isn't there any other way to look up the dependent sensors? > > > Would it be practical to look up the suppliers in acpi_dep_list instead? > > > > Note that supplier drivers may remove entries from there, but does > > that matter for your use case? > > Ah - that may work, yes. Thank you, let me test that. Even if that doesn't work right away, but it can be made work, I would very much prefer that to the driver parsing _DEP for every device in the namespace by itself.