From: Bryan Wu <bryan.wu@analog.com>
Subject: [PATCH] Blackfin I2C/TWI driver: update for 2.6.24 merge windows(Because "i2c-bfin-twi: Remove useless twi_lock mutex" patch was merged,
my previous 2 twi patch can not be applied. This is the latest one)- Add repeat start feature to avoid break of a bundle of i2c master xfer operation
Create a new mode TWI_I2C_MODE_REPEAT
No change to smbus operation- Add platform_resource interface to support multi-port TWI controllers
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
drivers/i2c/busses/i2c-bfin-twi.c | 414 +++++++++++++++++++++++--------------
1 files changed, 263 insertions(+), 151 deletions(-)diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
index 67224a4..acae7ef 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -7,6 +7,10 @@
*
* Copyright (c) 2005-2007 Analog Devices, Inc.
*
+ * Modified:
+ * Aug 01, 2007 add platform_resource interface to support multi-port
+ * TWI controllers. (Bryan Wu <bryan.wu@analog.com>)
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -42,6 +46,7 @@
#define TWI_I2C_MODE_STANDARD 0x01
#define TWI_I2C_MODE_STANDARDSUB 0x02
#define TWI_I2C_MODE_COMBINED 0x04
+#define TWI_I2C_MODE_REPEAT 0x08struct bfin_twi_iface {
int irq;
@@ -58,39 +63,69 @@ struct bfin_twi_iface {
struct timer_list timeout_timer;
struct i2c_adapter adap;
struct completion complete;
+ struct i2c_msg *pmsg;
+ int msg_num;
+ int cur_msg;
+ u32 regs_base;
};-static struct bfin_twi_iface twi_iface;
+
+#define DEFINE_TWI_REG(reg, off) \
+static inline u16 read_##reg(struct bfin_twi_iface *iface) \
+ { return bfin_read16(iface->regs_base + ...
Hi Jean,
Could you kindly review this patch?
Thanks a lot
-Bryan-
Hi Bryan,
I'm pretty busy these days, I don't have much spare time for reviews.
BTW, as a rule of thumb, I am ignoring patches that are sent to the
LKML in addition to the i2c list. If you think that your patch is so
important that it has to be send to a list with over 4500 subscribers
that sees 120.000 messages each year, then who am I to dare to comment
on it?If you want me to consider your patches as something that needs my
attention, send them to the i2c list only, do not add LKML. This is
general advice for everyone sending i2c patches, not just you, of
course.Back to your patch... Originally you posted two patches, and I see that
they are now merged into a single patch, why? It's much better to have
separate patches, it makes reviews and testing way easier. If you
provide separate patches I'll try to find some time to review them.Note that this won't be for 2.6.24 anyway, it's too late for that, I've
already sent my i2c patches to Linus. From now on, only bugfixes can go
in 2.6.24, improvements will have to wait for 2.6.25.--
Jean Delvare
-
Why ? The statement would have made sense if the i2c list was not CC 'd,
but stating that if LK is CC 'd additionally sounds ...
-
Disagree. I don't think there's any benefit to anyone for developers to
hide their stuff on remote mailing lists. Copying lkml increases the
changes that someone will spot a bug or some improvement and it generally
keeps people informed as to what's going on.yeah, 120,000 messages/year. But a lot of them are just noise. Patches
are important.And I really don't understand this huffy attitude and putting more
roadblocks in the way of our contributors. People like Bryan are doing a
lot of work to improve Linux and most people are (or should be) grateful
for that and should be prepared to go the extra yard to help them.-
Hi Andrew,
Sending spam to millions of people increases the chances than someone
Lot of noise, yes. Counting 1 second on average to process posts you're
not interested in, that's 33 hours a year. This is completely insane
and that's why I unsubscribed from LKML long ago. And the situation is
only getting worse every year. You may fail to realize the problem justQuite on the contrary, I am trying to educate people into targeting
their posts to the right lists so that they get more appropriate
responses in a shorter time.In a world where we would have infinite work power and time would grow
on trees, I would be fine with everyone sending everything to every
mailing list. But in the real world, time spent to do one thing isn't
spent on another. If we don't learn, collectively, to target our posts
to the right people, then we end up wasting a significant amount of ourMy comment is general and absolutely not targeted at Bryan personally.
I thought it was clear. I fully agree that Bryan is a really pleasant
and easy person to work with and I do appreciate his contributions.--
Jean Delvare
-
I see. Actually this is the first time I was told about it.
I know it missed the merge window.Thanks again
-Bryan Wu
-
I probably had not been clear about it so far. I've added it to my
"Linux 2.6 I2C development FAQ" now.--
Jean Delvare
-
| Davide Libenzi | Re: [patch 7/8] fdmap v2 - implement sys_socket2 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Mariusz Kozlowski | [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc |
git: | |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Stefan Richter | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
