From: Trilok Soni <soni.trilok@gmail.com>
To: Kim Kyuwon <q1.kim@samsung.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
linux-i2c@vger.kernel.org, Jean Delvare <khali@linux-fr.org>
Subject: Re: Input: add MAX7359 key switch controller driver
Date: Wed, 6 May 2009 19:08:25 +0530 [thread overview]
Message-ID: <5d5443650905060638l52b3c17dle0d138b689a23252@mail.gmail.com> (raw)
In-Reply-To: <4A012C64.1020101@samsung.com>
Hi Kim,
On Wed, May 6, 2009 at 11:51 AM, Kim Kyuwon <q1.kim@samsung.com> wrote:
> The Maxim MAX7359 is a I2C interfaced key switch controller which provides microprocessors with management of up to 64 key switches.
> This patch adds support for the MAX7359 key switch controller.
>
Could you please restrict the commit text line to 80/72 columns? It
will look good.
> +static irqreturn_t max7359_interrupt(int irq, void *dev_id)
> +{
> + struct max7359_keypad *keypad = (struct max7359_keypad *) dev_id;
No need of casting. Please remove.
> +
> + if (!work_pending(&keypad->work)) {
> + disable_irq_nosync(keypad->irq);
> + schedule_work(&keypad->work);
> + } else {
> + dev_err(&keypad->client->dev,
> + "Another job is currently pending \n");
> + }
> +
> + return IRQ_HANDLED;
> +}
> +
> +
> +static int __devinit max7359_probe(struct i2c_client *client,
> + const struct i2c_device_id *id)
You may want to remove __devinit as it is i2c client driver . I have
added linux-i2c for i2c
specific review.
> +static int max7359_suspend(struct i2c_client *client, pm_message_t mesg)
> +{
> + /* If no keys are pressed, enter sleep mode for 8192 ms */
> + max7359_write_reg(client, MAX7359_REG_SLEEP, 0x01);
> +
> + return 0;
> +}
> +
> +static int max7359_resume(struct i2c_client *client)
> +{
> + /* Restore the default setting (autosleep for 256 ms) */
> + max7359_write_reg(client, MAX7359_REG_SLEEP, 0x07);
> +
> + return 0;
> +}
Protect these two function with #ifdef CONFIG_PM please.
> +
> +
> +static struct i2c_driver max7359_i2c_driver = {
> + .driver = {
> + .name = "max7359",
> + },
> + .probe = max7359_probe,
> + .remove = __exit_p(max7359_remove),
> +};
> +
> +
> +MODULE_AUTHOR("Kim Kyuwon <q1.kim@samsung.com>");
> +MODULE_DESCRIPTION("MAX7359 Key Switch Controller Driver");
> +MODULE_LICENSE("GPL v2");
MODULE_ALIAS ??
> diff --git a/include/linux/max7359_keypad.h b/include/linux/max7359_keypad.h
> +
> +#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
Looks like this macro is highly used by many input drivers, anyone
looking at it to place it at common location?
--
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-05-06 13:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 6:21 Input: add MAX7359 key switch controller driver Kim Kyuwon
2009-05-06 13:38 ` Trilok Soni [this message]
2009-05-06 17:57 ` H Hartley Sweeten
2009-05-07 10:03 ` Kim Kyuwon
[not found] ` <4d34a0a70905070303r55c2c681yf58680de2f3d4a9f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-07 10:17 ` Trilok Soni
2009-05-08 3:19 ` Dmitry Torokhov
2009-05-09 1:58 ` Kim Kyuwon
2009-05-09 3:36 ` Dmitry Torokhov
2009-05-09 3:56 ` Kim Kyuwon
2009-05-09 17:22 ` Trilok Soni
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=5d5443650905060638l52b3c17dle0d138b689a23252@mail.gmail.com \
--to=soni.trilok@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=khali@linux-fr.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=q1.kim@samsung.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).