From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C78C6384222 for ; Mon, 23 Mar 2026 22:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774306130; cv=none; b=Oh5wCpxOIDDyyIEogeE/8LUWZ5qHn6U+owowATej9/5jPdE/4EanURDQ5ZC2+7KJFb4ED61igEBtgu8RrbDAh0iJ/8e1mjhICU2YCa6hGmOOBI1jW9Ufzlnh71WRBlGAPTe6dM9fF6rgEJ7RxUgMRp5itdQxYZ6fXELXPUcyMqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774306130; c=relaxed/simple; bh=RMwiUT2ca7SpehwMARA0+INqWPmeSfWclA5GGkGeRtc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ahSDvcRnQrxVr54WZFf765FMtRKJ0+JgE4AHZoqn/hcHNPACOIRAsRGN8CwcAfR0dIIwyM5dxxbn3G+vjDVn+icOWiZC4sN3XcSMb0TrCzTA+J0B8JgRAixfLEnmK+cKEYDk/erTrfTVl7CqXp96j9dAHJt5gAREeksMrufLOro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=sSJqU6De; arc=none smtp.client-ip=74.125.82.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sSJqU6De" Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-2c0bb213b16so8258888eec.0 for ; Mon, 23 Mar 2026 15:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774306127; x=1774910927; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FGbAPMtb3fAC8y7bB7RIg3tLmv+zXAom99Sn+GnnvxY=; b=sSJqU6DegKv7IdQwHWHwBn6RLPAtdU3yFxud7ldnANkyYkukyvjOiHZd92mNeVkVHb qQvZ/+BhQsaC4E06XMg5JJqllbYc1ZSxTTwZB4FsBGCY7Fht0NX+bJGZKsNtHhohmSl2 qyirqzYfhLMuUm2bKIJxYg+pnUKHNrzN4aRavXpgtxKgroaEUqks25YTCmSSCbPsNIQ8 l3uRYfIVWD4e5xdMof9QZ1y4DtsVgmjOrRpMYePU2RsvQFlN5v3DXW7Rnos5EMaqvSBJ 3O6vFYrgmbOxNe8jNyJCRG0g5wCK1zJIlN+BaKRzpbXNPC7n8sluOeE8rVgzkPzKXc8K M0Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774306127; x=1774910927; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FGbAPMtb3fAC8y7bB7RIg3tLmv+zXAom99Sn+GnnvxY=; b=dFrbNlLgJjefG54OHhthYl2ijsoAiV9XGssDvBNDrExQ/BsKnaHS0bbbnBb3WJ3dmr AmsQEkj0YbJnPIMEOC4+Py8nvhGHQzRLtK3y96pxt5e5sAlOFTqCz+CzamjnFG3oAHOo 1UzOlrlC5YaK6jg2rpvws31gAgm1EzkksaNCkYpfgmQu09IEWDkbMMrcjRROjIaTk3um iKBdD13pRpkqD/61z07r0mvDlUG6CFKwgzY74PGSNCQ39iAhmbPmCS3k4MXwNO1Cd40m hCd6uxxw4xSCQiKvzypP70HVaLAt4h+DlpygThtx3Lia+CXNf0SBv0Y3FYEwojDa6h6/ HJ2g== X-Forwarded-Encrypted: i=1; AJvYcCVR9DXUID6zTvyg2Psb+BwyJLxTN/FBIVtUqfp36ZaIpp8uOId0HUFig+Dmd5Xq8wTk10+z3AA=@vger.kernel.org X-Gm-Message-State: AOJu0Yys0sNGEcA7XLaA9+UwTjee3PyWhGlEBbYQxunDXy/+ezQC9Mk4 f2KG7IbrKT3H2hilByiys2e6nEQLrhV3ilEHbRaMp139gBGLguqUfGEI X-Gm-Gg: ATEYQzybjsmmRkmGHR2ch91+Ms4As/rcR+f/zuuB++wW/OzMoUqTeLIehbpLRXLOg00 N//zN8StocgNkKKo7VwkrPruHDD1ZVbHA7L52hbBU3S5hbtdufWzj8NkBgkZrHj+89lfUxhMWD3 OI0ijQYWxxgQa5zSC1RUW8OiBO/0b71hsKuDWDeGKSQaA6MqBX/GMWRQ2cirLRw/ObO4zcb/D4c XZE2+eWJohLhqaYgdJoU36w0th+RCtnz48ThPR3V9ZOWLvWThuIt0lQbhlHFqJ6aAIv4ZVVbOQ/ G0jh5k0sfegqDNDiqm8X82+iflUq7RwKWexHzrmmfUWpbNcQFC1/oP4pqi0gzYKftZv2NEqNXZP 2FGZ+elhWwoKMcpFH3sJowEeERy+Ioi1vntybywQliAR/38WHWUnI4pw0Syu16hg/mRGU8Pp76f Ay/Ls6Tt8LkfFM7ZBS7KPQyBnohFqGoEvTIM0/aFGW3m8d0+A+PQ70MxV3TscpL8OX X-Received: by 2002:a05:7301:9f0c:b0:2b8:4c95:365d with SMTP id 5a478bee46e88-2c1095f54afmr6740228eec.10.1774306126689; Mon, 23 Mar 2026 15:48:46 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:a296:1211:5ab0:bc95]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2c1313bf5fdsm5080230eec.14.2026.03.23.15.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2026 15:48:46 -0700 (PDT) Date: Mon, 23 Mar 2026 15:48:42 -0700 From: Dmitry Torokhov To: Andrew Lunn Cc: Mark Brown , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Neil Armstrong , Liam Girdwood , Lee Jones , Pavel Machek , Peter Rosin , Heiner Kallweit , Russell King , Moritz Fischer , Xu Yilun , Tom Rix , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-spi@vger.kernel.org, linux-leds@vger.kernel.org, linux-fpga@vger.kernel.org, driver-core@lists.linux.dev Subject: Re: [PATCH 04/10] regulator: of: switch to using class_find_device_by_fwnode() Message-ID: References: <20260322-remove-device-find-by-of-node-v1-4-b72eb22a1215@gmail.com> <360a8b4a-6507-417a-9fc1-c53b14868657@sirena.org.uk> <7d46803e-b285-4e9c-8856-10100fa0ea85@sirena.org.uk> <193e194a-498f-464f-b22c-c283c16db6c1@sirena.org.uk> <09072374-65e7-4792-af7e-97d7df93f9bd@lunn.ch> <27f4ed63-08a2-4621-8943-c50261de31cd@lunn.ch> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27f4ed63-08a2-4621-8943-c50261de31cd@lunn.ch> On Mon, Mar 23, 2026 at 11:39:03PM +0100, Andrew Lunn wrote: > > If there is a deprecated property you can do: > > > > error = device_property_read_u32(dev, "prop", &val); > > if (error == -ENOENT) > > error = device_property_read_u32(dev, "deprecated-prop", &val); > > It is not as simple as that. There are a lot of optional > properties. Say "prop" is optional? And not present. So -ENOENT. We > then look for this deprecated property. That should not happen. Why? That is exactly what you want: you favor new one if it is present and fall back to deprecated one if it is absent. And then you decide whether to continue or abort. Or you are saying that new property is optional but old one was mandatory? Not sure... > > Using of_property_read_u32(np, "deprecated-prop", &val) actually makes > it stand out, it is special somehow, which is good, because it is > special. If you only have of_property_read_u32() then it will not stand out. If you advocate of using device_property_read_u32() normally but of_property_read_u32() for deprecated only - that is a possibility, but I do not know if anyone does this. Thanks. -- Dmitry