Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp512743lqb; Thu, 29 Feb 2024 07:23:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWX8rKLzs52LVYEtvtdFyn4oNQ0qvOD+6c08aEGAVI3icqr0wa99t8SDn6gYQ6M2CXmVZdjb8OIftXaFqKf0DQ/VxDbbhBH6Nq256+Dng== X-Google-Smtp-Source: AGHT+IHxtIB9bAaQt3gtKO3cR9tx1F+RqiNjeIjIuw5HKmT4tFjL8yMU4apTw3uAyDvA0uE7WXcU X-Received: by 2002:a05:6359:4127:b0:17b:5574:f477 with SMTP id kh39-20020a056359412700b0017b5574f477mr2687419rwc.4.1709220196485; Thu, 29 Feb 2024 07:23:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709220196; cv=pass; d=google.com; s=arc-20160816; b=w5FQPwjUqG3AtgFMa372IrbQCabUe0oIawejMXFaVqkzL5ieZRh8IX63EbHEBFD+MH rgiMwtKcgmQJPH11hK8l95O6L/UMn3pbd7ObWQVtRVMrTsrQbaZX/UqGjpqyMxtSw6uB GJcOqZInh3risT2stI++RdXDKiVC9Av8QokkR/aYghLEQO5bxNqd/0VcpOvfwcSc2KjA S/+f3mLSeU6rbUmitIqWK42UYplXjxKrcAE4a1U0BVsOfAiM68m5DsndAkkJwspriZ2W nSwHvbeaAuCLnwX4D6WD9ZDUATtlyHpsi/4C/nY/N64OJiH0Yx25Ue/JbpUjfXgYzpSU v1Tg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:from:to:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=g5kXwCtNU0te2FYTDQ4q2dN9S7SUT7EeSjehv7fCtCk=; fh=8OPJxXJt+9guaPfltkjoVN4IrQzLualQ8x21AEupJAQ=; b=KZPaPxkUpDpkQ/5N5nPpzD2zi/6LXMPmKgDL5KvbOqsSu1SY7iqBJpj9KvI+rZVO7H OrPziHnsTZgAnOJr806pAJX5+D2IK6YxiesTMlDZnfgSktwcKEb/cHrg+/6qciRPbsxV agkPpLBYLkaVvzObFb/aj/4C0H4DGgNvJO03jEw/o+AY4fB9C6HvQow4Cvy7v0IeR1L4 bPc9UNe6n2YIZnZspnsd14mVc2w5HWcu33g5lcJ1G00wDQEc+cmtVbpmXObNDgUaflfJ woVqQD+8GhE7KQZ9evn/zbqx5HazjRQwtPbUOpHEEUwg4DEqJZQ76Wuv8GNzQzXCUP2+ hfLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p3HPaMpT; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-86916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m8-20020ae9e008000000b00787329ed629si1539871qkk.423.2024.02.29.07.23.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 07:23:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p3HPaMpT; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-86916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 335111C21BA1 for ; Thu, 29 Feb 2024 15:23:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF7E51419A9; Thu, 29 Feb 2024 15:23:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="p3HPaMpT" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 C5F93137747; Thu, 29 Feb 2024 15:23:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709220187; cv=none; b=ZoiUNUGgKhUj5PyTdQ9+cka1bHXawlPly8lYHdBwH5444wBreE1M0xs31c9Ql4zJPfmnyP/QFNlg1kmBHU0yc78Pw0Q6uvsBqIE1sDpRVPfCZJwfyG4uvDYxCLvnfJ3OQFViY0w25X+YiULtBqS8ylKw1ONbN6CrIK5AgBkOtjw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709220187; c=relaxed/simple; bh=FnJ5PRLHMbbCxiWolI/D484iJjQ+6LJl7Lv2B83l2e0=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:To:From:Subject: References:In-Reply-To; b=uXs3c3w2zhV40ET0q+e3t5zpzWpJu/jeVHNap5J2UHZUaKxgsYdktD/LNEl1W8y10LFwD88p/qDsFdsnzoS1lzzmm5AG8gklEgy0Q/SUktX6092voopZcvTfRVx/UhoCSzWO7o3GlRFSpFxKyQ0fQSaaLsgeOR1Jp6jPQAC+Nnc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=p3HPaMpT; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 0933FE0005; Thu, 29 Feb 2024 15:23:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709220183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g5kXwCtNU0te2FYTDQ4q2dN9S7SUT7EeSjehv7fCtCk=; b=p3HPaMpTCeMnY+v+RhRzOMfYf1hJRqMHo3mDiIUesLh6hAPkP84BiA1/4vN1Np1RzhMxL8 BJ1uJHxtM7AqiEI1cce7u4UVp8r8LqfZvNHOW/0j4W5wzAXLW6F+JhykK4QY9t9Zz3xTdl j5t56sDZpKxwbF01428OmZHp4O/tmvJKJ0i5CR2HNxmkDocrMQIwAQejdScrk0m5byvTF9 3VIS/Y/t49hoiyd4lu007tVtJ6g4y9Fn8feOCpQ8S4JKVl9bXptA2rWgpgV5SSxF9IA8s4 Cj1JmrOzfVw2vUNqgwV36ZYdpNXQ6AEMGdBx59t7Xj2S2jPkCVyDCR7zkbppIA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 29 Feb 2024 16:23:01 +0100 Message-Id: Cc: "Gregory CLEMENT" , "Michael Turquette" , "Stephen Boyd" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Thomas Bogendoerfer" , "Linus Walleij" , =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= , "Philipp Zabel" , "Vladimir Kondratiev" , , , , , "Thomas Petazzoni" , "Tawfik Bayouk" , To: "Andy Shevchenko" From: =?utf-8?q?Th=C3=A9o_Lebrun?= Subject: Re: [PATCH v8 04/10] reset: eyeq5: add platform driver X-Mailer: aerc 0.15.2 References: <20240227-mbly-clk-v8-0-c57fbda7664a@bootlin.com> <20240227-mbly-clk-v8-4-c57fbda7664a@bootlin.com> In-Reply-To: X-GND-Sasl: theo.lebrun@bootlin.com Hello, On Thu Feb 29, 2024 at 2:48 PM CET, Andy Shevchenko wrote: > On Thu, Feb 29, 2024 at 01:18:08PM +0100, Th=C3=A9o Lebrun wrote: > > On Thu Feb 29, 2024 at 12:22 PM CET, Andy Shevchenko wrote: > > > On Wed, Feb 28, 2024 at 06:04:47PM +0100, Th=C3=A9o Lebrun wrote: > > > > On Tue Feb 27, 2024 at 6:27 PM CET, Andy Shevchenko wrote: > > > > > On Tue, Feb 27, 2024 at 03:55:25PM +0100, Th=C3=A9o Lebrun wrote: > > ... > > > > > > > + priv->rcdev.of_node =3D np; > > > > > > > > > > It's better to use device_set_node(). > > > >=20 > > > > I don't see how device_set_node() can help? It works on struct devi= ce > > > > pointers. Here priv->rcdev is a reset_controller_dev struct. There = are > > > > no users of device_set_node() in drivers/reset/. > > > > > > No users doesn't mean it's good. The API is relatively "new" and take= s > > > care of two things: > > > 1) it uses agnostic interface; > > > 2) it doesn't require any firmware node direct dereference. > > > > > > The 2) is most important here as allows us to refactor (firmware node= ) code > > > in the future. > >=20 > > I think I get the point of device_set_node(). I still do not understand > > how it could help me fill the ->of_node field in a reset_controller_dev > > structure? > > Exactly why I put the above comment as recommendation. And then I elabora= ted > that entire reset framework should rather move towards fwnode. OK now I get it. One question: would using fwnode abstractions make sense for a driver that is devicetree-only, and will stay that way? However this sounds out-of-scope of such a driver addition. I also am not familiar enough (yet?) with the reset subsystem and/or fwnode to be able to bring this kind of changes upstream. Thanks, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com