Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218365
b: refs/heads/master
c: 7420a8c
h: refs/heads/master
i:
  218363: e0fe190
v: v3
  • Loading branch information
Linus Torvalds committed Oct 28, 2010
1 parent 08c8a3a commit 850ac69
Show file tree
Hide file tree
Showing 753 changed files with 34,971 additions and 18,453 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72f98e72551fad573c6cace8e8551ef094f482dd
refs/heads/master: 7420a8c0de8d99b201aeeab6fed16ca95ebf55a5
5 changes: 5 additions & 0 deletions trunk/Documentation/DocBook/device-drivers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@
<sect1><title>Delaying, scheduling, and timer routines</title>
!Iinclude/linux/sched.h
!Ekernel/sched.c
!Iinclude/linux/completion.h
!Ekernel/timer.c
</sect1>
<sect1><title>Wait queues and Wake events</title>
!Iinclude/linux/wait.h
!Ekernel/wait.c
</sect1>
<sect1><title>High-resolution timers</title>
!Iinclude/linux/ktime.h
Expand Down
6 changes: 6 additions & 0 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ X!Ilib/string.c
!Elib/crc32.c
!Elib/crc-ccitt.c
</sect1>

<sect1 id="idr"><title>idr/ida Functions</title>
!Pinclude/linux/idr.h idr sync
!Plib/idr.c IDA description
!Elib/idr.c
</sect1>
</chapter>

<chapter id="mm">
Expand Down
31 changes: 23 additions & 8 deletions trunk/Documentation/filesystems/Locking
Original file line number Diff line number Diff line change
Expand Up @@ -349,21 +349,36 @@ call this method upon the IO completion.

--------------------------- block_device_operations -----------------------
prototypes:
int (*open) (struct inode *, struct file *);
int (*release) (struct inode *, struct file *);
int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
int (*open) (struct block_device *, fmode_t);
int (*release) (struct gendisk *, fmode_t);
int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
int (*direct_access) (struct block_device *, sector_t, void **, unsigned long *);
int (*media_changed) (struct gendisk *);
void (*unlock_native_capacity) (struct gendisk *);
int (*revalidate_disk) (struct gendisk *);
int (*getgeo)(struct block_device *, struct hd_geometry *);
void (*swap_slot_free_notify) (struct block_device *, unsigned long);

locking rules:
BKL bd_sem
open: yes yes
release: yes yes
ioctl: yes no
BKL bd_mutex
open: no yes
release: no yes
ioctl: no no
compat_ioctl: no no
direct_access: no no
media_changed: no no
unlock_native_capacity: no no
revalidate_disk: no no
getgeo: no no
swap_slot_free_notify: no no (see below)

media_changed, unlock_native_capacity and revalidate_disk are called only from
check_disk_change().

swap_slot_free_notify is called with swap_lock and sometimes the page lock
held.

The last two are called only from check_disk_change().

--------------------------- file_operations -------------------------------
prototypes:
Expand Down
28 changes: 14 additions & 14 deletions trunk/Documentation/filesystems/nfs/idmapper.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Id mapper is used by NFS to translate user and group ids into names, and to
translate user and group names into ids. Part of this translation involves
performing an upcall to userspace to request the information. Id mapper will
user request-key to perform this upcall and cache the result. The program
/usr/sbin/nfs.upcall should be called by request-key, and will perform the
/usr/sbin/nfs.idmap should be called by request-key, and will perform the
translation and initialize a key with the resulting information.

NFS_USE_NEW_IDMAPPER must be selected when configuring the kernel to use this
Expand All @@ -20,12 +20,12 @@ direct the upcall. The following line should be added:

#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...
#====== ======= =============== =============== ===============================
create id_resolver * * /usr/sbin/nfs.upcall %k %d 600
create id_resolver * * /usr/sbin/nfs.idmap %k %d 600

This will direct all id_resolver requests to the program /usr/sbin/nfs.upcall.
This will direct all id_resolver requests to the program /usr/sbin/nfs.idmap.
The last parameter, 600, defines how many seconds into the future the key will
expire. This parameter is optional for /usr/sbin/nfs.upcall. When the timeout
is not specified, nfs.upcall will default to 600 seconds.
expire. This parameter is optional for /usr/sbin/nfs.idmap. When the timeout
is not specified, nfs.idmap will default to 600 seconds.

id mapper uses for key descriptions:
uid: Find the UID for the given user
Expand All @@ -39,29 +39,29 @@ would edit your request-key.conf so it look similar to this:

#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...
#====== ======= =============== =============== ===============================
create id_resolver uid:* * /some/other/program %k %d 600
create id_resolver * * /usr/sbin/nfs.upcall %k %d 600
create id_resolver uid:* * /some/other/program %k %d 600
create id_resolver * * /usr/sbin/nfs.idmap %k %d 600

Notice that the new line was added above the line for the generic program.
request-key will find the first matching line and corresponding program. In
this case, /some/other/program will handle all uid lookups and
/usr/sbin/nfs.upcall will handle gid, user, and group lookups.
/usr/sbin/nfs.idmap will handle gid, user, and group lookups.

See <file:Documentation/keys-request-keys.txt> for more information about the
request-key function.


==========
nfs.upcall
==========
nfs.upcall is designed to be called by request-key, and should not be run "by
=========
nfs.idmap
=========
nfs.idmap is designed to be called by request-key, and should not be run "by
hand". This program takes two arguments, a serialized key and a key
description. The serialized key is first converted into a key_serial_t, and
then passed as an argument to keyctl_instantiate (both are part of keyutils.h).

The actual lookups are performed by functions found in nfsidmap.h. nfs.upcall
The actual lookups are performed by functions found in nfsidmap.h. nfs.idmap
determines the correct function to call by looking at the first part of the
description string. For example, a uid lookup description will appear as
"uid:user@domain".

nfs.upcall will return 0 if the key was instantiated, and non-zero otherwise.
nfs.idmap will return 0 if the key was instantiated, and non-zero otherwise.
14 changes: 7 additions & 7 deletions trunk/Documentation/filesystems/proc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,13 @@ Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB

The first of these lines shows the same information as is displayed for the
mapping in /proc/PID/maps. The remaining lines show the size of the mapping,
the amount of the mapping that is currently resident in RAM, the "proportional
set size” (divide each shared page by the number of processes sharing it), the
number of clean and dirty shared pages in the mapping, and the number of clean
and dirty private pages in the mapping. The "Referenced" indicates the amount
of memory currently marked as referenced or accessed.
The first of these lines shows the same information as is displayed for the
mapping in /proc/PID/maps. The remaining lines show the size of the mapping
(size), the amount of the mapping that is currently resident in RAM (RSS), the
process' proportional share of this mapping (PSS), the number of clean and
dirty shared pages in the mapping, and the number of clean and dirty private
pages in the mapping. The "Referenced" indicates the amount of memory
currently marked as referenced or accessed.

This file is only present if the CONFIG_MMU kernel configuration option is
enabled.
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/filesystems/sharedsubtree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ replicas continue to be exactly same.
# mount /dev/sd0 /tmp/a

#ls /tmp/a
t1 t2 t2
t1 t2 t3

#ls /mnt/a
t1 t2 t2
t1 t2 t3

Note that the mount has propagated to the mount at /mnt as well.

Expand Down
111 changes: 111 additions & 0 deletions trunk/Documentation/misc-devices/apds990x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
Kernel driver apds990x
======================

Supported chips:
Avago APDS990X

Data sheet:
Not freely available

Author:
Samu Onkalo <samu.p.onkalo@nokia.com>

Description
-----------

APDS990x is a combined ambient light and proximity sensor. ALS and proximity
functionality are highly connected. ALS measurement path must be running
while the proximity functionality is enabled.

ALS produces raw measurement values for two channels: Clear channel
(infrared + visible light) and IR only. However, threshold comparisons happen
using clear channel only. Lux value and the threshold level on the HW
might vary quite much depending the spectrum of the light source.

Driver makes necessary conversions to both directions so that user handles
only lux values. Lux value is calculated using information from the both
channels. HW threshold level is calculated from the given lux value to match
with current type of the lightning. Sometimes inaccuracy of the estimations
lead to false interrupt, but that doesn't harm.

ALS contains 4 different gain steps. Driver automatically
selects suitable gain step. After each measurement, reliability of the results
is estimated and new measurement is trigged if necessary.

Platform data can provide tuned values to the conversion formulas if
values are known. Otherwise plain sensor default values are used.

Proximity side is little bit simpler. There is no need for complex conversions.
It produces directly usable values.

Driver controls chip operational state using pm_runtime framework.
Voltage regulators are controlled based on chip operational state.

SYSFS
-----


chip_id
RO - shows detected chip type and version

power_state
RW - enable / disable chip. Uses counting logic
1 enables the chip
0 disables the chip
lux0_input
RO - measured lux value
sysfs_notify called when threshold interrupt occurs

lux0_sensor_range
RO - lux0_input max value. Actually never reaches since sensor tends
to saturate much before that. Real max value varies depending
on the light spectrum etc.

lux0_rate
RW - measurement rate in Hz

lux0_rate_avail
RO - supported measurement rates

lux0_calibscale
RW - calibration value. Set to neutral value by default.
Output results are multiplied with calibscale / calibscale_default
value.

lux0_calibscale_default
RO - neutral calibration value

lux0_thresh_above_value
RW - HI level threshold value. All results above the value
trigs an interrupt. 65535 (i.e. sensor_range) disables the above
interrupt.

lux0_thresh_below_value
RW - LO level threshold value. All results below the value
trigs an interrupt. 0 disables the below interrupt.

prox0_raw
RO - measured proximity value
sysfs_notify called when threshold interrupt occurs

prox0_sensor_range
RO - prox0_raw max value (1023)

prox0_raw_en
RW - enable / disable proximity - uses counting logic
1 enables the proximity
0 disables the proximity

prox0_reporting_mode
RW - trigger / periodic. In "trigger" mode the driver tells two possible
values: 0 or prox0_sensor_range value. 0 means no proximity,
1023 means proximity. This causes minimal number of interrupts.
In "periodic" mode the driver reports all values above
prox0_thresh_above. This causes more interrupts, but it can give
_rough_ estimate about the distance.

prox0_reporting_mode_avail
RO - accepted values to prox0_reporting_mode (trigger, periodic)

prox0_thresh_above_value
RW - threshold level which trigs proximity events.
Loading

0 comments on commit 850ac69

Please sign in to comment.