mipi_tx = devm_kzalloc(dev, sizeof(*mipi_tx), GFP_KERNEL); if (!mipi_tx) return -ENOMEM;
mipi_tx->driver_data = of_device_get_match_data(dev); if (!mipi_tx->driver_data) return -ENODEV;
mipi_tx->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mipi_tx->regs)) return PTR_ERR(mipi_tx->regs);
ref_clk = devm_clk_get(dev, NULL); if (IS_ERR(ref_clk)) return dev_err_probe(dev, PTR_ERR(ref_clk), "Failed to get reference clock\n");
ret = of_property_read_u32(dev->of_node, "drive-strength-microamp",
&mipi_tx->mipitx_drive); /* If can't get the "mipi_tx->mipitx_drive", set it default 0x8 */ if (ret < 0)
mipi_tx->mipitx_drive = 4600;
/* check the mipitx_drive valid */ if (mipi_tx->mipitx_drive > 6000 || mipi_tx->mipitx_drive < 3000) {
dev_warn(dev, "drive-strength-microamp is invalid %d, not in 3000 ~ 6000\n",
mipi_tx->mipitx_drive);
mipi_tx->mipitx_drive = clamp_val(mipi_tx->mipitx_drive, 3000,
6000);
}
ref_clk_name = __clk_get_name(ref_clk);
ret = of_property_read_string(dev->of_node, "clock-output-names",
&clk_init.name); if (ret < 0) return dev_err_probe(dev, ret, "Failed to read clock-output-names\n");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.