From: "Péter Ujfalusi" <peter.ujfalusi@ti.com>
To: Ricardo Neri <ricardo.neri@ti.com>
Cc: tomi.valkeinen@ti.com, s-guiriec@ti.com, b-cousson@ti.com,
linux-omap@vger.kernel.org
Subject: Re: [PATCH 6/6] OMAPDSS: HDMI: Create platform device to support audio
Date: Tue, 16 Oct 2012 11:30:59 +0200 [thread overview]
Message-ID: <507D2953.8030801@ti.com> (raw)
In-Reply-To: <1350350839-30408-7-git-send-email-ricardo.neri@ti.com>
On 10/16/2012 03:27 AM, Ricardo Neri wrote:
> Creating the accessory devices, such as audio, from the HDMI driver
> allows to regard HDMI as a single entity with audio an display
> functionality. This intends to follow the design of drivers such
> as MFD, in which a single entity handles the creation of the accesory
> devices. Such devices are then used by domain-specific drivers; audio in
> this case.
>
> Also, this is in line with the DT implementation of HDMI, in which we will
> have a single node to describe this feature of the OMAP SoC.
...
> + hdmi_aud_res[HDMI_AUDIO_MEM_RESOURCE].start = res->start;
> + hdmi_aud_res[HDMI_AUDIO_MEM_RESOURCE].end = res->end;
> + hdmi_aud_res[HDMI_AUDIO_MEM_RESOURCE].flags = IORESOURCE_MEM;
> +
> + res = platform_get_resource(hdmi.pdev, IORESOURCE_DMA, 0);
> + if (!res) {
> + DSSERR("can't get IORESOURCE_DMA HDMI\n");
> + return -EINVAL;
> + }
> +
> + /* Pass this resource to audio_pdev */
> + hdmi_aud_res[HDMI_AUDIO_DMA_RESOURCE].start = res->start;
> + hdmi_aud_res[HDMI_AUDIO_DMA_RESOURCE].end = res->end;
> + hdmi_aud_res[HDMI_AUDIO_DMA_RESOURCE].flags = IORESOURCE_DMA;
> +
> + /* create platform device for HDMI audio driver */
> + hdmi.audio_pdev = platform_device_register_simple(
> + "omap_hdmi_audio",
> + -1, hdmi_aud_res,
> + ARRAY_SIZE(hdmi_aud_res));
Should you also update arch/arm/mach-omap2/devices.c to not register the same
device?
When we do not boot with DT devices.c will create the same device earlier
(without pdata) which will prevent this device to be created and at the end
will prevent omap_hdmi_audio driver to probe due to missing pdata...
> + if (IS_ERR(hdmi.audio_pdev)) {
> + DSSERR("Can't instantiate hdmi-audio\n");
> + return PTR_ERR(hdmi.audio_pdev);
> + }
> +
> + return 0;
> +}
> +
--
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-10-16 9:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 1:27 [PATCH 0/6] Create platform device for audio support Ricardo Neri
2012-10-16 1:27 ` [PATCH 1/6] OMAPDSS: HDMI: Rename resource variable at probe Ricardo Neri
2012-10-16 1:27 ` [PATCH 2/6] OMAPDSS: Convert to devm_ioremap Ricardo Neri
2012-10-22 7:22 ` Tomi Valkeinen
2012-10-22 22:59 ` Ricardo Neri
2012-10-16 1:27 ` [PATCH 3/6] OMAPDSS: HDMI: Make panel return error if cannot register driver Ricardo Neri
2012-10-16 1:27 ` [PATCH 4/6] OMAPDSS: HDMI: Uninit display if unable to register device Ricardo Neri
2012-10-16 1:27 ` [PATCH 5/6] OMAPDSS: HDMI: Handle error when initing the display at probe Ricardo Neri
2012-10-16 1:27 ` [PATCH 6/6] OMAPDSS: HDMI: Create platform device to support audio Ricardo Neri
2012-10-16 9:30 ` Péter Ujfalusi [this message]
2012-10-16 11:11 ` Ricardo Neri
2012-10-22 7:40 ` Tomi Valkeinen
2012-10-23 0:48 ` Ricardo Neri
2012-10-23 9:37 ` Tomi Valkeinen
2012-10-23 15:42 ` Ricardo Neri
2012-10-23 16:17 ` Tomi Valkeinen
2012-10-23 17:21 ` Ricardo Neri
2012-10-24 4:29 ` Tomi Valkeinen
2012-10-25 14:31 ` Ricardo Neri
2012-10-25 14:54 ` Tomi Valkeinen
2012-10-26 0:46 ` Ricardo Neri
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=507D2953.8030801@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=b-cousson@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=ricardo.neri@ti.com \
--cc=s-guiriec@ti.com \
--cc=tomi.valkeinen@ti.com \
/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).