From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: "Priebe,
Sebastian"
<Sebastian.Priebe-hnW+OuB6jW6zQB+pC5nmwQ@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: driver using another driver
Date: Fri, 1 Aug 2014 08:31:05 +0200 [thread overview]
Message-ID: <20140801063105.GV23235@pengutronix.de> (raw)
In-Reply-To: <E70AF999396FDF4EAE40E195B84709611F84671F-VHQhki0MIenpQFNhCJRnZ0Yy6alPw7Wn0MAMd6zgKLc@public.gmane.org>
Hi Sebastian,
On Wed, Jul 30, 2014 at 02:45:51PM +0000, Priebe, Sebastian wrote:
> Hello,
>
> I am working on a project with an ARMv6 cpu and I am currently trying
> to port our board file to a device tree. Our custom hardware has a
> CPLD with is used by multiple driver. In the past we shared the CPLD
> driver resource (struct resource...) among the drivers platform data
> to be able to access the CPLD registers from all the drivers. The
> CPLD driver allocated the resource, returned it to our platform code
> and our platform code passed it to the other drivers.
> In other words the CPLD driver is used by the other driver.
> How can I achieve the same with a device tree?
You can use a toplevel device node for your CPLD on which your toplevel driver
matches. Call of_platform_populate() with this toplevel node to create
the child devices. drivers/bus/ contains some examples, like
drivers/bus/imx-weim.c.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-08-01 6:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 14:45 driver using another driver Priebe, Sebastian
[not found] ` <E70AF999396FDF4EAE40E195B84709611F84671F-VHQhki0MIenpQFNhCJRnZ0Yy6alPw7Wn0MAMd6zgKLc@public.gmane.org>
2014-08-01 6:31 ` Sascha Hauer [this message]
[not found] ` <20140801063105.GV23235-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-08-01 7:15 ` AW: " Priebe, Sebastian
[not found] ` <E70AF999396FDF4EAE40E195B84709611F847086-VHQhki0MIenpQFNhCJRnZ0Yy6alPw7Wn0MAMd6zgKLc@public.gmane.org>
2014-08-01 8:51 ` Sascha Hauer
[not found] ` <20140801085148.GW23235-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-08-01 9:08 ` AW: " Priebe, Sebastian
[not found] ` <CA+8Hj81tTdCMm-we8F6ZbNq8wPVWsEZZ8tYixLN3--tjiQpyfw@mail.gmail.com>
[not found] ` <CA+8Hj81tTdCMm-we8F6ZbNq8wPVWsEZZ8tYixLN3--tjiQpyfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-07 7:49 ` Priebe, Sebastian
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=20140801063105.GV23235@pengutronix.de \
--to=s.hauer-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=Sebastian.Priebe-hnW+OuB6jW6zQB+pC5nmwQ@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).