linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Robert Foss <robert.foss@linaro.org>,
	Paul Boddie <paul@boddie.org.uk>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Maxime Ripard <maxime@cerno.tech>,
	Harry Wentland <harry.wentland@amd.com>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-mips <linux-mips@vger.kernel.org>,
	Discussions about the Letux Kernel 
	<letux-kernel@openphoenux.org>,
	Ezequiel Garcia <ezequiel@collabora.com>
Subject: Re: [PATCH v15 2/7] drm/ingenic: Add dw-hdmi driver specialization for jz4780
Date: Mon, 14 Feb 2022 11:30:54 +0000	[thread overview]
Message-ID: <IBLA7R.1NQX4KVACXPK3@crapouillou.net> (raw)
In-Reply-To: <AD978522-8321-476D-955C-3CDD747EFCAC@goldelico.com>



Le lun., févr. 14 2022 at 12:02:53 +0100, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> Hi Paul,
> 
>>  Am 14.02.2022 um 11:24 schrieb Paul Cercueil <paul@crapouillou.net>:
>> 
>>  Hi,
>> 
>>  Le sam., févr. 12 2022 at 16:50:50 +0100, H. Nikolaus Schaller 
>> <hns@goldelico.com> a écrit :
> 
>>>  +static void ingenic_dw_hdmi_cleanup(void *data)
>>>  +{
>>>  +	struct dw_hdmi *hdmi = (struct dw_hdmi *)data;
>>>  +
>>>  +	dw_hdmi_remove(hdmi);
>>>  +}
>>>  +
>>>  +static int ingenic_dw_hdmi_probe(struct platform_device *pdev)
>>>  +{
>>>  +	struct dw_hdmi *hdmi;
>>>  +
>>>  +	hdmi = dw_hdmi_probe(pdev, &ingenic_dw_hdmi_plat_data);
>>>  +	if (IS_ERR(hdmi))
>>>  +		return PTR_ERR(hdmi);
>>>  +
>>>  +	return devm_add_action_or_reset(&pdev->dev, 
>>> ingenic_dw_hdmi_cleanup, hdmi);
>> 
>>  I think I said it already, but in this driver you could use a 
>> .remove callback, there's not much point in using devm cleanups in 
>> such a simple setup.
> 
> Well it was your suggestion after v8:
> 
> https://lore.kernel.org/all/DIA33R.QE29K7RKLI2C1@crapouillou.net/

It made sense for your v8, not so much for your v15...

> So we now almost go back to RFC v1 almost 2 years ago:
> 
> https://patchwork.kernel.org/project/linux-mips/patch/2c131e1fb19e19f958a612f7186bc83f4afb0b0a.1582744379.git.hns@goldelico.com/
> 
> Of course there was a good reason to better handle the regulator
> AND the dw_hdmi_remove() by a single mechanism.
> 
> Now the regulator has gone and been replaced by the hdmi connector
> and we can go back.
> 
>> 
>>  In your probe you could just:
>>  return PTR_ERR_OR_ZERO(hdmi);
> 
> No, this does not work since we need to platform_set_drvdata().
> to be able to access the private struct in the remove callback.
> And checking errors after platform_set_drvdata() can be done but
> looks strange to me.

Yeah, I guess it would look strange. Fine then.

Then I guess just merge your current [6/7] with this one (and make sure 
it comes after your current [5/7]) and it looks mergeable to me.

Cheers,
-Paul

> It is up to you what you prefer.
> 
>> 
>>>  +}
>>>  +
>>>  +static struct platform_driver ingenic_dw_hdmi_driver = {
>>>  +	.probe  = ingenic_dw_hdmi_probe,
>>>  +	.driver = {
>>>  +		.name = "dw-hdmi-ingenic",
>>>  +		.of_match_table = ingenic_dw_hdmi_dt_ids,
>>>  +	},
>>>  +};
>>>  +module_platform_driver(ingenic_dw_hdmi_driver);
>>>  +
>>>  +MODULE_DESCRIPTION("JZ4780 Specific DW-HDMI Driver Extension");
>>>  +MODULE_LICENSE("GPL v2");
>>>  +MODULE_ALIAS("platform:dwhdmi-ingenic");
>> 
>>  Should probably be "platform:dw-hdmi-ingenic"?
> 
> Yes, indeed. Thanks for spotting!
> 
> Was also good in v1. Probably someone deleted the hyphen unnoticed 
> during editing of "jz4780" to "ingenic"...





  reply	other threads:[~2022-02-14 11:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12 15:50 [PATCH v15 0/7] MIPS: JZ4780 and CI20 HDMI H. Nikolaus Schaller
2022-02-12 15:50 ` [PATCH v15 1/7] drm/ingenic: Fix support for JZ4780 HDMI output H. Nikolaus Schaller
2022-02-14 10:13   ` Paul Cercueil
2022-02-14 10:19     ` H. Nikolaus Schaller
2022-02-14 12:29       ` Paul Cercueil
2022-02-14 12:33         ` H. Nikolaus Schaller
2022-02-14 12:36           ` Paul Cercueil
2022-02-14 13:10             ` H. Nikolaus Schaller
2022-02-12 15:50 ` [PATCH v15 2/7] drm/ingenic: Add dw-hdmi driver specialization for jz4780 H. Nikolaus Schaller
2022-02-14 10:24   ` Paul Cercueil
2022-02-14 11:02     ` H. Nikolaus Schaller
2022-02-14 11:30       ` Paul Cercueil [this message]
2022-02-12 15:50 ` [PATCH v15 3/7] drm/bridge: display-connector: add ddc-en gpio support H. Nikolaus Schaller
2022-02-12 15:50 ` [PATCH v15 4/7] drm/bridge: dw-hdmi: repair interworking with hdmi-connector for jz4780 H. Nikolaus Schaller
2022-02-21  8:11   ` Neil Armstrong
2022-02-26 17:12     ` H. Nikolaus Schaller
2022-02-12 15:50 ` [PATCH v15 5/7] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() H. Nikolaus Schaller
2022-02-12 15:50 ` [PATCH v15 6/7] drm/ingenic: dw-hdmi: make hot plug detection work for CI20 H. Nikolaus Schaller
2022-02-14 10:18   ` Paul Cercueil
2022-02-12 15:50 ` [PATCH v15 7/7] [RFC] drm/ingenic: add some more features specific to jz4780 H. Nikolaus Schaller

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=IBLA7R.1NQX4KVACXPK3@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ezequiel@collabora.com \
    --cc=harry.wentland@amd.com \
    --cc=hns@goldelico.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=narmstrong@baylibre.com \
    --cc=paul@boddie.org.uk \
    --cc=robert.foss@linaro.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).