Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4649004pxb; Tue, 2 Nov 2021 13:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySUOF+OVnwKyhKp2ET4Ytsu642YUVJXEii7sPwgzRAWqdUox78ai3XaDYCJ8GDFxgPTh6+ X-Received: by 2002:a17:907:c0c:: with SMTP id ga12mr48398770ejc.173.1635884602284; Tue, 02 Nov 2021 13:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635884602; cv=none; d=google.com; s=arc-20160816; b=Ubdj/2gUmOwkJzb1HuhmILiA0ErzdVqxRAxHnYSX0sZaITCKdwt6FyO9h0J/tJ5Sex Oo30YHunlxHj0FvDHwEZSt9F9RrsZ7nfwKJxoRV7C0rPLvf8htGgVGNIHqE3y80Ma/Xz 33hzJAZ/e2Ru+r4THRgPohW0x/BGbYp7h1TWqO9vhTT9+P2CliwV4xm8EvaMhi6ea18R /0z0g/1wBXVssPdACS3X2FmcZkQwvCJ/AC/J94XVVrTMYzHDjbW0OCGCHKKgSKXal2D+ 7Bo2kT3FLafMNl9uJipBncQ/6RBTFrBQcCfLWn2TVNKSDGyxB1QEZ2NfAN1YeEVIt9D3 s8WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=UyetWvPuNDfyKp+4+2PGhwT/Geo73HADN4YLF27UPDU=; b=ysWzuvvBTEp0Qb90oxWz4ZqADCormOigCewjnAWxlHO/F7/8ddlZ1Ixu6spPWNtIm3 lfvs+q1RqwQcUC27+VSvUDzCgbxsCB2nJ2tio3SXGaVEgFe7JlMbcCFGp7dSp06h8tr3 pPnyz9TJ/lsZiF0ZB0LC3US4WehJ+tT9YZmJbZybVLx5+wWhT9PO41h0ClmCk0WItBeG OkjKi2glM7xG55qkwnWBNFFGHJelem03qsoRAz/r3uqh5QGPxCqv1pGzN9RwY4KkfMsE Y7qgKumShi72CHNJ23gAR082upjxFSzdMpprCo0/yd/c5VhkN350s99Q4CJzrL1HQMNv 8NUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jPxPft0L; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si74436edf.101.2021.11.02.13.22.57; Tue, 02 Nov 2021 13:23:22 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jPxPft0L; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbhKBUXb (ORCPT + 99 others); Tue, 2 Nov 2021 16:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230293AbhKBUXa (ORCPT ); Tue, 2 Nov 2021 16:23:30 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D52FDC061714; Tue, 2 Nov 2021 13:20:54 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id r4so1672878edi.5; Tue, 02 Nov 2021 13:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UyetWvPuNDfyKp+4+2PGhwT/Geo73HADN4YLF27UPDU=; b=jPxPft0LAcrb9jf3ZVLf2T+Ts98E+25/MARM4tWWyPjZrtDTeZMQ8NovVytW1FiuCZ W4b5fHnVQzGp2ig/EPRU6jJZLxEie3YyBFzdlchKkK20gYHB5WpM2WSQMtC65b+Ixlad aS750LdXZFrA6VPEet8mbbrWSiMS8SCt/JH+o12os55SdpHQCYreVuV9k2g9ZG6qyRH3 WghiilMZPEjIrmpDLwM4AUe8OQPGhP+vCtfUINudBGc7K1nz5DnT2ys5gi+Lak4c0iWL 59pWcYXihX2xRsP7hsTCiCGJr/KEfcwo/lu8uxitooXbIgjzIVlfsDlDI/jYAEraY0Hd fXJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UyetWvPuNDfyKp+4+2PGhwT/Geo73HADN4YLF27UPDU=; b=CVYKvTOzx20b/lY54VSYuvWEJJtcTvqxY+2GyGBV1P++WGTA0k6C4bL0j0DqkjI+GE gVtjlH+jS6Y6mOSIma2W90iUZwsb7BqPNjjjGkDoIwu+xMjb6pBvXTJyV5drzoPxGUmg 1XE1cMUaTsAeoJxyg8AL2NSlk+4Db147fEHkZRkz3/Vk2PiVfQkbX+zWZPz7wVuP746W siOqS+GPBzWh4KvhtZ92ovbdSBti2Fm+O2sSEM7Ga04H/nAbweu5GR+nDdVLZ1Kq8JtG oTRkDZm1n2nlPJ075zmF0NGxc7tP/LORA/zer2UfXh0JnhQ3v2lNvIn4FguvvWQ16UPL EIdA== X-Gm-Message-State: AOAM5321rl3lzj1w6GbZjdxEadkrTmbTQ8HnjA9URkir+0ZN5COWtbCL UI5LXextjxzxVG9kLzu/myLzTmR/9tJNBAPc7sc= X-Received: by 2002:a17:906:d553:: with SMTP id cr19mr46570525ejc.128.1635884453458; Tue, 02 Nov 2021 13:20:53 -0700 (PDT) MIME-Version: 1.0 References: <20211101200346.16466-1-quic_qiancai@quicinc.com> In-Reply-To: From: Andy Shevchenko Date: Tue, 2 Nov 2021 22:20:04 +0200 Message-ID: Subject: Re: [RFC PATCH] software node: Skip duplicated software_node sysfs To: Qian Cai Cc: "Rafael J. Wysocki" , Andy Shevchenko , Heikki Krogerus , Greg Kroah-Hartman , Laurentiu Tudor , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 2, 2021 at 9:44 PM Qian Cai wrote: > On 11/1/21 7:51 PM, Andy Shevchenko wrote: > > No, it=E2=80=99s not so easy. What you are doing is a papering over the= real issue > > which is the limitation of the firmware nodes to two. What we need is t= o > > drop the link from struct fwnode_handle, move it to upper layer and mod= ify > > all fwnode ops to be used over the list of fwnode:s. > > Andy, this is my first time touching fwnode/swnode. After reading the > source code for a few hours, I still don't understand the hint here. > Specifically, what does the "the link" refer to? https://elixir.bootlin.com/linux/latest/source/include/linux/fwnode.h#L36 (Property related) fwnode (as of today) is the single linked list with only two possible entries. Comments against set_primary_fwnode() followed by set_secondary_fwnode() may shed a bit of light here https://elixir.bootlin.com/linux/latest/source/drivers/base/core.c#L4724 --=20 With Best Regards, Andy Shevchenko