Thread (16 messages) flat view 16 messages, 5 authors, 5d ago

Re: [PATCH net-next v1 2/2] net: dsa: realtek: rtl83xx: add support for enabling supplies

From: Oleksij Rempel <o.rempel@pengutronix.de>
Date: 2026-08-07 04:26:34
Also in: linux-devicetree, lkml

On Thu, Aug 06, 2026 at 07:40:29PM +0200, Linus Walleij wrote:
On Thu, Aug 6, 2026 at 5:56 PM Ahmad Fatoum [off-list ref] wrote:

[Andrew says]
quoted
quoted
static inline int __must_check clk_bulk_get_optional(struct device *dev,
static inline int __must_check devm_clk_bulk_get_optional(struct device *dev,
static inline int __must_check devm_clk_bulk_get_optional_enable(struct device *dev,

If clk has them, maybe regulators should as well?
clk and regulator have different interpretations of _optional
when encountering a non-existent resource:

clk_get                 return error
clk_get_optional        return NULL
regulator_get           return handle dummy regulator
regulator_get_optional  return error code

So devm_regulator_bulk_get() is already the "optional" variant, but it causes
all existing users to get dummy supply warnings.
So is this a big problem? Does it cause any other issues than
dmesg noise?
As tested with local sashiko setup, new warnings for existing system
without good reason will be reported as regression, so it will be
blocker for net-next inclusion.

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help