linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] i2c: pxa: support hardware lock
Date: Thu, 28 Apr 2011 23:15:45 +0800	[thread overview]
Message-ID: <1304003746-12127-2-git-send-email-haojian.zhuang@gmail.com> (raw)
In-Reply-To: <2011042801>

Append hardware lock support since it's required by Marvell PXA910.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jean Delvare <khali@linux-fr.org>
---
 drivers/i2c/busses/i2c-pxa.c |    3 +++
 include/linux/i2c/pxa-i2c.h  |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index cab529d..e9a5dd8 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1120,6 +1120,9 @@ static int i2c_pxa_probe(struct platform_device *dev)
 
 	if (plat) {
 		i2c->adap.class = plat->class;
+		i2c->adap.hardware_lock = plat->hardware_lock;
+		i2c->adap.hardware_unlock = plat->hardware_unlock;
+		i2c->adap.hardware_trylock = plat->hardware_trylock;
 		i2c->use_pio = plat->use_pio;
 		i2c->fast_mode = plat->fast_mode;
 	}
diff --git a/include/linux/i2c/pxa-i2c.h b/include/linux/i2c/pxa-i2c.h
index 1a9f65e..076324f 100644
--- a/include/linux/i2c/pxa-i2c.h
+++ b/include/linux/i2c/pxa-i2c.h
@@ -67,6 +67,9 @@ struct i2c_pxa_platform_data {
 	unsigned int		class;
 	unsigned int		use_pio :1;
 	unsigned int		fast_mode :1;
+	void			(*hardware_lock)(struct i2c_adapter *);
+	void			(*hardware_unlock)(struct i2c_adapter *);
+	int			(*hardware_trylock)(struct i2c_adapter *);
 };
 
 extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);
-- 
1.7.1

  parent reply	other threads:[~2011-04-28 15:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2011042801>
2011-04-28  4:02 ` [PATCH 1/3] i2c: append hardware lock with bus lock Haojian Zhuang
2011-04-28  8:22   ` Jean Delvare
2011-04-28  8:36     ` Eric Miao
2011-04-28 14:16       ` Jean Delvare
2011-04-28 14:37         ` Russell King - ARM Linux
2011-04-28 14:48           ` Haojian Zhuang
2011-04-28 14:19       ` Haojian Zhuang
2011-04-28  4:02 ` [PATCH 2/3] i2c: pxa: support hardware lock Haojian Zhuang
2011-04-28  4:02 ` [PATCH 3/3] ARM: mmp: add hardware lock support in PXA910 Haojian Zhuang
2011-04-28 15:15 ` [PATCH 1/3] i2c: append hardware lock with bus lock Haojian Zhuang
2011-05-02  9:27   ` Ben Dooks
2011-05-02  9:46     ` Jean Delvare
2011-05-10 23:08       ` Ben Dooks
2011-04-28 15:15 ` Haojian Zhuang [this message]
2011-04-28 15:15 ` [PATCH 3/3] ARM: mmp: add hardware lock support in PXA910 Haojian Zhuang

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=1304003746-12127-2-git-send-email-haojian.zhuang@gmail.com \
    --to=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).