From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Jonas Bonn <jonas-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH 3/3] i2c-ocores: add some device tree documentation
Date: Thu, 23 Dec 2010 21:00:17 -0700 [thread overview]
Message-ID: <20101224040017.GE2491@angua.secretlab.ca> (raw)
In-Reply-To: <1290615982-1028-4-git-send-email-jonas-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
On Wed, Nov 24, 2010 at 05:26:22PM +0100, Jonas Bonn wrote:
> This puts some documentation for the device tree configuration at the head
> of the driver file. Hopefully this can get moved to a common area for this
> type of documentation at a later date; unfortunately, there isn't really
> such a place in the kernel tree at this time.
>
> Furthermore, the regstep and clock-frequency parameters are really bus
> parameters and should probably be passed to the driver in a better way.
> Consider that a TODO.
>
> Signed-off-by: Jonas Bonn <jonas-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-ocores.c | 35 +++++++++++++++++++++++++++++++++++
> 1 files changed, 35 insertions(+), 0 deletions(-)
Binding looks good, except for a comment on the compatible value
below, but it should be kept with the other bindings. Please move
into a file in Documentation/powerpc/dts-bindings (and, yes, this
directory does need to be moved out of Documentation/powerpc), or
document it on the devicetree.org wiki.
g.
>
> diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
> index dee0352..ef3bcb1 100644
> --- a/drivers/i2c/busses/i2c-ocores.c
> +++ b/drivers/i2c/busses/i2c-ocores.c
> @@ -9,6 +9,41 @@
> * kind, whether express or implied.
> */
>
> +/*
> + * Device tree configuration:
> + *
> + * Required properties:
> + * - compatible : "opencores,i2c-ocores"
I assume the i2c-ocore interface could end up changing in the future.
This compatible value should have some form of version embedded into
it.
> + * - reg : bus address start and address range size of device
> + * - interrupts : interrupt number
> + * - regstep : size of device registers in bytes
> + * - clock-frequency : frequency of bus clock in Hz
> + *
> + * Example:
> + *
> + * i2c0: ocores@a0000000 {
> + * compatible = "opencores,i2c-ocores";
> + * reg = <0xa0000000 0x8>;
> + * interrupts = <10>;
> + *
> + * regstep = <1>;
> + * clock-frequency = <20000000>;
> + *
> + * -- Devices connected on this I2C bus get
> + * -- defined here; address- and size-cells
> + * -- apply to these child devices
> + *
> + * #address-cells = <1>;
> + * #size-cells = <0>;
> + *
> + * dummy@60 {
> + * compatible = "dummy";
> + * reg = <60>;
> + * };
> + * };
> + *
> + */
> +
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/init.h>
> --
> 1.7.1
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
next prev parent reply other threads:[~2010-12-24 4:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 16:26 i2c-ocores changes (version 2) Jonas Bonn
[not found] ` <1290615982-1028-1-git-send-email-jonas-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
2010-11-24 16:26 ` [PATCH 1/3] i2c-ocores: Adapt for device tree Jonas Bonn
[not found] ` <1290615982-1028-2-git-send-email-jonas-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
2010-12-01 9:37 ` Walter Goossens
2011-01-04 1:05 ` Ben Dooks
2010-11-24 16:26 ` [PATCH 2/3] i2c-ocores: Use devres for resource allocation Jonas Bonn
2010-11-24 16:26 ` [PATCH 3/3] i2c-ocores: add some device tree documentation Jonas Bonn
[not found] ` <1290615982-1028-4-git-send-email-jonas-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
2010-12-24 4:00 ` Grant Likely [this message]
[not found] ` <20101224040017.GE2491-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-12-24 9:38 ` Jonas Bonn
2010-12-24 14:02 ` Peter Korsgaard
2010-12-24 20:06 ` Grant Likely
2010-12-06 4:33 ` i2c-ocores changes (version 2) Ben Dooks
[not found] ` <4CFC67AA.2080707-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
2010-12-24 4:03 ` Grant Likely
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=20101224040017.GE2491@angua.secretlab.ca \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jonas-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org \
--cc=linux-i2c-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).