<html><body><p>
<pre>
Hi, Shu-hsiang:
On Wed, 2024-10-09 at 19:15 +0800, Shu-hsiang Yang wrote:
> Introduces support for the sensor interface in the MediaTek SoC,
> with the focus on CSI and stream control. The key functionalities
> include parameter control, metering and maintaining status information,
> interrupt handling, and debugging. These features ensure effective
> management and debugging of the camera sensor interface hardware.
>
> Signed-off-by: Shu-hsiang Yang <Shu-hsiang.Yang@mediatek.com>
> ---
[snip]
> +int mtk_cam_seninf_init_iomem(struct seninf_ctx *ctx, void __iomem *if_base,
> + void __iomem *ana_base)
> +{
This function is defined in this patch but only used by patch [3/10].
There are many function defined in this patch but used only in patch [3/10].
I think this patch and patch [3/10] should be merged into one patch which is a complete sensor interface driver.
To prevent this patch to be too big, separate advanced function to another patches.
Regards,
CK
> +u32 i;
> +
> +ctx->reg_ana_csi_rx[CSI_PORT_0] =
> +ctx->reg_ana_csi_rx[CSI_PORT_0A] = ana_base + 0;
> +ctx->reg_ana_csi_rx[CSI_PORT_0B] = ana_base + 0x1000;
> +
> +ctx->reg_ana_csi_rx[CSI_PORT_1] =
> +ctx->reg_ana_csi_rx[CSI_PORT_1A] = ana_base + 0x4000;
> +ctx->reg_ana_csi_rx[CSI_PORT_1B] = ana_base + 0x5000;
> +
> +ctx->reg_ana_csi_rx[CSI_PORT_2] =
> +ctx->reg_ana_csi_rx[CSI_PORT_2A] = ana_base + 0x8000;
> +ctx->reg_ana_csi_rx[CSI_PORT_2B] = ana_base + 0x9000;
> +
> +ctx->reg_ana_csi_rx[CSI_PORT_3] =
> +ctx->reg_ana_csi_rx[CSI_PORT_3A] = ana_base + 0xc000;
> +ctx->reg_ana_csi_rx[CSI_PORT_3B] = ana_base + 0xd000;
> +
> +ctx->reg_ana_dphy_top[CSI_PORT_0A] =
> +ctx->reg_ana_dphy_top[CSI_PORT_0B] =
> +ctx->reg_ana_dphy_top[CSI_PORT_0] = ana_base + 0x2000;
> +
> +ctx->reg_ana_dphy_top[CSI_PORT_1A] =
> +ctx->reg_ana_dphy_top[CSI_PORT_1B] =
> +ctx->reg_ana_dphy_top[CSI_PORT_1] = ana_base + 0x6000;
> +
> +ctx->reg_ana_dphy_top[CSI_PORT_2A] =
> +ctx->reg_ana_dphy_top[CSI_PORT_2B] =
> +ctx->reg_ana_dphy_top[CSI_PORT_2] = ana_base + 0xa000;
> +
> +ctx->reg_ana_dphy_top[CSI_PORT_3A] =
> +ctx->reg_ana_dphy_top[CSI_PORT_3B] =
> +ctx->reg_ana_dphy_top[CSI_PORT_3] = ana_base + 0xe000;
> +
> +ctx->reg_ana_cphy_top[CSI_PORT_0A] =
> +ctx->reg_ana_cphy_top[CSI_PORT_0B] =
> +ctx->reg_ana_cphy_top[CSI_PORT_0] = ana_base + 0x3000;
> +
> +ctx->reg_ana_cphy_top[CSI_PORT_1A] =
> +ctx->reg_ana_cphy_top[CSI_PORT_1B] =
> +ctx->reg_ana_cphy_top[CSI_PORT_1] = ana_base + 0x7000;
> +
> +ctx->reg_ana_cphy_top[CSI_PORT_2A] =
> +ctx->reg_ana_cphy_top[CSI_PORT_2B] =
> +ctx->reg_ana_cphy_top[CSI_PORT_2] = ana_base + 0xb000;
> +
> +ctx->reg_ana_cphy_top[CSI_PORT_3A] =
> +ctx->reg_ana_cphy_top[CSI_PORT_3B] =
> +ctx->reg_ana_cphy_top[CSI_PORT_3] = ana_base + 0xf000;
> +
> +ctx->reg_if_top = if_base;
> +
> +for (i = SENINF_1; i < _seninf_cfg.seninf_num; i++) {
> +ctx->reg_if_ctrl[i] = if_base + 0x0200 + (0x1000 * i);
> +ctx->reg_if_tg[i] = if_base + 0x0F00 + (0x1000 * i);
> +ctx->reg_if_csi2[i] = if_base + 0x0a00 + (0x1000 * i);
> +}
> +
> +for (i = SENINF_MUX1; i < _seninf_cfg.mux_num; i++)
> +ctx->reg_if_mux[i] = if_base + 0x0d00 + (0x1000 * i);
> +
> +ctx->reg_if_cam_mux = if_base + 0x0400;
> +
> +return 0;
> +}
> +
</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->