From: Andre Przywara <andre.przywara@arm.com>
To: Samuel Holland <samuel@sholland.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>,
Anatolij Gustschin <agust@denx.de>,
Jagan Teki <jagan@amarulasolutions.com>,
Lukasz Majewski <lukma@denx.de>,
Sean Anderson <seanga2@gmail.com>,
u-boot@lists.denx.de
Subject: Re: [PATCH 2/5] video: sunxi: dw-hdmi: Probe driver by compatible
Date: Sat, 3 Dec 2022 17:14:26 +0000 [thread overview]
Message-ID: <20221203171426.77885d09@slackpad.lan> (raw)
In-Reply-To: <20221128070229.4394-3-samuel@sholland.org>
On Mon, 28 Nov 2022 01:02:25 -0600
Samuel Holland <samuel@sholland.org> wrote:
> From: Jernej Skrabec <jernej.skrabec@gmail.com>
>
> Currently the sunxi dw-hdmi driver is probed unconditionally,
> even if there is no such device.
>
> Switch the driver to probing via a compatible string. This brings many
> benefits; the driver is only probed when needed, and now it can read the
> DT node.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
>
> drivers/video/sunxi/sunxi_dw_hdmi.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c
> index 19ed80b48a4..e7265af7d8f 100644
> --- a/drivers/video/sunxi/sunxi_dw_hdmi.c
> +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
> @@ -370,14 +370,16 @@ static const struct dm_display_ops sunxi_dw_hdmi_ops = {
> .mode_valid = sunxi_dw_hdmi_mode_valid,
> };
>
> -U_BOOT_DRIVER(sunxi_dw_hdmi) = {
> - .name = "sunxi_dw_hdmi",
> - .id = UCLASS_DISPLAY,
> - .ops = &sunxi_dw_hdmi_ops,
> - .probe = sunxi_dw_hdmi_probe,
> - .priv_auto = sizeof(struct sunxi_dw_hdmi_priv),
> +static const struct udevice_id sunxi_dw_hdmi_ids[] = {
> + { .compatible = "allwinner,sun8i-a83t-dw-hdmi" },
> + { }
> };
>
> -U_BOOT_DRVINFO(sunxi_dw_hdmi) = {
> - .name = "sunxi_dw_hdmi"
> +U_BOOT_DRIVER(sunxi_dw_hdmi) = {
> + .name = "sunxi_dw_hdmi",
> + .id = UCLASS_DISPLAY,
> + .of_match = sunxi_dw_hdmi_ids,
> + .probe = sunxi_dw_hdmi_probe,
> + .priv_auto = sizeof(struct sunxi_dw_hdmi_priv),
> + .ops = &sunxi_dw_hdmi_ops,
> };
next prev parent reply other threads:[~2022-12-03 17:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 7:02 [PATCH 0/5] video: sunxi: dw-hdmi: Partial OF conversion Samuel Holland
2022-11-28 7:02 ` [PATCH 1/5] clk: sunxi: Add DE2 display-related clocks/resets Samuel Holland
2022-12-03 17:14 ` Andre Przywara
2022-11-28 7:02 ` [PATCH 2/5] video: sunxi: dw-hdmi: Probe driver by compatible Samuel Holland
2022-12-03 17:14 ` Andre Przywara [this message]
2022-11-28 7:02 ` [PATCH 3/5] video: sunxi: dw-hdmi: Read address from DT node Samuel Holland
2023-01-23 1:09 ` Andre Przywara
2022-11-28 7:02 ` [PATCH 4/5] video: sunxi: dw-hdmi: Use DM for clock gates and resets Samuel Holland
2023-01-23 0:47 ` Andre Przywara
2022-11-28 7:02 ` [PATCH 5/5] video: sunxi: dw-hdmi: Use DM for HVCC regulator Samuel Holland
2023-01-23 1:10 ` Andre Przywara
2022-12-03 9:48 ` [PATCH 0/5] video: sunxi: dw-hdmi: Partial OF conversion Jernej Škrabec
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=20221203171426.77885d09@slackpad.lan \
--to=andre.przywara@arm.com \
--cc=agust@denx.de \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=lukma@denx.de \
--cc=samuel@sholland.org \
--cc=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/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