public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: zhouqiao@marvell•com (Qiao Zhou)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/3] mfd: support 88pm80x in 80x driver
Date: Fri, 15 Jun 2012 13:23:36 +0800	[thread overview]
Message-ID: <4FDAC6D8.6070202@marvell.com> (raw)
In-Reply-To: <20120614184356.GC30185@sirena.org.uk>

On 06/15/2012 02:43 AM, Mark Brown wrote:
> On Thu, Jun 14, 2012 at 12:27:48PM +0000, Arnd Bergmann wrote:
>> On Wednesday 13 June 2012, Qiao Zhou wrote:
>
>>> +static struct mfd_cell onkey_devs[] = {
>>> +	{
>>> +	 .name = "88pm80x-onkey",
>>> +	 .num_resources = 1,
>>> +	 .resources =&onkey_resources[0],
>>> +	 .id = -1,
>>> +	 },
>>> +};
>
>> I wonder if it really makes sense to use the mfd_cell abstraction here, when each
>> array only contains a single device. Why not just use
>> platform_device_register_simple()?
>
> mfd_cell does some other stuff like let you pass in bases for the various
> resource ranges when you register which looks to be being used here.
>
>>> +static irqreturn_t pm805_irq(int irq, void *data)
>>> +{
>>> +	struct pm80x_chip *chip = data;
>>> +	struct pm80x_subchip *pm805_chip = chip->pm805_chip;
>>> +	struct pm80x_irq_data *irq_data;
>>> +	struct i2c_client *i2c;
>>> +	int i, read_reg = -1, value = 0;
>
>> The functions for pm800 and pm805 look almost identical. Have you tried
>> consolidating them so you can use the same irqchip and code with different
>> init data structures?
>
> Since you use regmap perhaps you can use regmap_irq and just convert
> them into data?
Mark,

thanks for your suggestion, and would update accordingly.

-- 

Best Regards
Qiao

  reply	other threads:[~2012-06-15  5:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13  9:04 [PATCH 0/3 V0] add 88pm80x mfd driver Qiao Zhou
2012-06-13  9:04 ` [PATCH 1/3] mfd: support 88pm80x in 80x driver Qiao Zhou
2012-06-14 12:27   ` Arnd Bergmann
2012-06-14 18:43     ` Mark Brown
2012-06-15  5:23       ` Qiao Zhou [this message]
2012-06-15  3:17     ` Qiao Zhou
2012-06-13  9:04 ` [PATCH 2/3] rtc: add rtc support to 88PM80X PMIC Qiao Zhou
2012-06-13  9:04 ` [PATCH 3/3] input: add onkey " Qiao Zhou
  -- strict thread matches above, loose matches on Subject: below --
2012-06-28  3:13 [PATCH 0/3 V1] add 88pm80x mfd driver Qiao Zhou
2012-06-28  3:13 ` [PATCH 1/3] mfd: support 88pm80x in 80x driver Qiao Zhou
2012-06-28 11:21   ` Arnd Bergmann
2012-06-28 11:46     ` Mark Brown
2012-06-28 14:32       ` Arnd Bergmann
2012-06-29  1:18         ` Haojian Zhuang
2012-06-29  1:29           ` Mark Brown
2012-06-29 14:18           ` Arnd Bergmann
2012-06-29  2:56     ` Qiao Zhou
2012-06-29 13:58       ` Arnd Bergmann
2012-07-02  7:50         ` Qiao Zhou
2012-07-02  9:22           ` Qiao Zhou
2012-07-02 10:03             ` Mark Brown
2012-07-02 10:09               ` Qiao Zhou
2012-07-02 10:12                 ` Mark Brown
2012-07-02 10:15                   ` Qiao Zhou
2012-07-02 15:58                     ` Arnd Bergmann
2012-07-03  2:28                       ` Qiao Zhou
2012-06-29 14:21   ` Arnd Bergmann
2012-06-30 12:02     ` Mark Brown

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=4FDAC6D8.6070202@marvell.com \
    --to=zhouqiao@marvell$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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