From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: Dariusz Marcinkiewicz <darekm@google.com>, linux-media@vger.kernel.org
Subject: Re: [PATCH v5 3/9] dw-hdmi-cec: use cec_notifier_cec_adap_(un)register
Date: Fri, 9 Aug 2019 12:25:19 +0200 [thread overview]
Message-ID: <1cc0eb1c-2906-8a54-93de-652c1b8ece9f@xs4all.nl> (raw)
In-Reply-To: <20190807085232.151260-4-darekm@google.com>
On 8/7/19 10:52 AM, Dariusz Marcinkiewicz wrote:
> Use the new cec_notifier_cec_adap_(un)register() functions to
> (un)register the notifier for the CEC adapter.
>
> Also adds CEC_CAP_CONNECTOR_INFO capability to the adapter.
>
> Changes since v3:
> - add CEC_CAP_CONNECTOR_INFO to cec_allocate_adapter,
> - replace CEC_CAP_LOG_ADDRS | CEC_CAP_TRANSMIT |
> CEC_CAP_RC | CEC_CAP_PASSTHROUGH with CEC_CAP_DEFAULTS.
>
> Signed-off-by: Dariusz Marcinkiewicz <darekm@google.com>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Tested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Tested with a Banana Pi M3 Allwinner A83T.
Regards,
Hans
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
> index 6c323510f1288..361acff2111cf 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
> @@ -259,8 +259,8 @@ static int dw_hdmi_cec_probe(struct platform_device *pdev)
> dw_hdmi_write(cec, 0, HDMI_CEC_POLARITY);
>
> cec->adap = cec_allocate_adapter(&dw_hdmi_cec_ops, cec, "dw_hdmi",
> - CEC_CAP_LOG_ADDRS | CEC_CAP_TRANSMIT |
> - CEC_CAP_RC | CEC_CAP_PASSTHROUGH,
> + CEC_CAP_DEFAULTS |
> + CEC_CAP_CONNECTOR_INFO,
> CEC_MAX_LOG_ADDRS);
> if (IS_ERR(cec->adap))
> return PTR_ERR(cec->adap);
> @@ -281,13 +281,14 @@ static int dw_hdmi_cec_probe(struct platform_device *pdev)
> if (ret < 0)
> return ret;
>
> - cec->notify = cec_notifier_get(pdev->dev.parent);
> + cec->notify = cec_notifier_cec_adap_register(pdev->dev.parent,
> + NULL, cec->adap);
> if (!cec->notify)
> return -ENOMEM;
>
> ret = cec_register_adapter(cec->adap, pdev->dev.parent);
> if (ret < 0) {
> - cec_notifier_put(cec->notify);
> + cec_notifier_cec_adap_unregister(cec->notify);
> return ret;
> }
>
> @@ -297,8 +298,6 @@ static int dw_hdmi_cec_probe(struct platform_device *pdev)
> */
> devm_remove_action(&pdev->dev, dw_hdmi_cec_del, cec);
>
> - cec_register_cec_notifier(cec->adap, cec->notify);
> -
> return 0;
> }
>
> @@ -306,8 +305,8 @@ static int dw_hdmi_cec_remove(struct platform_device *pdev)
> {
> struct dw_hdmi_cec *cec = platform_get_drvdata(pdev);
>
> + cec_notifier_cec_adap_unregister(cec->notify);
> cec_unregister_adapter(cec->adap);
> - cec_notifier_put(cec->notify);
>
> return 0;
> }
>
next prev parent reply other threads:[~2019-08-09 10:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 8:52 [PATCH v5 0/9] drm: cec: convert DRM drivers to the new notifier API Dariusz Marcinkiewicz
2019-08-07 8:52 ` [PATCH v5 1/9] drm_dp_cec: add connector info support Dariusz Marcinkiewicz
2019-08-08 8:18 ` Hans Verkuil
2019-08-09 10:30 ` Hans Verkuil
2019-08-08 8:44 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 2/9] drm/i915/intel_hdmi: use cec_notifier_conn_(un)register Dariusz Marcinkiewicz
2019-08-08 11:47 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 3/9] dw-hdmi-cec: use cec_notifier_cec_adap_(un)register Dariusz Marcinkiewicz
2019-08-09 10:25 ` Hans Verkuil [this message]
2019-08-07 8:52 ` [PATCH v5 4/9] tda9950: " Dariusz Marcinkiewicz
2019-08-08 9:11 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 5/9] drm: tda998x: use cec_notifier_conn_(un)register Dariusz Marcinkiewicz
2019-08-08 9:12 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 6/9] drm: sti: " Dariusz Marcinkiewicz
2019-08-07 8:52 ` [PATCH v5 7/9] drm: tegra: " Dariusz Marcinkiewicz
2019-08-08 20:42 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 8/9] drm: dw-hdmi: " Dariusz Marcinkiewicz
2019-08-09 15:12 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 9/9] drm: exynos: exynos_hdmi: " Dariusz Marcinkiewicz
2019-08-08 14:27 ` Hans Verkuil
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=1cc0eb1c-2906-8a54-93de-652c1b8ece9f@xs4all.nl \
--to=hverkuil-cisco@xs4all.nl \
--cc=darekm@google.com \
--cc=linux-media@vger.kernel.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).