Skip to content

Commit 2d4b3f3

Browse files
author
Jiri Kosina
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2 parents 7022b15 + 8033c6e commit 2d4b3f3

File tree

1,247 files changed

+32157
-16148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,247 files changed

+32157
-16148
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,5 @@ series
5454
cscope.*
5555

5656
*.orig
57-
*.rej
5857
*~
5958
\#*#

Documentation/cgroups.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ and then start a subshell 'sh' in that cgroup:
310310
cd /dev/cgroup
311311
mkdir Charlie
312312
cd Charlie
313-
/bin/echo 2-3 > cpus
314-
/bin/echo 1 > mems
313+
/bin/echo 2-3 > cpuset.cpus
314+
/bin/echo 1 > cpuset.mems
315315
/bin/echo $$ > tasks
316316
sh
317317
# The subshell 'sh' is now running in cgroup Charlie

Documentation/feature-removal-schedule.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,14 @@ Who: Glauber Costa <[email protected]>
289289

290290
---------------------------
291291

292+
What: old style serial driver for ColdFire (CONFIG_SERIAL_COLDFIRE)
293+
When: 2.6.28
294+
Why: This driver still uses the old interface and has been replaced
295+
by CONFIG_SERIAL_MCF.
296+
Who: Sebastian Siewior <[email protected]>
297+
298+
---------------------------
299+
292300
What: /sys/o2cb symlink
293301
When: January 2010
294302
Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb

Documentation/filesystems/Locking

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ prototypes:
9292
void (*destroy_inode)(struct inode *);
9393
void (*dirty_inode) (struct inode *);
9494
int (*write_inode) (struct inode *, int);
95-
void (*put_inode) (struct inode *);
9695
void (*drop_inode) (struct inode *);
9796
void (*delete_inode) (struct inode *);
9897
void (*put_super) (struct super_block *);
@@ -115,7 +114,6 @@ alloc_inode: no no no
115114
destroy_inode: no
116115
dirty_inode: no (must not sleep)
117116
write_inode: no
118-
put_inode: no
119117
drop_inode: no !!!inode_lock!!!
120118
delete_inode: no
121119
put_super: yes yes no

Documentation/filesystems/vfs.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ struct super_operations {
205205

206206
void (*dirty_inode) (struct inode *);
207207
int (*write_inode) (struct inode *, int);
208-
void (*put_inode) (struct inode *);
209208
void (*drop_inode) (struct inode *);
210209
void (*delete_inode) (struct inode *);
211210
void (*put_super) (struct super_block *);
@@ -246,9 +245,6 @@ or bottom half).
246245
inode to disc. The second parameter indicates whether the write
247246
should be synchronous or not, not all filesystems check this flag.
248247

249-
put_inode: called when the VFS inode is removed from the inode
250-
cache.
251-
252248
drop_inode: called when the last access to the inode is dropped,
253249
with the inode_lock spinlock held.
254250

Documentation/hwmon/adt7473

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ point2: Set the pwm speed at a higher temperature bound.
6969

7070
The ADT7473 will scale the pwm between the lower and higher pwm speed when
7171
the temperature is between the two temperature boundaries. PWM values range
72-
from 0 (off) to 255 (full speed).
72+
from 0 (off) to 255 (full speed). Fan speed will be set to maximum when the
73+
temperature sensor associated with the PWM control exceeds temp#_max.
7374

7475
Notes
7576
-----

Documentation/i2c/functionality

Lines changed: 52 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -51,63 +51,72 @@ A few combinations of the above flags are also defined for your convenience:
5151
the transparent emulation layer)
5252

5353

54-
ALGORITHM/ADAPTER IMPLEMENTATION
55-
--------------------------------
54+
ADAPTER IMPLEMENTATION
55+
----------------------
5656

57-
When you write a new algorithm driver, you will have to implement a
58-
function callback `functionality', that gets an i2c_adapter structure
59-
pointer as its only parameter:
57+
When you write a new adapter driver, you will have to implement a
58+
function callback `functionality'. Typical implementations are given
59+
below.
6060

61-
struct i2c_algorithm {
62-
/* Many other things of course; check <linux/i2c.h>! */
63-
u32 (*functionality) (struct i2c_adapter *);
61+
A typical SMBus-only adapter would list all the SMBus transactions it
62+
supports. This example comes from the i2c-piix4 driver:
63+
64+
static u32 piix4_func(struct i2c_adapter *adapter)
65+
{
66+
return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
67+
I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
68+
I2C_FUNC_SMBUS_BLOCK_DATA;
6469
}
6570

66-
A typically implementation is given below, from i2c-algo-bit.c:
71+
A typical full-I2C adapter would use the following (from the i2c-pxa
72+
driver):
6773

68-
static u32 bit_func(struct i2c_adapter *adap)
74+
static u32 i2c_pxa_functionality(struct i2c_adapter *adap)
6975
{
70-
return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
71-
I2C_FUNC_PROTOCOL_MANGLING;
76+
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
7277
}
7378

79+
I2C_FUNC_SMBUS_EMUL includes all the SMBus transactions (with the
80+
addition of I2C block transactions) which i2c-core can emulate using
81+
I2C_FUNC_I2C without any help from the adapter driver. The idea is
82+
to let the client drivers check for the support of SMBus functions
83+
without having to care whether the said functions are implemented in
84+
hardware by the adapter, or emulated in software by i2c-core on top
85+
of an I2C adapter.
7486

7587

7688
CLIENT CHECKING
7789
---------------
7890

7991
Before a client tries to attach to an adapter, or even do tests to check
8092
whether one of the devices it supports is present on an adapter, it should
81-
check whether the needed functionality is present. There are two functions
82-
defined which should be used instead of calling the functionality hook
83-
in the algorithm structure directly:
84-
85-
/* Return the functionality mask */
86-
extern u32 i2c_get_functionality (struct i2c_adapter *adap);
87-
88-
/* Return 1 if adapter supports everything we need, 0 if not. */
89-
extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func);
93+
check whether the needed functionality is present. The typical way to do
94+
this is (from the lm75 driver):
9095

91-
This is a typical way to use these functions (from the writing-clients
92-
document):
93-
int foo_detect_client(struct i2c_adapter *adapter, int address,
94-
unsigned short flags, int kind)
96+
static int lm75_detect(...)
9597
{
96-
/* Define needed variables */
97-
98-
/* As the very first action, we check whether the adapter has the
99-
needed functionality: we need the SMBus read_word_data,
100-
write_word_data and write_byte functions in this example. */
101-
if (!i2c_check_functionality(adapter,I2C_FUNC_SMBUS_WORD_DATA |
102-
I2C_FUNC_SMBUS_WRITE_BYTE))
103-
goto ERROR0;
104-
105-
/* Now we can do the real detection */
106-
107-
ERROR0:
108-
/* Return an error */
98+
(...)
99+
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
100+
I2C_FUNC_SMBUS_WORD_DATA))
101+
goto exit;
102+
(...)
109103
}
110104

105+
Here, the lm75 driver checks if the adapter can do both SMBus byte data
106+
and SMBus word data transactions. If not, then the driver won't work on
107+
this adapter and there's no point in going on. If the check above is
108+
successful, then the driver knows that it can call the following
109+
functions: i2c_smbus_read_byte_data(), i2c_smbus_write_byte_data(),
110+
i2c_smbus_read_word_data() and i2c_smbus_write_word_data(). As a rule of
111+
thumb, the functionality constants you test for with
112+
i2c_check_functionality() should match exactly the i2c_smbus_* functions
113+
which you driver is calling.
114+
115+
Note that the check above doesn't tell whether the functionalities are
116+
implemented in hardware by the underlying adapter or emulated in
117+
software by i2c-core. Client drivers don't have to care about this, as
118+
i2c-core will transparently implement SMBus transactions on top of I2C
119+
adapters.
111120

112121

113122
CHECKING THROUGH /DEV
@@ -116,19 +125,19 @@ CHECKING THROUGH /DEV
116125
If you try to access an adapter from a userspace program, you will have
117126
to use the /dev interface. You will still have to check whether the
118127
functionality you need is supported, of course. This is done using
119-
the I2C_FUNCS ioctl. An example, adapted from the lm_sensors i2cdetect
120-
program, is below:
128+
the I2C_FUNCS ioctl. An example, adapted from the i2cdetect program, is
129+
below:
121130

122131
int file;
123-
if (file = open("/dev/i2c-0",O_RDWR) < 0) {
132+
if (file = open("/dev/i2c-0", O_RDWR) < 0) {
124133
/* Some kind of error handling */
125134
exit(1);
126135
}
127-
if (ioctl(file,I2C_FUNCS,&funcs) < 0) {
136+
if (ioctl(file, I2C_FUNCS, &funcs) < 0) {
128137
/* Some kind of error handling */
129138
exit(1);
130139
}
131-
if (! (funcs & I2C_FUNC_SMBUS_QUICK)) {
140+
if (!(funcs & I2C_FUNC_SMBUS_QUICK)) {
132141
/* Oops, the needed functionality (SMBus write_quick function) is
133142
not available! */
134143
exit(1);

0 commit comments

Comments
 (0)