From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Paulo Pavacic <pavacic.p@gmail.com>,
neil.armstrong@linaro.org, sam@ravnborg.org, airlied@gmail.com,
daniel@ffwll.ch, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/3] drm/panel-fannal-c3004: Add fannal c3004 DSI panel
Date: Tue, 6 Jun 2023 16:45:47 +0200 [thread overview]
Message-ID: <dfe2c108-0268-c4d0-226e-b3d2bc8c3369@linaro.org> (raw)
In-Reply-To: <20230606140757.818705-4-pavacic.p@gmail.com>
On 06/06/2023 16:07, Paulo Pavacic wrote:
> Fannal C3004 is a 480x800 display made by fannal that requires
> DCS initialization sequences.
>
> Signed-off-by: Paulo Pavacic <pavacic.p@gmail.com>
> ---
> v4 changelog:
> - formatting and style changes
Are you sure? I see other changes - removal of some code, handling
errors and GPIO.
> - change community room
What does it mean? Where is this change in this patch?
...
> +
> +static const struct drm_panel_funcs fannal_panel_funcs = {
> + .prepare = fannal_panel_prepare,
> + .unprepare = fannal_panel_unprepare,
> + .enable = fannal_panel_enable,
> + .disable = fannal_panel_disable,
> + .get_modes = fannal_panel_get_modes,
> +};
> +
> +static int fannal_panel_probe(struct mipi_dsi_device *dsi)
> +{
> + struct device *dev = &dsi->dev;
> + struct fannal_panel_data *panel_data;
> + int ret;
> +
> + panel_data = devm_kzalloc(&dsi->dev, sizeof(*panel_data), GFP_KERNEL);
> +
Drop blank line.
> + if (!panel_data)
> + return -ENOMEM;
> +
> + panel_data->reset =
You have wrong wrapping here. devm_gpiod_get_optional() goes after =.
> + devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
> +
Drop blank line.
> + if (IS_ERR(panel_data->reset)) {
> + return dev_err_probe(
> + dev, PTR_ERR(panel_data->reset),
> + "error: probe: get reset GPIO: (%d) Check the fdt\n",
> + ret);
> + }
> +
> + mipi_dsi_set_drvdata(dsi, panel_data);
> +
> + dsi->format = MIPI_DSI_FMT_RGB888;
> + dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS |
> + MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_HSE |
> + MIPI_DSI_MODE_NO_EOT_PACKET |
> + MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_VIDEO;
> + dsi->lanes = 2;
> +
> + gpiod_set_value_cansleep(panel_data->reset, 1);
> +
> + drm_panel_init(&panel_data->panel, dev, &fannal_panel_funcs,
> + DRM_MODE_CONNECTOR_DSI);
> + dev_set_drvdata(dev, panel_data);
> +
> + drm_panel_add(&panel_data->panel);
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-06-06 14:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 14:07 [PATCH v3 0/3] drm/panel: add fannal c3004 panel Paulo Pavacic
2023-06-06 14:07 ` [PATCH v3 1/3] dt-bindings: add fannal vendor prefix Paulo Pavacic
2023-06-06 14:42 ` Krzysztof Kozlowski
2023-06-06 14:07 ` [PATCH v3 2/3] dt-bindings: display: panel: add fannal,c3004 Paulo Pavacic
2023-06-06 14:43 ` Krzysztof Kozlowski
2023-06-07 9:29 ` Paulo Pavacic
2023-06-07 9:56 ` Krzysztof Kozlowski
2023-06-06 14:07 ` [PATCH v3 3/3] drm/panel-fannal-c3004: Add fannal c3004 DSI panel Paulo Pavacic
2023-06-06 14:45 ` Krzysztof Kozlowski [this message]
2023-06-07 13:38 ` Paulo Pavacic
2023-06-07 13:57 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfe2c108-0268-c4d0-226e-b3d2bc8c3369@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=pavacic.p@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).