[PATCH v5 3/5] media: platform: mediatek: isp_30: add mediatek ISP3.0 sensor interface
CK Hu (胡俊光)
ck.hu at mediatek.com
Wed Jul 17 19:44:35 PDT 2024
Hi, Julien:
On Thu, 2024-07-04 at 15:36 +0200, Julien Stephan wrote:
>
> External email : Please do not click links or open attachments until you have verified the sender or the content.
> From: Louis Kuo <louis.kuo at mediatek.com>
>
> This will add the mediatek ISP3.0 seninf (sensor interface) driver found
> on several Mediatek SoCs such as the mt8365.
>
> Then seninf module has 4 physical CSI-2 inputs. Depending on the soc they
> may not be all connected.
>
> Signed-off-by: Louis Kuo <louis.kuo at mediatek.com>
> Signed-off-by: Phi-bang Nguyen <pnguyen at baylibre.com>
> Signed-off-by: Florian Sylvestre <fsylvestre at baylibre.com>
> Co-developed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Co-developed-by: Julien Stephan <jstephan at baylibre.com>
> Signed-off-by: Julien Stephan <jstephan at baylibre.com>
> ---
[snip]
> +static const struct mtk_seninf_conf seninf_8365_conf = {
> +.model = "mtk-camsys-3.0",
> +.nb_inputs = 4,
> +.nb_muxes = 6,
> +.nb_outputs = 4,
> +};
> +
I think you should directly define these value as symbols because now
only support one SoC.
#define MODEL "mtk-camsys-3.0"
#define INPUT_NR 4
#define MUTEX_NR 6
#define OUTPUT_NR 4
Because we don't know which SoC would be upstream later, maybe the next
SoC would be
static const struct mtk_seninf_conf seninf_83xx_conf = {
.model = "mtk-camsys-3.0",
.nb_inputs = 4,
.nb_muxes = 6,
.nb_outputs = 4,
.support_xxx = true;
};
then model, nb_inputs, nb_muxes, and nb_outputs has no difference, so
it's not necessary to define them as variable. So define them as
constant now, and when next SoC upstream, then we know which one would
be variable.
Regards,
CK
More information about the Linux-mediatek
mailing list