Re: [net-next PATCH 01/11] net: dsa: qca8k: add LEDs basic support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +qca8k_setup_led_ctrl(struct qca8k_priv *priv)
> +{
> +	struct fwnode_handle *ports, *port;
> +	int port_num;
> +	int ret;
> +
> +	ports = device_get_named_child_node(priv->dev, "ports");
> +	if (!ports) {
> +		dev_info(priv->dev, "No ports node specified in device tree!\n");
> +		return 0;
> +	}
> +
> +	fwnode_for_each_child_node(ports, port) {
> +		struct fwnode_handle *phy_node, *reg_port_node = port;
> +
> +		phy_node = fwnode_find_reference(port, "phy-handle", 0);
> +		if (!IS_ERR(phy_node))
> +			reg_port_node = phy_node;

I don't understand this bit. Why are you looking at the phy-handle?

> +
> +		if (fwnode_property_read_u32(reg_port_node, "reg", &port_num))
> +			continue;

I would of expect port, not reg_port_node. I'm missing something
here....

	Andrew



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux