All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: David Brownell <david-b@pacbell.net>
Cc: Felipe Balbi <felipe.balbi@nokia.com>,
	linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH 5/9] i2c: move twl4030-usb to platform_device
Date: Sun, 28 Sep 2008 06:03:20 +0300	[thread overview]
Message-ID: <20080928030319.GE8468@frodo> (raw)
In-Reply-To: <200809271801.14267.david-b@pacbell.net>

On Sat, Sep 27, 2008 at 06:01:13PM -0700, David Brownell wrote:
> On Friday 26 Septemb.er 2008, Felipe Balbi wrote:
> > +       if (twl_has_usb() && pdata->usb) {
> > +               pdev = platform_device_alloc("twl4030_usb", -1);
> > +               if (pdev) {
> > +                       twl = &twl4030_modules[TWL4030_SLAVENUM_NUM0];
> > +                       pdev->dev.parent = &twl->client->dev;
> > +                       device_init_wakeup(&pdev->dev, 1);
> > +                       status = platform_device_add_data(pdev, pdata->usb,
> > +                                       sizeof(*pdata->usb));
> > +                       if (status < 0) {
> > +                               platform_device_put(pdev);
> > +                               goto err;
> > +                       }
> > +                       status = platform_device_add(pdev);
> > +                       if (status < 0)
> > +                               platform_device_put(pdev);
> > +               } else {
> > +                       status = -ENOMEM;
> > +                       goto err;
> > +               }
> > +       }
> 
> I notice that here -- and elsewhere! -- you're not adding an IRQ
> resource.  We should get rid of the TWL4030_MODIRQ_* and *_PWRIRQ_*
> symbols ... I think you'll observe that the twl_has_gpio() branch
> is a slightly better model than the original twl_has_rtc() code,
> in terms of how to add each child that uses interrupts.
> 
> In this case you can add an IRQ resource 4 more than the base IRQ
> (GPIO using 0 more), switch the relevant USB code over so that it's
> using platform_get_irq(), and comment out TWL4030_MODIRQ_USB in
> the header (now that nobody's using it).
> 
> I'll send a small IRQ cleanup patch doing that for the RTC in a
> bit, after I sanity check it.

Sure, I'll update soonish, I'll mail for you only a new series so you
can work on top of that. I changed a few bits, but i'm not keen to flood
linux-omap with unfinished patches again :-p

-- 
balbi
--
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

  reply	other threads:[~2008-09-28  3:03 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-26 11:19 [PATCH 0/9] twl4030 updates Felipe Balbi
2008-09-26 11:19 ` [PATCH 1/9] twl4030: fix potential null pointer dereference Felipe Balbi
2008-09-26 11:19   ` [PATCH 2/9] twl4030-gpio: Remove default pullup enable/disable of GPIO Felipe Balbi
2008-09-26 11:19     ` [PATCH 3/9] i2c: clean add_children a bit Felipe Balbi
2008-09-26 11:19       ` [PATCH 4/9] i2c: move twl4030_keypad to new style registration Felipe Balbi
2008-09-26 11:19         ` [PATCH 5/9] i2c: move twl4030-usb to platform_device Felipe Balbi
2008-09-26 11:19           ` [PATCH 6/9] i2c: twl4030-usb: add 'vbus' sysfs file Felipe Balbi
2008-09-26 11:19             ` [PATCH 7/9] twl4030 gpio platform data Felipe Balbi
2008-09-26 11:19               ` [PATCH 8/9] twl4030 uses gpiolib Felipe Balbi
2008-09-26 11:19                 ` [PATCH 9/9] i2c: move twl4030-madc to new registration style Felipe Balbi
2008-09-26 17:09                   ` David Brownell
2008-09-26 17:46                     ` Felipe Balbi
2008-09-27  7:37                       ` Mikko Ylinen
2008-09-27 15:04                         ` David Brownell
2008-09-27 15:40                           ` Steve Sakoman
2008-09-27 17:17                             ` David Brownell
2008-10-01 14:20                           ` Mikko Ylinen
2008-10-01 16:13                             ` David Brownell
2008-09-26 19:50                   ` David Brownell
2008-09-26 20:01                     ` Steve Sakoman
2008-09-26 17:10                 ` [PATCH 8/9] twl4030 uses gpiolib David Brownell
2008-09-26 17:47                   ` Felipe Balbi
2008-09-26 18:57                     ` David Brownell
2008-09-28  1:01           ` [PATCH 5/9] i2c: move twl4030-usb to platform_device David Brownell
2008-09-28  3:03             ` Felipe Balbi [this message]
2008-09-26 17:12 ` [PATCH 0/9] twl4030 updates David Brownell
2008-09-26 17:50   ` Felipe Balbi
2008-09-26 18:55     ` David Brownell
2008-09-26 19:00   ` David Brownell
2008-09-26 19:10     ` Steve Sakoman
2008-09-26 19:23       ` Felipe Balbi
2008-09-26 19:45       ` David Brownell
2008-09-27 19:14 ` David Brownell
2008-09-27 21:17   ` Felipe Balbi
2008-09-27 21:45     ` David Brownell
2008-09-27 21:46       ` Felipe Balbi
2008-09-27 21:41 ` [PATCH 11/9] move twl4030-gpio to drivers/gpio David Brownell
2008-09-27 22:29   ` Felipe Balbi
2008-09-27 23:09     ` Felipe Balbi
2008-09-27 23:45       ` David Brownell
2008-09-28  3:14         ` Felipe Balbi
2008-09-28  5:16           ` David Brownell
2008-10-01 13:46             ` Felipe Contreras
2008-10-01 13:52               ` Felipe Balbi
2008-10-01 15:58               ` David Brownell
2008-10-01 16:05                 ` Jean Delvare
2008-10-01 16:32                   ` David Brownell
2008-09-27 23:29     ` David Brownell

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=20080928030319.GE8468@frodo \
    --to=me@felipebalbi.com \
    --cc=david-b@pacbell.net \
    --cc=felipe.balbi@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.