Re: [PATCH RFC net-next 02/13] dpll: Allow registering pin with firmware node

From: Ivan Vecera

Date: Sun Dec 14 2025 - 14:35:08 EST




On December 12, 2025 12:25:12 PM GMT+01:00, Jiri Pirko <jiri@xxxxxxxxxxx> wrote:
>Thu, Dec 11, 2025 at 08:47:45PM +0100, ivecera@xxxxxxxxxx wrote:
>
>[..]
>
>>@@ -559,7 +563,8 @@ EXPORT_SYMBOL(dpll_netdev_pin_clear);
>> */
>> struct dpll_pin *
>> dpll_pin_get(u64 clock_id, u32 pin_idx, struct module *module,
>>- const struct dpll_pin_properties *prop)
>>+ const struct dpll_pin_properties *prop,
>>+ struct fwnode_handle *fwnode)
>> {
>> struct dpll_pin *pos, *ret = NULL;
>> unsigned long i;
>>@@ -568,14 +573,15 @@ dpll_pin_get(u64 clock_id, u32 pin_idx, struct module *module,
>> xa_for_each(&dpll_pin_xa, i, pos) {
>> if (pos->clock_id == clock_id &&
>> pos->pin_idx == pin_idx &&
>>- pos->module == module) {
>>+ pos->module == module &&
>>+ pos->fwnode == fwnode) {
>
>Is fwnode part of the key? Doesn't look to me like that. Then you can
>have a simple helper to set fwnode on struct dpll_pin *, and leave
>dpll_pin_get() out of this, no?

IMHO yes, because particular fwnode identifies exact dpll pin, so
I think it should be a part of the key.