Re: [PATCH v2 2/3] tty: serial: 8250: Add loongson uart driver support

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

 



Le 04/08/2024 à 08:38, zhenghaowei-cXZgJK919ebM1kAEIRd3EQ@xxxxxxxxxxxxxxxx a écrit :
From: Haowei Zheng <zhenghaowei-cXZgJK919ebM1kAEIRd3EQ@xxxxxxxxxxxxxxxx>

Due to certain hardware design challenges, we have opted to
utilize a dedicated UART driver to probe the UART interface.

Presently, we have defined four parameters — 'fractional-division',
'invert-rts', 'invert-dtr', 'invert-cts', and 'invert-dsr' — which
will be employed as needed.

Signed-off-by: Haowei Zheng <zhenghaowei-cXZgJK919ebM1kAEIRd3EQ@xxxxxxxxxxxxxxxx>
---

Hi,

...

+	data->rst = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
+	if (IS_ERR(data->rst))
+		return PTR_ERR(data->rst);
+
+	device_property_read_u32(&pdev->dev, "clock-frequency", &port->uartclk);
+
+	ret = reset_control_deassert(data->rst);
+	if (ret)
+		goto err_unprepare;

Should reset_control_assert() be called if an error occurs later?

+
+	ret = serial8250_register_8250_port(&uart);
+	if (ret < 0)
+		goto err_unprepare;
+
+	platform_set_drvdata(pdev, data);
+	data->line = ret;
+
+	return 0;
+
+err_unprepare:

What is this label for?

+
+	return ret;
+}

CJ





[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