From: Manjunatha GK <manjugk-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org\""
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: Converting i2c-omap driver to use device tree
Date: Fri, 24 Jun 2011 17:46:21 +0530 [thread overview]
Message-ID: <BANLkTi=uk6X8kGQWQfT9ew=rwOB5C+4mwg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTin0zaE6M=0+9bq6sCvCVO_PJqYseA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 3039 bytes --]
On 23 June 2011 19:45, Manjunatha GK <manjugk-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> Hi Grant,
> I am trying to convert i2c-omap driver to use device tree. Since omap i2c
> driver uses it's own mechanism to register as platform device, I have
> commented out i2c device registration part from board file and trying to use
> DT data in probe function of i2c driver.
>
> I have i2c node declared under omap4-panda.dts as:
>
> + i2c@48072000 {
> + compatible = "ti,omap_i2c";
> + reg = <0x48072000 0x80>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + twl@48 {
> + compatible = "twl6030,4030-6030";
> + reg = < 0x48 >;
> + };
> + };
>
> and board file is changed as:
>
> @@ -685,6 +686,10 @@ static void __init omap4_panda_init(void)
> {
> int package = OMAP_PACKAGE_CBS;
>
> +#ifdef CONFIG_OF
> + of_platform_prepare(NULL, NULL);
> +#endif /* CONFIG_OF */
> +
> if (omap_rev() == OMAP4430_REV_ES1_0)
> package = OMAP_PACKAGE_CBL;
> omap4_mux_init(board_mux, NULL, package);
> @@ -700,6 +705,7 @@ static void __init omap4_panda_init(void)
> omap4_ehci_init();
> usb_musb_init(&musb_board_data);
> omap4_panda_display_init();
> + of_platform_populate(NULL, NULL, NULL, NULL);
> }
>
> I have commented out device registration for I2C1 in board file:
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c
> b/arch/arm/mach-omap2/board-omap4panda.c
> index c9d1e13..0c31f35 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -409,7 +410,7 @@ static struct i2c_board_info __initdata
> panda_i2c_eeprom[] = {
>
> static int __init omap4_panda_i2c_init(void)
> {
> - omap4_pmic_init("twl6030", &omap4_panda_twldata);
> + //omap4_pmic_init("twl6030", &omap4_panda_twldata);
> @@ -685,6 +686,10 @@ static void __init omap4_panda_init(void)
> {
> int package = OMAP_PACKAGE_CBS;
>
> +#ifdef CONFIG_OF
> + of_platform_prepare(NULL, NULL);
> +#endif /* CONFIG_OF */
> +
> if (omap_rev() == OMAP4430_REV_ES1_0)
> package = OMAP_PACKAGE_CBL;
> omap4_mux_init(board_mux, NULL, package);
> @@ -700,6 +705,7 @@ static void __init omap4_panda_init(void)
> omap4_ehci_init();
> usb_musb_init(&musb_board_data);
> omap4_panda_display_init();
> + of_platform_populate(NULL, NULL, NULL, NULL);
> }
>
> and i2c-omap is modified as:
>
> +static const struct of_device_id omap_i2c_of_match[];
> static int __devinit
> omap_i2c_probe(struct platform_device *pdev)
> {
> @@ -1162,6 +1169,12 @@ static int omap_i2c_resume(struct device *dev)
> return 0;
> }
>
> +static const struct of_device_id omap_i2c_of_match[] = {
> + {.compatible = "omap_i2c", },
>
I tried also with:
+ {.compatible = "ti,omap_i2c", },
still probe will not get called.
-Manjunath
[-- Attachment #1.2: Type: text/html, Size: 3576 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
next prev parent reply other threads:[~2011-06-24 12:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 14:15 Converting i2c-omap driver to use device tree Manjunatha GK
[not found] ` <BANLkTin0zaE6M=0+9bq6sCvCVO_PJqYseA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-24 12:16 ` Manjunatha GK [this message]
[not found] ` <BANLkTi=DmNC6BbwDU+4smFvbc+LzFLiiOA@mail.gmail.com>
[not found] ` <BANLkTi=DmNC6BbwDU+4smFvbc+LzFLiiOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-24 13:38 ` Manjunatha GK
[not found] ` <BANLkTi==YKS854=YDGG44BRy_km31LqifQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-26 8:12 ` Grant Likely
[not found] ` <20110626081202.GB24241-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-06-26 18:51 ` Manjunatha GK
[not found] ` <BANLkTimJU1ecxAroZMdWDdcAg6icH1mXyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-28 14:18 ` Manjunatha GK
[not found] ` <BANLkTinNVzgGhEXSfQf+WpSMtoUDN-5Jag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-28 19:38 ` Grant Likely
[not found] ` <20110628193854.GA26182-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-06-29 4:53 ` Manjunatha GK
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='BANLkTi=uk6X8kGQWQfT9ew=rwOB5C+4mwg@mail.gmail.com' \
--to=manjugk-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@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).