From: Joe Perches <joe@perches.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: linux-kernel@vger.kernel.org,
Samuel Ortiz <sameo@linux.intel.com>,
kyungmin.park@samsung.com, myungjoo.ham@gmail.com
Subject: Re: [PATCH 1/2] MAX8997/8966 MFD: Add IRQ control feature
Date: Fri, 04 Mar 2011 00:58:45 -0800 [thread overview]
Message-ID: <1299229125.1929.52.camel@Joe-Laptop> (raw)
In-Reply-To: <1299224747-11081-1-git-send-email-myungjoo.ham@samsung.com>
On Fri, 2011-03-04 at 16:45 +0900, MyungJoo Ham wrote:
> This patch enables IRQ handling for MAX8997/8966 chips.
Just trivial comments.
> +++ b/drivers/mfd/max8997-irq.c
> +static u8 max8997_mask_reg[] = {
static const?
[]
> +static struct max8997_irq_data max8997_irqs[] = {
here too?
> + [MAX8997_PMICIRQ_PWRONR] = {
> + .group = PMIC_INT1,
> + .mask = 1 << 0,
> + },
I think the declaration style is a little hard to
read and verify. Maybe use a macro something like:
#define DECLARE_IRQ(val, _group, _mask) \
[ val ] = { .group = _group, .mask = _mask }
> + [MAX8997_PMICIRQ_PWRONF] = {
> + .group = PMIC_INT1,
> + .mask = 1 << 1,
> + },
So this becomes
DECLARE_IRQ(MAX8997_PMICIRQ_PWRONR, PMIC_INT1, 1 << 0),
DECLARE_IRQ(MAX8997_PMICIRQ_PWRONF, PMIC_INT1, 1 << 1),
etc...
[]
> +static struct irq_chip max8997_irq_chip = {
static const?
> +static irqreturn_t max8997_irq_thread(int irq, void *data)
> +{
> + struct max8997_dev *max8997 = data;
> + u8 irq_reg[MAX8997_IRQ_GROUP_NR];
[]
> + for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++)
> + irq_reg[i] = 0;
Maybe use a memset or change the declaration to
u8 irq_reg[MAX8997_IRQ_GROUP_NR] = {};
next prev parent reply other threads:[~2011-03-04 8:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 6:50 [PATCH v2 0/2] MAX8997/8966 MFD (includig PMIC) Initial Release MyungJoo Ham
2011-03-04 6:50 ` [PATCH v2 1/2] MAX8997/8966 MFD Driver Initial Release (PMIC+RTC+MUIC+Haptic+...) MyungJoo Ham
2011-03-05 11:31 ` Mark Brown
2011-03-04 6:50 ` [PATCH v2 2/2] MAX8997/8966 PMIC Regulator Driver Initial Release MyungJoo Ham
2011-03-04 7:16 ` [PATCH] MAX8997/8966 PMIC: compiler warning removed (incompatible pointer) MyungJoo Ham
2011-03-05 12:03 ` [PATCH v2 2/2] MAX8997/8966 PMIC Regulator Driver Initial Release Mark Brown
2011-03-08 1:50 ` MyungJoo Ham
2011-03-08 12:41 ` Mark Brown
2011-03-04 7:45 ` [PATCH 1/2] MAX8997/8966 MFD: Add IRQ control feature MyungJoo Ham
2011-03-04 8:58 ` Joe Perches [this message]
2011-03-14 10:11 ` Samuel Ortiz
2011-03-14 10:37 ` MyungJoo Ham
2011-03-04 7:48 ` [PATCH 2/2] MAX8997/8966 RTC Driver Initial Release MyungJoo Ham
2011-03-04 8:58 ` Joe Perches
2011-03-05 12:07 ` [rtc-linux] " Mark Brown
2011-03-14 9:49 ` [PATCH v2 0/2] MAX8997/8966 MFD (includig PMIC) " Samuel Ortiz
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=1299229125.1929.52.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@gmail.com \
--cc=myungjoo.ham@samsung.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