linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Ribeiro <drwyrm@gmail.com>
To: pHilipp Zabel <philipp.zabel@gmail.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Harald Welte <laforge@gnumonks.org>,
	David Brownell <david-b@pacbell.net>,
	openezx-devel <openezx-devel@lists.openezx.org>
Subject: Re: [PATCH v2] MFD: PCAP core driver.
Date: Tue, 26 May 2009 02:10:35 -0300	[thread overview]
Message-ID: <1243314635.10927.30.camel@brutus> (raw)
In-Reply-To: <74d0deb30905251255o2d0fb0edr4b2f52aa6a696d7c@mail.gmail.com>

Hi Philipp, Thanks for the review! :)

Em Seg, 2009-05-25 às 21:55 +0200, pHilipp Zabel escreveu:
> > +static int pcap_add_subdev(struct spi_device *spi, struct pcap_subdev *subdev)
> > +{
> > +       struct platform_device *pdev;
> > +
> > +       pdev = platform_device_alloc(subdev->name, subdev->id);
> > +       pdev->dev.parent = &spi->dev;
> > +       pdev->dev.platform_data = subdev->platform_data;
> > +
> > +       return platform_device_add(pdev);
> > +}
> 
> This pcap_subdev, pcap_remove/add_subdev business looks a bit like
> you're duplicating the MFD core just because it doesn't handle
> resource-less mfd_cells. I wonder whether it'd be better to fix that
> and then use
> mfd_cell, mfd_add/remove_devices instead?

Due to the lack of comments on this driver, i started grepping LKML for
previous MFD reviews. Now the driver allows multiple instances and no
longer keeps pcap_chip as a global(as per Samuel comments on U300/AB3100
driver), result is that resource-less mfd_cells are no longer the only
issue so I can use the mfd_ API: Now I also need a way to pass a
pcap_chip pointer to the subdevs.

> > +       set_irq_type(pdata->irq, IRQ_TYPE_EDGE_RISING);
> > +       set_irq_chained_handler(pdata->irq, pcap_irq_handler);
> > +       set_irq_wake(pdata->irq, 1);
> 
> Looking at the other MFD drivers that register a chained handler,
> providing this IRQ via a resource seems to be the default.

Ok, will do.


I will send a new version of the patch tomorrow, after i finish
converting all the subdevices to the new code.

Thanks!

-- 
Daniel Ribeiro


  reply	other threads:[~2009-05-26  5:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 13:42 [PATCH] MFD: PCAP core driver Daniel Ribeiro
2009-05-21 17:52 ` [PATCH v2] " Daniel Ribeiro
2009-05-25 19:55   ` pHilipp Zabel
2009-05-26  5:10     ` Daniel Ribeiro [this message]
2009-05-26  6:14       ` Daniel Ribeiro

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=1243314635.10927.30.camel@brutus \
    --to=drwyrm@gmail.com \
    --cc=david-b@pacbell.net \
    --cc=laforge@gnumonks.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openezx-devel@lists.openezx.org \
    --cc=philipp.zabel@gmail.com \
    --cc=sameo@linux.intel.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).