[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <27f26edc-5248-4562-8c26-c5dcce9dde59@lunn.ch>
Date: Mon, 3 Apr 2023 14:35:03 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: netdev@...r.kernel.org, linux@...linux.org.uk,
mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next 1/6] net: txgbe: Add software nodes to support
phylink
> + nodes->gpio_props[0] = PROPERTY_ENTRY_STRING("pinctrl-names", "default");
> + swnodes[SWNODE_GPIO] = NODE_PROP(nodes->gpio_name, nodes->gpio_props);
> + nodes->gpio0_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 0, GPIO_ACTIVE_HIGH);
> + nodes->gpio1_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 1, GPIO_ACTIVE_HIGH);
> + nodes->gpio2_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 2, GPIO_ACTIVE_LOW);
> + nodes->gpio3_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 3, GPIO_ACTIVE_HIGH);
> + nodes->gpio4_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 4, GPIO_ACTIVE_HIGH);
> + nodes->gpio5_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 5, GPIO_ACTIVE_HIGH);
Please could you add some comments indicating what these 6 GPIOs
are. Or use more descriptive names than gpioX_ref.
> +int txgbe_init_phy(struct txgbe *txgbe)
> +{
> + int ret;
> +
> + ret = txgbe_swnodes_register(txgbe);
> + if (ret) {
> + wx_err(txgbe->wx, "failed to register software nodes\n");
> + return ret;
> + }
> +
> + return 0;
I assume this function is going to be extended with later patches?
Otherwise you can simply it.
Andrew
Powered by blists - more mailing lists