From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E76CDC352A1 for ; Sat, 3 Dec 2022 17:16:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1FC8785225; Sat, 3 Dec 2022 18:16:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 17275851FC; Sat, 3 Dec 2022 18:16:06 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 949BF851FC for ; Sat, 3 Dec 2022 18:16:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ACE7923A; Sat, 3 Dec 2022 09:16:08 -0800 (PST) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DD0453F67D; Sat, 3 Dec 2022 09:16:00 -0800 (PST) Date: Sat, 3 Dec 2022 17:14:26 +0000 From: Andre Przywara To: Samuel Holland Cc: Jernej Skrabec , Anatolij Gustschin , Jagan Teki , Lukasz Majewski , Sean Anderson , u-boot@lists.denx.de Subject: Re: [PATCH 2/5] video: sunxi: dw-hdmi: Probe driver by compatible Message-ID: <20221203171426.77885d09@slackpad.lan> In-Reply-To: <20221128070229.4394-3-samuel@sholland.org> References: <20221128070229.4394-1-samuel@sholland.org> <20221128070229.4394-3-samuel@sholland.org> Organization: Arm Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Mon, 28 Nov 2022 01:02:25 -0600 Samuel Holland wrote: > From: Jernej Skrabec > > 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 > Signed-off-by: Samuel Holland Reviewed-by: Andre Przywara 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, > };