diff --git a/[refs] b/[refs]
index 64b6aed802d5..e7fbb9fd216d 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: e3e3679cfc1c6689e035f6d69606253b1eda63ca
+refs/heads/master: 8085e1f1f0645fc6ddefcb54fdcba95808df5049
diff --git a/trunk/Documentation/DocBook/mcabook.tmpl b/trunk/Documentation/DocBook/mcabook.tmpl
index 42a760cd7467..4367f4642f3d 100644
--- a/trunk/Documentation/DocBook/mcabook.tmpl
+++ b/trunk/Documentation/DocBook/mcabook.tmpl
@@ -96,7 +96,7 @@
Public Functions Provided
-!Edrivers/mca/mca-legacy.c
+!Earch/i386/kernel/mca.c
diff --git a/trunk/Documentation/IPMI.txt b/trunk/Documentation/IPMI.txt
index bf1cf98d2a27..84d3d4d10c17 100644
--- a/trunk/Documentation/IPMI.txt
+++ b/trunk/Documentation/IPMI.txt
@@ -605,13 +605,12 @@ is in the ipmi_poweroff module. When the system requests a powerdown,
it will send the proper IPMI commands to do this. This is supported on
several platforms.
-There is a module parameter named "poweroff_powercycle" that may
-either be zero (do a power down) or non-zero (do a power cycle, power
-the system off, then power it on in a few seconds). Setting
-ipmi_poweroff.poweroff_control=x will do the same thing on the kernel
-command line. The parameter is also available via the proc filesystem
-in /proc/sys/dev/ipmi/poweroff_powercycle. Note that if the system
-does not support power cycling, it will always do the power off.
+There is a module parameter named "poweroff_control" that may either be zero
+(do a power down) or 2 (do a power cycle, power the system off, then power
+it on in a few seconds). Setting ipmi_poweroff.poweroff_control=x will do
+the same thing on the kernel command line. The parameter is also available
+via the proc filesystem in /proc/ipmi/poweroff_control. Note that if the
+system does not support power cycling, it will always to the power off.
Note that if you have ACPI enabled, the system will prefer using ACPI to
power off.
diff --git a/trunk/Documentation/RCU/NMI-RCU.txt b/trunk/Documentation/RCU/NMI-RCU.txt
deleted file mode 100644
index d0634a5c3445..000000000000
--- a/trunk/Documentation/RCU/NMI-RCU.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-Using RCU to Protect Dynamic NMI Handlers
-
-
-Although RCU is usually used to protect read-mostly data structures,
-it is possible to use RCU to provide dynamic non-maskable interrupt
-handlers, as well as dynamic irq handlers. This document describes
-how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer
-work in "arch/i386/oprofile/nmi_timer_int.c" and in
-"arch/i386/kernel/traps.c".
-
-The relevant pieces of code are listed below, each followed by a
-brief explanation.
-
- static int dummy_nmi_callback(struct pt_regs *regs, int cpu)
- {
- return 0;
- }
-
-The dummy_nmi_callback() function is a "dummy" NMI handler that does
-nothing, but returns zero, thus saying that it did nothing, allowing
-the NMI handler to take the default machine-specific action.
-
- static nmi_callback_t nmi_callback = dummy_nmi_callback;
-
-This nmi_callback variable is a global function pointer to the current
-NMI handler.
-
- fastcall void do_nmi(struct pt_regs * regs, long error_code)
- {
- int cpu;
-
- nmi_enter();
-
- cpu = smp_processor_id();
- ++nmi_count(cpu);
-
- if (!rcu_dereference(nmi_callback)(regs, cpu))
- default_do_nmi(regs);
-
- nmi_exit();
- }
-
-The do_nmi() function processes each NMI. It first disables preemption
-in the same way that a hardware irq would, then increments the per-CPU
-count of NMIs. It then invokes the NMI handler stored in the nmi_callback
-function pointer. If this handler returns zero, do_nmi() invokes the
-default_do_nmi() function to handle a machine-specific NMI. Finally,
-preemption is restored.
-
-Strictly speaking, rcu_dereference() is not needed, since this code runs
-only on i386, which does not need rcu_dereference() anyway. However,
-it is a good documentation aid, particularly for anyone attempting to
-do something similar on Alpha.
-
-Quick Quiz: Why might the rcu_dereference() be necessary on Alpha,
- given that the code referenced by the pointer is read-only?
-
-
-Back to the discussion of NMI and RCU...
-
- void set_nmi_callback(nmi_callback_t callback)
- {
- rcu_assign_pointer(nmi_callback, callback);
- }
-
-The set_nmi_callback() function registers an NMI handler. Note that any
-data that is to be used by the callback must be initialized up -before-
-the call to set_nmi_callback(). On architectures that do not order
-writes, the rcu_assign_pointer() ensures that the NMI handler sees the
-initialized values.
-
- void unset_nmi_callback(void)
- {
- rcu_assign_pointer(nmi_callback, dummy_nmi_callback);
- }
-
-This function unregisters an NMI handler, restoring the original
-dummy_nmi_handler(). However, there may well be an NMI handler
-currently executing on some other CPU. We therefore cannot free
-up any data structures used by the old NMI handler until execution
-of it completes on all other CPUs.
-
-One way to accomplish this is via synchronize_sched(), perhaps as
-follows:
-
- unset_nmi_callback();
- synchronize_sched();
- kfree(my_nmi_data);
-
-This works because synchronize_sched() blocks until all CPUs complete
-any preemption-disabled segments of code that they were executing.
-Since NMI handlers disable preemption, synchronize_sched() is guaranteed
-not to return until all ongoing NMI handlers exit. It is therefore safe
-to free up the handler's data as soon as synchronize_sched() returns.
-
-
-Answer to Quick Quiz
-
- Why might the rcu_dereference() be necessary on Alpha, given
- that the code referenced by the pointer is read-only?
-
- Answer: The caller to set_nmi_callback() might well have
- initialized some data that is to be used by the
- new NMI handler. In this case, the rcu_dereference()
- would be needed, because otherwise a CPU that received
- an NMI just after the new handler was set might see
- the pointer to the new NMI handler, but the old
- pre-initialized version of the handler's data.
-
- More important, the rcu_dereference() makes it clear
- to someone reading the code that the pointer is being
- protected by RCU.
diff --git a/trunk/Documentation/acpi-hotkey.txt b/trunk/Documentation/acpi-hotkey.txt
index 744f1aec6553..0acdc80c30c2 100644
--- a/trunk/Documentation/acpi-hotkey.txt
+++ b/trunk/Documentation/acpi-hotkey.txt
@@ -35,4 +35,4 @@ created. Please use command "cat /proc/acpi/hotkey/polling_method"
to retrieve it.
Note: Use cmdline "acpi_generic_hotkey" to over-ride
-platform-specific with generic driver.
+loading any platform specific drivers.
diff --git a/trunk/Documentation/cdrom/sonycd535 b/trunk/Documentation/cdrom/sonycd535
index b81e109970aa..59581a4b302a 100644
--- a/trunk/Documentation/cdrom/sonycd535
+++ b/trunk/Documentation/cdrom/sonycd535
@@ -68,8 +68,7 @@ it a better device citizen. Further thanks to Joel Katz
Porfiri Claudio for patches
to make the driver work with the older CDU-510/515 series, and
Heiko Eissfeldt for pointing out that
-the verify_area() checks were ignoring the results of said checks
-(note: verify_area() has since been replaced by access_ok()).
+the verify_area() checks were ignoring the results of said checks.
(Acknowledgments from Ron Jeppesen in the 0.3 release:)
Thanks to Corey Minyard who wrote the original CDU-31A driver on which
diff --git a/trunk/Documentation/cpusets.txt b/trunk/Documentation/cpusets.txt
index 47f4114fbf54..ad944c060312 100644
--- a/trunk/Documentation/cpusets.txt
+++ b/trunk/Documentation/cpusets.txt
@@ -60,18 +60,6 @@ all of the cpus in the system. This removes any overhead due to
load balancing code trying to pull tasks outside of the cpu exclusive
cpuset only to be prevented by the tasks' cpus_allowed mask.
-A cpuset that is mem_exclusive restricts kernel allocations for
-page, buffer and other data commonly shared by the kernel across
-multiple users. All cpusets, whether mem_exclusive or not, restrict
-allocations of memory for user space. This enables configuring a
-system so that several independent jobs can share common kernel
-data, such as file system pages, while isolating each jobs user
-allocation in its own cpuset. To do this, construct a large
-mem_exclusive cpuset to hold all the jobs, and construct child,
-non-mem_exclusive cpusets for each individual job. Only a small
-amount of typical kernel memory, such as requests from interrupt
-handlers, is allowed to be taken outside even a mem_exclusive cpuset.
-
User level code may create and destroy cpusets by name in the cpuset
virtual file system, manage the attributes and permissions of these
cpusets and which CPUs and Memory Nodes are assigned to each cpuset,
diff --git a/trunk/Documentation/crypto/api-intro.txt b/trunk/Documentation/crypto/api-intro.txt
index 74dffc68ff9f..a2d5b4900772 100644
--- a/trunk/Documentation/crypto/api-intro.txt
+++ b/trunk/Documentation/crypto/api-intro.txt
@@ -223,7 +223,6 @@ CAST5 algorithm contributors:
TEA/XTEA algorithm contributors:
Aaron Grothe
- Michael Ringe
Khazad algorithm contributors:
Aaron Grothe
diff --git a/trunk/Documentation/dcdbas.txt b/trunk/Documentation/dcdbas.txt
deleted file mode 100644
index e1c52e2dc361..000000000000
--- a/trunk/Documentation/dcdbas.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-Overview
-
-The Dell Systems Management Base Driver provides a sysfs interface for
-systems management software such as Dell OpenManage to perform system
-management interrupts and host control actions (system power cycle or
-power off after OS shutdown) on certain Dell systems.
-
-Dell OpenManage requires this driver on the following Dell PowerEdge systems:
-300, 1300, 1400, 400SC, 500SC, 1500SC, 1550, 600SC, 1600SC, 650, 1655MC,
-700, and 750. Other Dell software such as the open source libsmbios project
-is expected to make use of this driver, and it may include the use of this
-driver on other Dell systems.
-
-The Dell libsmbios project aims towards providing access to as much BIOS
-information as possible. See http://linux.dell.com/libsmbios/main/ for
-more information about the libsmbios project.
-
-
-System Management Interrupt
-
-On some Dell systems, systems management software must access certain
-management information via a system management interrupt (SMI). The SMI data
-buffer must reside in 32-bit address space, and the physical address of the
-buffer is required for the SMI. The driver maintains the memory required for
-the SMI and provides a way for the application to generate the SMI.
-The driver creates the following sysfs entries for systems management
-software to perform these system management interrupts:
-
-/sys/devices/platform/dcdbas/smi_data
-/sys/devices/platform/dcdbas/smi_data_buf_phys_addr
-/sys/devices/platform/dcdbas/smi_data_buf_size
-/sys/devices/platform/dcdbas/smi_request
-
-Systems management software must perform the following steps to execute
-a SMI using this driver:
-
-1) Lock smi_data.
-2) Write system management command to smi_data.
-3) Write "1" to smi_request to generate a calling interface SMI or
- "2" to generate a raw SMI.
-4) Read system management command response from smi_data.
-5) Unlock smi_data.
-
-
-Host Control Action
-
-Dell OpenManage supports a host control feature that allows the administrator
-to perform a power cycle or power off of the system after the OS has finished
-shutting down. On some Dell systems, this host control feature requires that
-a driver perform a SMI after the OS has finished shutting down.
-
-The driver creates the following sysfs entries for systems management software
-to schedule the driver to perform a power cycle or power off host control
-action after the system has finished shutting down:
-
-/sys/devices/platform/dcdbas/host_control_action
-/sys/devices/platform/dcdbas/host_control_smi_type
-/sys/devices/platform/dcdbas/host_control_on_shutdown
-
-Dell OpenManage performs the following steps to execute a power cycle or
-power off host control action using this driver:
-
-1) Write host control action to be performed to host_control_action.
-2) Write type of SMI that driver needs to perform to host_control_smi_type.
-3) Write "1" to host_control_on_shutdown to enable host control action.
-4) Initiate OS shutdown.
- (Driver will perform host control SMI when it is notified that the OS
- has finished shutting down.)
-
-
-Host Control SMI Type
-
-The following table shows the value to write to host_control_smi_type to
-perform a power cycle or power off host control action:
-
-PowerEdge System Host Control SMI Type
----------------- ---------------------
- 300 HC_SMITYPE_TYPE1
- 1300 HC_SMITYPE_TYPE1
- 1400 HC_SMITYPE_TYPE2
- 500SC HC_SMITYPE_TYPE2
- 1500SC HC_SMITYPE_TYPE2
- 1550 HC_SMITYPE_TYPE2
- 600SC HC_SMITYPE_TYPE2
- 1600SC HC_SMITYPE_TYPE2
- 650 HC_SMITYPE_TYPE2
- 1655MC HC_SMITYPE_TYPE2
- 700 HC_SMITYPE_TYPE3
- 750 HC_SMITYPE_TYPE3
-
-
diff --git a/trunk/Documentation/dell_rbu.txt b/trunk/Documentation/dell_rbu.txt
deleted file mode 100644
index bcfa5c35036b..000000000000
--- a/trunk/Documentation/dell_rbu.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-Purpose:
-Demonstrate the usage of the new open sourced rbu (Remote BIOS Update) driver
-for updating BIOS images on Dell servers and desktops.
-
-Scope:
-This document discusses the functionality of the rbu driver only.
-It does not cover the support needed from aplications to enable the BIOS to
-update itself with the image downloaded in to the memory.
-
-Overview:
-This driver works with Dell OpenManage or Dell Update Packages for updating
-the BIOS on Dell servers (starting from servers sold since 1999), desktops
-and notebooks (starting from those sold in 2005).
-Please go to http://support.dell.com register and you can find info on
-OpenManage and Dell Update packages (DUP).
-
-Dell_RBU driver supports BIOS update using the monilothic image and packetized
-image methods. In case of moniolithic the driver allocates a contiguous chunk
-of physical pages having the BIOS image. In case of packetized the app
-using the driver breaks the image in to packets of fixed sizes and the driver
-would place each packet in contiguous physical memory. The driver also
-maintains a link list of packets for reading them back.
-If the dell_rbu driver is unloaded all the allocated memory is freed.
-
-The rbu driver needs to have an application which will inform the BIOS to
-enable the update in the next system reboot.
-
-The user should not unload the rbu driver after downloading the BIOS image
-or updating.
-
-The driver load creates the following directories under the /sys file system.
-/sys/class/firmware/dell_rbu/loading
-/sys/class/firmware/dell_rbu/data
-/sys/devices/platform/dell_rbu/image_type
-/sys/devices/platform/dell_rbu/data
-
-The driver supports two types of update mechanism; monolithic and packetized.
-These update mechanism depends upon the BIOS currently running on the system.
-Most of the Dell systems support a monolithic update where the BIOS image is
-copied to a single contiguous block of physical memory.
-In case of packet mechanism the single memory can be broken in smaller chuks
-of contiguous memory and the BIOS image is scattered in these packets.
-
-By default the driver uses monolithic memory for the update type. This can be
-changed to contiguous during the driver load time by specifying the load
-parameter image_type=packet. This can also be changed later as below
-echo packet > /sys/devices/platform/dell_rbu/image_type
-
-Do the steps below to download the BIOS image.
-1) echo 1 > /sys/class/firmware/dell_rbu/loading
-2) cp bios_image.hdr /sys/class/firmware/dell_rbu/data
-3) echo 0 > /sys/class/firmware/dell_rbu/loading
-
-The /sys/class/firmware/dell_rbu/ entries will remain till the following is
-done.
-echo -1 > /sys/class/firmware/dell_rbu/loading
-
-Until this step is completed the drivr cannot be unloaded.
-
-Also the driver provides /sys/devices/platform/dell_rbu/data readonly file to
-read back the image downloaded. This is useful in case of packet update
-mechanism where the above steps 1,2,3 will repeated for every packet.
-By reading the /sys/devices/platform/dell_rbu/data file all packet data
-downloaded can be verified in a single file.
-The packets are arranged in this file one after the other in a FIFO order.
-
-NOTE:
-This driver requires a patch for firmware_class.c which has the addition
-of request_firmware_nowait_nohotplug function to wortk
-Also after updating the BIOS image an user mdoe application neeeds to execute
-code which message the BIOS update request to the BIOS. So on the next reboot
-the BIOS knows about the new image downloaded and it updates it self.
-Also don't unload the rbu drive if the image has to be updated.
-
diff --git a/trunk/Documentation/dvb/bt8xx.txt b/trunk/Documentation/dvb/bt8xx.txt
index 4b8c326c6aac..e6b8d05bc08d 100644
--- a/trunk/Documentation/dvb/bt8xx.txt
+++ b/trunk/Documentation/dvb/bt8xx.txt
@@ -16,7 +16,7 @@ Enable the following options:
"Device drivers" => "Multimedia devices"
=> "Video For Linux" => "BT848 Video For Linux"
"Device drivers" => "Multimedia devices" => "Digital Video Broadcasting Devices"
- => "DVB for Linux" "DVB Core Support" "BT8xx based PCI cards"
+ => "DVB for Linux" "DVB Core Support" "Nebula/Pinnacle PCTV/TwinHan PCI Cards"
3) Loading Modules, described by two approaches
===============================================
diff --git a/trunk/Documentation/exception.txt b/trunk/Documentation/exception.txt
index 3cb39ade290e..f1d436993eb1 100644
--- a/trunk/Documentation/exception.txt
+++ b/trunk/Documentation/exception.txt
@@ -7,7 +7,7 @@ To protect itself the kernel has to verify this address.
In older versions of Linux this was done with the
int verify_area(int type, const void * addr, unsigned long size)
-function (which has since been replaced by access_ok()).
+function.
This function verified that the memory area starting at address
addr and of size size was accessible for the operation specified
diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt
index 5f95d4b3cab1..0665cb12bd66 100644
--- a/trunk/Documentation/feature-removal-schedule.txt
+++ b/trunk/Documentation/feature-removal-schedule.txt
@@ -25,6 +25,15 @@ Who: Pavel Machek
---------------------------
+What: PCI Name Database (CONFIG_PCI_NAMES)
+When: July 2005
+Why: It bloats the kernel unnecessarily, and is handled by userspace better
+ (pciutils supports it.) Will eliminate the need to try to keep the
+ pci.ids file in sync with the sf.net database all of the time.
+Who: Greg Kroah-Hartman
+
+---------------------------
+
What: io_remap_page_range() (macro or function)
When: September 2005
Why: Replaced by io_remap_pfn_range() which allows more memory space
@@ -42,6 +51,14 @@ Who: Adrian Bunk
---------------------------
+What: register_ioctl32_conversion() / unregister_ioctl32_conversion()
+When: April 2005
+Why: Replaced by ->compat_ioctl in file_operations and other method
+ vecors.
+Who: Andi Kleen , Christoph Hellwig
+
+---------------------------
+
What: RCU API moves to EXPORT_SYMBOL_GPL
When: April 2006
Files: include/linux/rcupdate.h, kernel/rcupdate.c
@@ -57,6 +74,14 @@ Who: Paul E. McKenney
---------------------------
+What: remove verify_area()
+When: July 2006
+Files: Various uaccess.h headers.
+Why: Deprecated and redundant. access_ok() should be used instead.
+Who: Jesper Juhl
+
+---------------------------
+
What: IEEE1394 Audio and Music Data Transmission Protocol driver,
Connection Management Procedures driver
When: November 2005
@@ -77,6 +102,16 @@ Who: Jody McIntyre
---------------------------
+What: register_serial/unregister_serial
+When: September 2005
+Why: This interface does not allow serial ports to be registered against
+ a struct device, and as such does not allow correct power management
+ of such ports. 8250-based ports should use serial8250_register_port
+ and serial8250_unregister_port, or platform devices instead.
+Who: Russell King
+
+---------------------------
+
What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid
When: November 2005
Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c
diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt
index 5024ba7a592c..6c98f2bd421e 100644
--- a/trunk/Documentation/filesystems/proc.txt
+++ b/trunk/Documentation/filesystems/proc.txt
@@ -133,7 +133,6 @@ Table 1-1: Process specific entries in /proc
statm Process memory status information
status Process status in human readable form
wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan
- smaps Extension based on maps, presenting the rss size for each mapped file
..............................................................................
For example, to get the status information of a process, all you have to do is
diff --git a/trunk/Documentation/filesystems/relayfs.txt b/trunk/Documentation/filesystems/relayfs.txt
deleted file mode 100644
index d24e1b0d4f39..000000000000
--- a/trunk/Documentation/filesystems/relayfs.txt
+++ /dev/null
@@ -1,362 +0,0 @@
-
-relayfs - a high-speed data relay filesystem
-============================================
-
-relayfs is a filesystem designed to provide an efficient mechanism for
-tools and facilities to relay large and potentially sustained streams
-of data from kernel space to user space.
-
-The main abstraction of relayfs is the 'channel'. A channel consists
-of a set of per-cpu kernel buffers each represented by a file in the
-relayfs filesystem. Kernel clients write into a channel using
-efficient write functions which automatically log to the current cpu's
-channel buffer. User space applications mmap() the per-cpu files and
-retrieve the data as it becomes available.
-
-The format of the data logged into the channel buffers is completely
-up to the relayfs client; relayfs does however provide hooks which
-allow clients to impose some stucture on the buffer data. Nor does
-relayfs implement any form of data filtering - this also is left to
-the client. The purpose is to keep relayfs as simple as possible.
-
-This document provides an overview of the relayfs API. The details of
-the function parameters are documented along with the functions in the
-filesystem code - please see that for details.
-
-Semantics
-=========
-
-Each relayfs channel has one buffer per CPU, each buffer has one or
-more sub-buffers. Messages are written to the first sub-buffer until
-it is too full to contain a new message, in which case it it is
-written to the next (if available). Messages are never split across
-sub-buffers. At this point, userspace can be notified so it empties
-the first sub-buffer, while the kernel continues writing to the next.
-
-When notified that a sub-buffer is full, the kernel knows how many
-bytes of it are padding i.e. unused. Userspace can use this knowledge
-to copy only valid data.
-
-After copying it, userspace can notify the kernel that a sub-buffer
-has been consumed.
-
-relayfs can operate in a mode where it will overwrite data not yet
-collected by userspace, and not wait for it to consume it.
-
-relayfs itself does not provide for communication of such data between
-userspace and kernel, allowing the kernel side to remain simple and not
-impose a single interface on userspace. It does provide a separate
-helper though, described below.
-
-klog, relay-app & librelay
-==========================
-
-relayfs itself is ready to use, but to make things easier, two
-additional systems are provided. klog is a simple wrapper to make
-writing formatted text or raw data to a channel simpler, regardless of
-whether a channel to write into exists or not, or whether relayfs is
-compiled into the kernel or is configured as a module. relay-app is
-the kernel counterpart of userspace librelay.c, combined these two
-files provide glue to easily stream data to disk, without having to
-bother with housekeeping. klog and relay-app can be used together,
-with klog providing high-level logging functions to the kernel and
-relay-app taking care of kernel-user control and disk-logging chores.
-
-It is possible to use relayfs without relay-app & librelay, but you'll
-have to implement communication between userspace and kernel, allowing
-both to convey the state of buffers (full, empty, amount of padding).
-
-klog, relay-app and librelay can be found in the relay-apps tarball on
-http://relayfs.sourceforge.net
-
-The relayfs user space API
-==========================
-
-relayfs implements basic file operations for user space access to
-relayfs channel buffer data. Here are the file operations that are
-available and some comments regarding their behavior:
-
-open() enables user to open an _existing_ buffer.
-
-mmap() results in channel buffer being mapped into the caller's
- memory space. Note that you can't do a partial mmap - you must
- map the entire file, which is NRBUF * SUBBUFSIZE.
-
-read() read the contents of a channel buffer. The bytes read are
- 'consumed' by the reader i.e. they won't be available again
- to subsequent reads. If the channel is being used in
- no-overwrite mode (the default), it can be read at any time
- even if there's an active kernel writer. If the channel is
- being used in overwrite mode and there are active channel
- writers, results may be unpredictable - users should make
- sure that all logging to the channel has ended before using
- read() with overwrite mode.
-
-poll() POLLIN/POLLRDNORM/POLLERR supported. User applications are
- notified when sub-buffer boundaries are crossed.
-
-close() decrements the channel buffer's refcount. When the refcount
- reaches 0 i.e. when no process or kernel client has the buffer
- open, the channel buffer is freed.
-
-
-In order for a user application to make use of relayfs files, the
-relayfs filesystem must be mounted. For example,
-
- mount -t relayfs relayfs /mnt/relay
-
-NOTE: relayfs doesn't need to be mounted for kernel clients to create
- or use channels - it only needs to be mounted when user space
- applications need access to the buffer data.
-
-
-The relayfs kernel API
-======================
-
-Here's a summary of the API relayfs provides to in-kernel clients:
-
-
- channel management functions:
-
- relay_open(base_filename, parent, subbuf_size, n_subbufs,
- callbacks)
- relay_close(chan)
- relay_flush(chan)
- relay_reset(chan)
- relayfs_create_dir(name, parent)
- relayfs_remove_dir(dentry)
-
- channel management typically called on instigation of userspace:
-
- relay_subbufs_consumed(chan, cpu, subbufs_consumed)
-
- write functions:
-
- relay_write(chan, data, length)
- __relay_write(chan, data, length)
- relay_reserve(chan, length)
-
- callbacks:
-
- subbuf_start(buf, subbuf, prev_subbuf, prev_padding)
- buf_mapped(buf, filp)
- buf_unmapped(buf, filp)
-
- helper functions:
-
- relay_buf_full(buf)
- subbuf_start_reserve(buf, length)
-
-
-Creating a channel
-------------------
-
-relay_open() is used to create a channel, along with its per-cpu
-channel buffers. Each channel buffer will have an associated file
-created for it in the relayfs filesystem, which can be opened and
-mmapped from user space if desired. The files are named
-basename0...basenameN-1 where N is the number of online cpus, and by
-default will be created in the root of the filesystem. If you want a
-directory structure to contain your relayfs files, you can create it
-with relayfs_create_dir() and pass the parent directory to
-relay_open(). Clients are responsible for cleaning up any directory
-structure they create when the channel is closed - use
-relayfs_remove_dir() for that.
-
-The total size of each per-cpu buffer is calculated by multiplying the
-number of sub-buffers by the sub-buffer size passed into relay_open().
-The idea behind sub-buffers is that they're basically an extension of
-double-buffering to N buffers, and they also allow applications to
-easily implement random-access-on-buffer-boundary schemes, which can
-be important for some high-volume applications. The number and size
-of sub-buffers is completely dependent on the application and even for
-the same application, different conditions will warrant different
-values for these parameters at different times. Typically, the right
-values to use are best decided after some experimentation; in general,
-though, it's safe to assume that having only 1 sub-buffer is a bad
-idea - you're guaranteed to either overwrite data or lose events
-depending on the channel mode being used.
-
-Channel 'modes'
----------------
-
-relayfs channels can be used in either of two modes - 'overwrite' or
-'no-overwrite'. The mode is entirely determined by the implementation
-of the subbuf_start() callback, as described below. In 'overwrite'
-mode, also known as 'flight recorder' mode, writes continuously cycle
-around the buffer and will never fail, but will unconditionally
-overwrite old data regardless of whether it's actually been consumed.
-In no-overwrite mode, writes will fail i.e. data will be lost, if the
-number of unconsumed sub-buffers equals the total number of
-sub-buffers in the channel. It should be clear that if there is no
-consumer or if the consumer can't consume sub-buffers fast enought,
-data will be lost in either case; the only difference is whether data
-is lost from the beginning or the end of a buffer.
-
-As explained above, a relayfs channel is made of up one or more
-per-cpu channel buffers, each implemented as a circular buffer
-subdivided into one or more sub-buffers. Messages are written into
-the current sub-buffer of the channel's current per-cpu buffer via the
-write functions described below. Whenever a message can't fit into
-the current sub-buffer, because there's no room left for it, the
-client is notified via the subbuf_start() callback that a switch to a
-new sub-buffer is about to occur. The client uses this callback to 1)
-initialize the next sub-buffer if appropriate 2) finalize the previous
-sub-buffer if appropriate and 3) return a boolean value indicating
-whether or not to actually go ahead with the sub-buffer switch.
-
-To implement 'no-overwrite' mode, the userspace client would provide
-an implementation of the subbuf_start() callback something like the
-following:
-
-static int subbuf_start(struct rchan_buf *buf,
- void *subbuf,
- void *prev_subbuf,
- unsigned int prev_padding)
-{
- if (prev_subbuf)
- *((unsigned *)prev_subbuf) = prev_padding;
-
- if (relay_buf_full(buf))
- return 0;
-
- subbuf_start_reserve(buf, sizeof(unsigned int));
-
- return 1;
-}
-
-If the current buffer is full i.e. all sub-buffers remain unconsumed,
-the callback returns 0 to indicate that the buffer switch should not
-occur yet i.e. until the consumer has had a chance to read the current
-set of ready sub-buffers. For the relay_buf_full() function to make
-sense, the consumer is reponsible for notifying relayfs when
-sub-buffers have been consumed via relay_subbufs_consumed(). Any
-subsequent attempts to write into the buffer will again invoke the
-subbuf_start() callback with the same parameters; only when the
-consumer has consumed one or more of the ready sub-buffers will
-relay_buf_full() return 0, in which case the buffer switch can
-continue.
-
-The implementation of the subbuf_start() callback for 'overwrite' mode
-would be very similar:
-
-static int subbuf_start(struct rchan_buf *buf,
- void *subbuf,
- void *prev_subbuf,
- unsigned int prev_padding)
-{
- if (prev_subbuf)
- *((unsigned *)prev_subbuf) = prev_padding;
-
- subbuf_start_reserve(buf, sizeof(unsigned int));
-
- return 1;
-}
-
-In this case, the relay_buf_full() check is meaningless and the
-callback always returns 1, causing the buffer switch to occur
-unconditionally. It's also meaningless for the client to use the
-relay_subbufs_consumed() function in this mode, as it's never
-consulted.
-
-The default subbuf_start() implementation, used if the client doesn't
-define any callbacks, or doesn't define the subbuf_start() callback,
-implements the simplest possible 'no-overwrite' mode i.e. it does
-nothing but return 0.
-
-Header information can be reserved at the beginning of each sub-buffer
-by calling the subbuf_start_reserve() helper function from within the
-subbuf_start() callback. This reserved area can be used to store
-whatever information the client wants. In the example above, room is
-reserved in each sub-buffer to store the padding count for that
-sub-buffer. This is filled in for the previous sub-buffer in the
-subbuf_start() implementation; the padding value for the previous
-sub-buffer is passed into the subbuf_start() callback along with a
-pointer to the previous sub-buffer, since the padding value isn't
-known until a sub-buffer is filled. The subbuf_start() callback is
-also called for the first sub-buffer when the channel is opened, to
-give the client a chance to reserve space in it. In this case the
-previous sub-buffer pointer passed into the callback will be NULL, so
-the client should check the value of the prev_subbuf pointer before
-writing into the previous sub-buffer.
-
-Writing to a channel
---------------------
-
-kernel clients write data into the current cpu's channel buffer using
-relay_write() or __relay_write(). relay_write() is the main logging
-function - it uses local_irqsave() to protect the buffer and should be
-used if you might be logging from interrupt context. If you know
-you'll never be logging from interrupt context, you can use
-__relay_write(), which only disables preemption. These functions
-don't return a value, so you can't determine whether or not they
-failed - the assumption is that you wouldn't want to check a return
-value in the fast logging path anyway, and that they'll always succeed
-unless the buffer is full and no-overwrite mode is being used, in
-which case you can detect a failed write in the subbuf_start()
-callback by calling the relay_buf_full() helper function.
-
-relay_reserve() is used to reserve a slot in a channel buffer which
-can be written to later. This would typically be used in applications
-that need to write directly into a channel buffer without having to
-stage data in a temporary buffer beforehand. Because the actual write
-may not happen immediately after the slot is reserved, applications
-using relay_reserve() can keep a count of the number of bytes actually
-written, either in space reserved in the sub-buffers themselves or as
-a separate array. See the 'reserve' example in the relay-apps tarball
-at http://relayfs.sourceforge.net for an example of how this can be
-done. Because the write is under control of the client and is
-separated from the reserve, relay_reserve() doesn't protect the buffer
-at all - it's up to the client to provide the appropriate
-synchronization when using relay_reserve().
-
-Closing a channel
------------------
-
-The client calls relay_close() when it's finished using the channel.
-The channel and its associated buffers are destroyed when there are no
-longer any references to any of the channel buffers. relay_flush()
-forces a sub-buffer switch on all the channel buffers, and can be used
-to finalize and process the last sub-buffers before the channel is
-closed.
-
-Misc
-----
-
-Some applications may want to keep a channel around and re-use it
-rather than open and close a new channel for each use. relay_reset()
-can be used for this purpose - it resets a channel to its initial
-state without reallocating channel buffer memory or destroying
-existing mappings. It should however only be called when it's safe to
-do so i.e. when the channel isn't currently being written to.
-
-Finally, there are a couple of utility callbacks that can be used for
-different purposes. buf_mapped() is called whenever a channel buffer
-is mmapped from user space and buf_unmapped() is called when it's
-unmapped. The client can use this notification to trigger actions
-within the kernel application, such as enabling/disabling logging to
-the channel.
-
-
-Resources
-=========
-
-For news, example code, mailing list, etc. see the relayfs homepage:
-
- http://relayfs.sourceforge.net
-
-
-Credits
-=======
-
-The ideas and specs for relayfs came about as a result of discussions
-on tracing involving the following:
-
-Michel Dagenais
-Richard Moore
-Bob Wisniewski
-Karim Yaghmour
-Tom Zanussi
-
-Also thanks to Hubertus Franke for a lot of useful suggestions and bug
-reports.
diff --git a/trunk/Documentation/filesystems/sysfs.txt b/trunk/Documentation/filesystems/sysfs.txt
index c8bce82ddcac..dc276598a65a 100644
--- a/trunk/Documentation/filesystems/sysfs.txt
+++ b/trunk/Documentation/filesystems/sysfs.txt
@@ -90,7 +90,7 @@ void device_remove_file(struct device *, struct device_attribute *);
It also defines this helper for defining device attributes:
-#define DEVICE_ATTR(_name, _mode, _show, _store) \
+#define DEVICE_ATTR(_name,_mode,_show,_store) \
struct device_attribute dev_attr_##_name = { \
.attr = {.name = __stringify(_name) , .mode = _mode }, \
.show = _show, \
@@ -99,14 +99,14 @@ struct device_attribute dev_attr_##_name = { \
For example, declaring
-static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo);
+static DEVICE_ATTR(foo,0644,show_foo,store_foo);
is equivalent to doing:
static struct device_attribute dev_attr_foo = {
.attr = {
.name = "foo",
- .mode = S_IWUSR | S_IRUGO,
+ .mode = 0644,
},
.show = show_foo,
.store = store_foo,
@@ -121,8 +121,8 @@ set of sysfs operations for forwarding read and write calls to the
show and store methods of the attribute owners.
struct sysfs_ops {
- ssize_t (*show)(struct kobject *, struct attribute *, char *);
- ssize_t (*store)(struct kobject *, struct attribute *, const char *);
+ ssize_t (*show)(struct kobject *, struct attribute *,char *);
+ ssize_t (*store)(struct kobject *,struct attribute *,const char *);
};
[ Subsystems should have already defined a struct kobj_type as a
@@ -137,7 +137,7 @@ calls the associated methods.
To illustrate:
-#define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
+#define to_dev_attr(_attr) container_of(_attr,struct device_attribute,attr)
#define to_dev(d) container_of(d, struct device, kobj)
static ssize_t
@@ -148,7 +148,7 @@ dev_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
ssize_t ret = 0;
if (dev_attr->show)
- ret = dev_attr->show(dev, buf);
+ ret = dev_attr->show(dev,buf);
return ret;
}
@@ -216,16 +216,16 @@ A very simple (and naive) implementation of a device attribute is:
static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf)
{
- return snprintf(buf, PAGE_SIZE, "%s\n", dev->name);
+ return sprintf(buf,"%s\n",dev->name);
}
static ssize_t store_name(struct device * dev, const char * buf)
{
- sscanf(buf, "%20s", dev->name);
- return strnlen(buf, PAGE_SIZE);
+ sscanf(buf,"%20s",dev->name);
+ return strlen(buf);
}
-static DEVICE_ATTR(name, S_IRUGO, show_name, store_name);
+static DEVICE_ATTR(name,S_IRUGO,show_name,store_name);
(Note that the real implementation doesn't allow userspace to set the
@@ -290,7 +290,7 @@ struct device_attribute {
Declaring:
-DEVICE_ATTR(_name, _str, _mode, _show, _store);
+DEVICE_ATTR(_name,_str,_mode,_show,_store);
Creation/Removal:
@@ -310,7 +310,7 @@ struct bus_attribute {
Declaring:
-BUS_ATTR(_name, _mode, _show, _store)
+BUS_ATTR(_name,_mode,_show,_store)
Creation/Removal:
@@ -331,7 +331,7 @@ struct driver_attribute {
Declaring:
-DRIVER_ATTR(_name, _mode, _show, _store)
+DRIVER_ATTR(_name,_mode,_show,_store)
Creation/Removal:
diff --git a/trunk/Documentation/hwmon/lm78 b/trunk/Documentation/hwmon/lm78
index fd5dc7a19f0e..357086ed7f64 100644
--- a/trunk/Documentation/hwmon/lm78
+++ b/trunk/Documentation/hwmon/lm78
@@ -2,11 +2,16 @@ Kernel driver lm78
==================
Supported chips:
- * National Semiconductor LM78 / LM78-J
+ * National Semiconductor LM78
Prefix: 'lm78'
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/
+ * National Semiconductor LM78-J
+ Prefix: 'lm78-j'
+ Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
+ Datasheet: Publicly available at the National Semiconductor website
+ http://www.national.com/
* National Semiconductor LM79
Prefix: 'lm79'
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
diff --git a/trunk/Documentation/hwmon/w83792d b/trunk/Documentation/hwmon/w83792d
deleted file mode 100644
index 8171c285bb55..000000000000
--- a/trunk/Documentation/hwmon/w83792d
+++ /dev/null
@@ -1,174 +0,0 @@
-Kernel driver w83792d
-=====================
-
-Supported chips:
- * Winbond W83792D
- Prefix: 'w83792d'
- Addresses scanned: I2C 0x2c - 0x2f
- Datasheet: http://www.winbond.com.tw/E-WINBONDHTM/partner/PDFresult.asp?Pname=1035
-
-Author: Chunhao Huang
-Contact: DZShen
-
-
-Module Parameters
------------------
-
-* init int
- (default 1)
- Use 'init=0' to bypass initializing the chip.
- Try this if your computer crashes when you load the module.
-
-* force_subclients=bus,caddr,saddr,saddr
- This is used to force the i2c addresses for subclients of
- a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b'
- to force the subclients of chip 0x2f on bus 0 to i2c addresses
- 0x4a and 0x4b.
-
-
-Description
------------
-
-This driver implements support for the Winbond W83792AD/D.
-
-Detection of the chip can sometimes be foiled because it can be in an
-internal state that allows no clean access (Bank with ID register is not
-currently selected). If you know the address of the chip, use a 'force'
-parameter; this will put it into a more well-behaved state first.
-
-The driver implements three temperature sensors, seven fan rotation speed
-sensors, nine voltage sensors, and two automatic fan regulation
-strategies called: Smart Fan I (Thermal Cruise mode) and Smart Fan II.
-Automatic fan control mode is possible only for fan1-fan3. Fan4-fan7 can run
-synchronized with selected fan (fan1-fan3). This functionality and manual PWM
-control for fan4-fan7 is not yet implemented.
-
-Temperatures are measured in degrees Celsius and measurement resolution is 1
-degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
-the temperature gets higher than the Overtemperature Shutdown value; it stays
-on until the temperature falls below the Hysteresis value.
-
-Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
-triggered if the rotation speed has dropped below a programmable limit. Fan
-readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or
-128) to give the readings more range or accuracy.
-
-Voltage sensors (also known as IN sensors) report their values in millivolts.
-An alarm is triggered if the voltage has crossed a programmable minimum
-or maximum limit.
-
-Alarms are provided as output from "realtime status register". Following bits
-are defined:
-
-bit - alarm on:
-0 - in0
-1 - in1
-2 - temp1
-3 - temp2
-4 - temp3
-5 - fan1
-6 - fan2
-7 - fan3
-8 - in2
-9 - in3
-10 - in4
-11 - in5
-12 - in6
-13 - VID change
-14 - chassis
-15 - fan7
-16 - tart1
-17 - tart2
-18 - tart3
-19 - in7
-20 - in8
-21 - fan4
-22 - fan5
-23 - fan6
-
-Tart will be asserted while target temperature cannot be achieved after 3 minutes
-of full speed rotation of corresponding fan.
-
-In addition to the alarms described above, there is a CHAS alarm on the chips
-which triggers if your computer case is open (This one is latched, contrary
-to realtime alarms).
-
-The chips only update values each 3 seconds; reading them more often will
-do no harm, but will return 'old' values.
-
-
-W83792D PROBLEMS
-----------------
-Known problems:
- - This driver is only for Winbond W83792D C version device, there
- are also some motherboards with B version W83792D device. The
- calculation method to in6-in7(measured value, limits) is a little
- different between C and B version. C or B version can be identified
- by CR[0x49h].
- - The function of vid and vrm has not been finished, because I'm NOT
- very familiar with them. Adding support is welcome.
- - The function of chassis open detection needs more tests.
- - If you have ASUS server board and chip was not found: Then you will
- need to upgrade to latest (or beta) BIOS. If it does not help please
- contact us.
-
-Fan control
------------
-
-Manual mode
------------
-
-Works as expected. You just need to specify desired PWM/DC value (fan speed)
-in appropriate pwm# file.
-
-Thermal cruise
---------------
-
-In this mode, W83792D provides the Smart Fan system to automatically control
-fan speed to keep the temperatures of CPU and the system within specific
-range. At first a wanted temperature and interval must be set. This is done
-via thermal_cruise# file. The tolerance# file serves to create T +- tolerance
-interval. The fan speed will be lowered as long as the current temperature
-remains below the thermal_cruise# +- tolerance# value. Once the temperature
-exceeds the high limit (T+tolerance), the fan will be turned on with a
-specific speed set by pwm# and automatically controlled its PWM duty cycle
-with the temperature varying. Three conditions may occur:
-
-(1) If the temperature still exceeds the high limit, PWM duty
-cycle will increase slowly.
-
-(2) If the temperature goes below the high limit, but still above the low
-limit (T-tolerance), the fan speed will be fixed at the current speed because
-the temperature is in the target range.
-
-(3) If the temperature goes below the low limit, PWM duty cycle will decrease
-slowly to 0 or a preset stop value until the temperature exceeds the low
-limit. (The preset stop value handling is not yet implemented in driver)
-
-Smart Fan II
-------------
-
-W83792D also provides a special mode for fan. Four temperature points are
-available. When related temperature sensors detects the temperature in preset
-temperature region (sf2_point@_fan# +- tolerance#) it will cause fans to run
-on programmed value from sf2_level@_fan#. You need to set four temperatures
-for each fan.
-
-
-/sys files
-----------
-
-pwm[1-3] - this file stores PWM duty cycle or DC value (fan speed) in range:
- 0 (stop) to 255 (full)
-pwm[1-3]_enable - this file controls mode of fan/temperature control:
- * 0 Disabled
- * 1 Manual mode
- * 2 Smart Fan II
- * 3 Thermal Cruise
-pwm[1-3]_mode - Select PWM of DC mode
- * 0 DC
- * 1 PWM
-thermal_cruise[1-3] - Selects the desired temperature for cruise (degC)
-tolerance[1-3] - Value in degrees of Celsius (degC) for +- T
-sf2_point[1-4]_fan[1-3] - four temperature points for each fan for Smart Fan II
-sf2_level[1-3]_fan[1-3] - three PWM/DC levels for each fan for Smart Fan II
diff --git a/trunk/Documentation/i2c/chips/max6875 b/trunk/Documentation/i2c/chips/max6875
index 96fec562a8e9..b02002898a09 100644
--- a/trunk/Documentation/i2c/chips/max6875
+++ b/trunk/Documentation/i2c/chips/max6875
@@ -4,13 +4,22 @@ Kernel driver max6875
Supported chips:
* Maxim MAX6874, MAX6875
Prefix: 'max6875'
- Addresses scanned: None (see below)
+ Addresses scanned: 0x50, 0x52
Datasheet:
http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf
Author: Ben Gardner
+Module Parameters
+-----------------
+
+* allow_write int
+ Set to non-zero to enable write permission:
+ *0: Read only
+ 1: Read and write
+
+
Description
-----------
@@ -24,85 +33,34 @@ registers.
The Maxim MAX6874 is a similar, mostly compatible device, with more intputs
and outputs:
+
vin gpi vout
MAX6874 6 4 8
MAX6875 4 3 5
-See the datasheet for more information.
+MAX6874 chips can have four different addresses (as opposed to only two for
+the MAX6875). The additional addresses (0x54 and 0x56) are not probed by
+this driver by default, but the probe module parameter can be used if
+needed.
+
+See the datasheet for details on how to program the EEPROM.
Sysfs entries
-------------
-eeprom - 512 bytes of user-defined EEPROM space.
-
-
-General Remarks
----------------
-
-Valid addresses for the MAX6875 are 0x50 and 0x52.
-Valid addresses for the MAX6874 are 0x50, 0x52, 0x54 and 0x56.
-The driver does not probe any address, so you must force the address.
-
-Example:
-$ modprobe max6875 force=0,0x50
-
-The MAX6874/MAX6875 ignores address bit 0, so this driver attaches to multiple
-addresses. For example, for address 0x50, it also reserves 0x51.
-The even-address instance is called 'max6875', the odd one is 'max6875 subclient'.
-
-
-Programming the chip using i2c-dev
-----------------------------------
+eeprom_user - 512 bytes of user-defined EEPROM space. Only writable if
+ allow_write was set and register 0x43 is 0.
-Use the i2c-dev interface to access and program the chips.
-Reads and writes are performed differently depending on the address range.
+eeprom_config - 70 bytes of config EEPROM. Note that changes will not get
+ loaded into register space until a power cycle or device reset.
-The configuration registers are at addresses 0x00 - 0x45.
-Use i2c_smbus_write_byte_data() to write a register and
-i2c_smbus_read_byte_data() to read a register.
-The command is the register number.
+reg_config - 70 bytes of register space. Any changes take affect immediately.
-Examples:
-To write a 1 to register 0x45:
- i2c_smbus_write_byte_data(fd, 0x45, 1);
-To read register 0x45:
- value = i2c_smbus_read_byte_data(fd, 0x45);
-
-
-The configuration EEPROM is at addresses 0x8000 - 0x8045.
-The user EEPROM is at addresses 0x8100 - 0x82ff.
-
-Use i2c_smbus_write_word_data() to write a byte to EEPROM.
-
-The command is the upper byte of the address: 0x80, 0x81, or 0x82.
-The data word is the lower part of the address or'd with data << 8.
- cmd = address >> 8;
- val = (address & 0xff) | (data << 8);
-
-Example:
-To write 0x5a to address 0x8003:
- i2c_smbus_write_word_data(fd, 0x80, 0x5a03);
-
-
-Reading data from the EEPROM is a little more complicated.
-Use i2c_smbus_write_byte_data() to set the read address and then
-i2c_smbus_read_byte() or i2c_smbus_read_i2c_block_data() to read the data.
-
-Example:
-To read data starting at offset 0x8100, first set the address:
- i2c_smbus_write_byte_data(fd, 0x81, 0x00);
-
-And then read the data
- value = i2c_smbus_read_byte(fd);
-
- or
-
- count = i2c_smbus_read_i2c_block_data(fd, 0x84, buffer);
-
-The block read should read 16 bytes.
-0x84 is the block read command.
+General Remarks
+---------------
-See the datasheet for more details.
+A typical application will require that the EEPROMs be programmed once and
+never altered afterwards.
diff --git a/trunk/Documentation/i2c/functionality b/trunk/Documentation/i2c/functionality
index 41ffefbdc60c..8a78a95ae04e 100644
--- a/trunk/Documentation/i2c/functionality
+++ b/trunk/Documentation/i2c/functionality
@@ -115,7 +115,7 @@ CHECKING THROUGH /DEV
If you try to access an adapter from a userspace program, you will have
to use the /dev interface. You will still have to check whether the
functionality you need is supported, of course. This is done using
-the I2C_FUNCS ioctl. An example, adapted from the lm_sensors i2cdetect
+the I2C_FUNCS ioctl. An example, adapted from the lm_sensors i2c_detect
program, is below:
int file;
diff --git a/trunk/Documentation/i2c/porting-clients b/trunk/Documentation/i2c/porting-clients
index 4849dfd6961c..a7adbdd9ea8a 100644
--- a/trunk/Documentation/i2c/porting-clients
+++ b/trunk/Documentation/i2c/porting-clients
@@ -1,4 +1,4 @@
-Revision 5, 2005-07-29
+Revision 4, 2004-03-30
Jean Delvare
Greg KH
@@ -17,22 +17,20 @@ yours for best results.
Technical changes:
-* [Includes] Get rid of "version.h" and .
- Includes typically look like that:
+* [Includes] Get rid of "version.h". Replace with
+ . Includes typically look like that:
#include
#include
#include
#include
- #include /* for hardware monitoring drivers */
- #include
- #include /* if you need VRM support */
+ #include
+ #include /* if you need VRM support */
#include /* if you have I/O operations */
Please respect this inclusion order. Some extra headers may be
required for a given driver (e.g. "lm75.h").
-* [Addresses] SENSORS_I2C_END becomes I2C_CLIENT_END, ISA addresses
- are no more handled by the i2c core.
- SENSORS_INSMOD_ becomes I2C_CLIENT_INSMOD_.
+* [Addresses] SENSORS_I2C_END becomes I2C_CLIENT_END, SENSORS_ISA_END
+ becomes I2C_CLIENT_ISA_END.
* [Client data] Get rid of sysctl_id. Try using standard names for
register values (for example, temp_os becomes temp_max). You're
@@ -68,15 +66,13 @@ Technical changes:
if (!(adapter->class & I2C_CLASS_HWMON))
return 0;
ISA-only drivers of course don't need this.
- Call i2c_probe() instead of i2c_detect().
* [Detect] As mentioned earlier, the flags parameter is gone.
The type_name and client_name strings are replaced by a single
name string, which will be filled with a lowercase, short string
(typically the driver name, e.g. "lm75").
In i2c-only drivers, drop the i2c_is_isa_adapter check, it's
- useless. Same for isa-only drivers, as the test would always be
- true. Only hybrid drivers (which are quite rare) still need it.
+ useless.
The errorN labels are reduced to the number needed. If that number
is 2 (i2c-only drivers), it is advised that the labels are named
exit and exit_free. For i2c+isa drivers, labels should be named
@@ -90,8 +86,6 @@ Technical changes:
device_create_file. Move the driver initialization before any
sysfs file creation.
Drop client->id.
- Drop any 24RF08 corruption prevention you find, as this is now done
- at the i2c-core level, and doing it twice voids it.
* [Init] Limits must not be set by the driver (can be done later in
user-space). Chip should not be reset default (although a module
@@ -99,8 +93,7 @@ Technical changes:
limited to the strictly necessary steps.
* [Detach] Get rid of data, remove the call to
- i2c_deregister_entry. Do not log an error message if
- i2c_detach_client fails, as i2c-core will now do it for you.
+ i2c_deregister_entry.
* [Update] Don't access client->data directly, use
i2c_get_clientdata(client) instead.
diff --git a/trunk/Documentation/i2c/writing-clients b/trunk/Documentation/i2c/writing-clients
index 077275722a7c..91664be91ffc 100644
--- a/trunk/Documentation/i2c/writing-clients
+++ b/trunk/Documentation/i2c/writing-clients
@@ -148,15 +148,15 @@ are defined in i2c.h to help you support them, as well as a generic
detection algorithm.
You do not have to use this parameter interface; but don't try to use
-function i2c_probe() if you don't.
+function i2c_probe() (or i2c_detect()) if you don't.
NOTE: If you want to write a `sensors' driver, the interface is slightly
different! See below.
-Probing classes
----------------
+Probing classes (i2c)
+---------------------
All parameters are given as lists of unsigned 16-bit integers. Lists are
terminated by I2C_CLIENT_END.
@@ -171,18 +171,12 @@ The following lists are used internally:
ignore: insmod parameter.
A list of pairs. The first value is a bus number (-1 for any I2C bus),
the second is the I2C address. These addresses are never probed.
- This parameter overrules the 'normal_i2c' list only.
+ This parameter overrules 'normal' and 'probe', but not the 'force' lists.
force: insmod parameter.
A list of pairs. The first value is a bus number (-1 for any I2C bus),
the second is the I2C address. A device is blindly assumed to be on
the given address, no probing is done.
-Additionally, kind-specific force lists may optionally be defined if
-the driver supports several chip kinds. They are grouped in a
-NULL-terminated list of pointers named forces, those first element if the
-generic force list mentioned above. Each additional list correspond to an
-insmod parameter of the form force_.
-
Fortunately, as a module writer, you just have to define the `normal_i2c'
parameter. The complete declaration could look like this:
@@ -192,17 +186,66 @@ parameter. The complete declaration could look like this:
/* Magic definition of all other variables and things */
I2C_CLIENT_INSMOD;
- /* Or, if your driver supports, say, 2 kind of devices: */
- I2C_CLIENT_INSMOD_2(foo, bar);
-
-If you use the multi-kind form, an enum will be defined for you:
- enum chips { any_chip, foo, bar, ... }
-You can then (and certainly should) use it in the driver code.
Note that you *have* to call the defined variable `normal_i2c',
without any prefix!
+Probing classes (sensors)
+-------------------------
+
+If you write a `sensors' driver, you use a slightly different interface.
+As well as I2C addresses, we have to cope with ISA addresses. Also, we
+use a enum of chip types. Don't forget to include `sensors.h'.
+
+The following lists are used internally. They are all lists of integers.
+
+ normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END.
+ A list of I2C addresses which should normally be examined.
+ normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END.
+ A list of ISA addresses which should normally be examined.
+ probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the address. These
+ addresses are also probed, as if they were in the 'normal' list.
+ ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the I2C address. These
+ addresses are never probed. This parameter overrules 'normal' and
+ 'probe', but not the 'force' lists.
+
+Also used is a list of pointers to sensors_force_data structures:
+ force_data: insmod parameters. A list, ending with an element of which
+ the force field is NULL.
+ Each element contains the type of chip and a list of pairs.
+ The first value is a bus number (SENSORS_ISA_BUS for the ISA bus,
+ -1 for any I2C bus), the second is the address.
+ These are automatically translated to insmod variables of the form
+ force_foo.
+
+So we have a generic insmod variabled `force', and chip-specific variables
+`force_CHIPNAME'.
+
+Fortunately, as a module writer, you just have to define the `normal_i2c'
+and `normal_isa' parameters, and define what chip names are used.
+The complete declaration could look like this:
+ /* Scan i2c addresses 0x37, and 0x48 to 0x4f */
+ static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
+ 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
+ /* Scan ISA address 0x290 */
+ static unsigned int normal_isa[] = {0x0290,SENSORS_ISA_END};
+
+ /* Define chips foo and bar, as well as all module parameters and things */
+ SENSORS_INSMOD_2(foo,bar);
+
+If you have one chip, you use macro SENSORS_INSMOD_1(chip), if you have 2
+you use macro SENSORS_INSMOD_2(chip1,chip2), etc. If you do not want to
+bother with chip types, you can use SENSORS_INSMOD_0.
+
+A enum is automatically defined as follows:
+ enum chips { any_chip, chip1, chip2, ... }
+
+
Attaching to an adapter
-----------------------
@@ -221,10 +264,17 @@ detected at a specific address, another callback is called.
return i2c_probe(adapter,&addr_data,&foo_detect_client);
}
+For `sensors' drivers, use the i2c_detect function instead:
+
+ int foo_attach_adapter(struct i2c_adapter *adapter)
+ {
+ return i2c_detect(adapter,&addr_data,&foo_detect_client);
+ }
+
Remember, structure `addr_data' is defined by the macros explained above,
so you do not have to define it yourself.
-The i2c_probe function will call the foo_detect_client
+The i2c_probe or i2c_detect function will call the foo_detect_client
function only for those i2c addresses that actually have a device on
them (unless a `force' parameter was used). In addition, addresses that
are already in use (by some other registered client) are skipped.
@@ -233,18 +283,19 @@ are already in use (by some other registered client) are skipped.
The detect client function
--------------------------
-The detect client function is called by i2c_probe. The `kind' parameter
-contains -1 for a probed detection, 0 for a forced detection, or a positive
-number for a forced detection with a chip type forced.
+The detect client function is called by i2c_probe or i2c_detect.
+The `kind' parameter contains 0 if this call is due to a `force'
+parameter, and -1 otherwise (for i2c_detect, it contains 0 if
+this call is due to the generic `force' parameter, and the chip type
+number if it is due to a specific `force' parameter).
Below, some things are only needed if this is a `sensors' driver. Those
parts are between /* SENSORS ONLY START */ and /* SENSORS ONLY END */
markers.
-Returning an error different from -ENODEV in a detect function will cause
-the detection to stop: other addresses and adapters won't be scanned.
-This should only be done on fatal or internal errors, such as a memory
-shortage or i2c_attach_client failing.
+This function should only return an error (any value != 0) if there is
+some reason why no more detection should be done anymore. If the
+detection just fails for this address, return 0.
For now, you can ignore the `flags' parameter. It is there for future use.
@@ -269,11 +320,12 @@ For now, you can ignore the `flags' parameter. It is there for future use.
const char *type_name = "";
int is_isa = i2c_is_isa_adapter(adapter);
- /* Do this only if the chip can additionally be found on the ISA bus
- (hybrid chip). */
-
if (is_isa) {
+ /* If this client can't be on the ISA bus at all, we can stop now
+ (call `goto ERROR0'). But for kicks, we will assume it is all
+ right. */
+
/* Discard immediately if this ISA range is already used */
if (check_region(address,FOO_EXTENT))
goto ERROR0;
@@ -443,13 +495,15 @@ much simpler than the attachment code, fortunately!
/* SENSORS ONLY END */
/* Try to detach the client from i2c space */
- if ((err = i2c_detach_client(client)))
+ if ((err = i2c_detach_client(client))) {
+ printk("foo.o: Client deregistration failed, client not detached.\n");
return err;
+ }
- /* HYBRID SENSORS CHIP ONLY START */
+ /* SENSORS ONLY START */
if i2c_is_isa_client(client)
release_region(client->addr,LM78_EXTENT);
- /* HYBRID SENSORS CHIP ONLY END */
+ /* SENSORS ONLY END */
kfree(client); /* Frees client data too, if allocated at the same time */
return 0;
diff --git a/trunk/Documentation/i386/boot.txt b/trunk/Documentation/i386/boot.txt
index 10312bebe55d..1c48f0eba6fb 100644
--- a/trunk/Documentation/i386/boot.txt
+++ b/trunk/Documentation/i386/boot.txt
@@ -2,7 +2,7 @@
----------------------------
H. Peter Anvin
- Last update 2005-09-02
+ Last update 2002-01-01
On the i386 platform, the Linux kernel uses a rather complicated boot
convention. This has evolved partially due to historical aspects, as
@@ -34,8 +34,6 @@ Protocol 2.02: (Kernel 2.4.0-test3-pre3) New command line protocol.
Protocol 2.03: (Kernel 2.4.18-pre1) Explicitly makes the highest possible
initrd address available to the bootloader.
-Protocol 2.04: (Kernel 2.6.14) Extend the syssize field to four bytes.
-
**** MEMORY LAYOUT
@@ -105,9 +103,10 @@ The header looks like:
Offset Proto Name Meaning
/Size
-01F1/1 ALL(1 setup_sects The size of the setup in sectors
+01F1/1 ALL setup_sects The size of the setup in sectors
01F2/2 ALL root_flags If set, the root is mounted readonly
-01F4/4 2.04+(2 syssize The size of the 32-bit code in 16-byte paras
+01F4/2 ALL syssize DO NOT USE - for bootsect.S use only
+01F6/2 ALL swap_dev DO NOT USE - obsolete
01F8/2 ALL ram_size DO NOT USE - for bootsect.S use only
01FA/2 ALL vid_mode Video mode control
01FC/2 ALL root_dev Default root device number
@@ -130,12 +129,8 @@ Offset Proto Name Meaning
0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
022C/4 2.03+ initrd_addr_max Highest legal initrd address
-(1) For backwards compatibility, if the setup_sects field contains 0, the
- real value is 4.
-
-(2) For boot protocol prior to 2.04, the upper two bytes of the syssize
- field are unusable, which means the size of a bzImage kernel
- cannot be determined.
+For backwards compatibility, if the setup_sects field contains 0, the
+real value is 4.
If the "HdrS" (0x53726448) magic number is not found at offset 0x202,
the boot protocol version is "old". Loading an old kernel, the
@@ -235,16 +230,12 @@ loader to communicate with the kernel. Some of its options are also
relevant to the boot loader itself, see "special command line options"
below.
-The kernel command line is a null-terminated string currently up to
-255 characters long, plus the final null. A string that is too long
-will be automatically truncated by the kernel, a boot loader may allow
-a longer command line to be passed to permit future kernels to extend
-this limit.
+The kernel command line is a null-terminated string up to 255
+characters long, plus the final null.
If the boot protocol version is 2.02 or later, the address of the
kernel command line is given by the header field cmd_line_ptr (see
-above.) This address can be anywhere between the end of the setup
-heap and 0xA0000.
+above.)
If the protocol version is *not* 2.02 or higher, the kernel
command line is entered using the following protocol:
@@ -264,7 +255,7 @@ command line is entered using the following protocol:
**** SAMPLE BOOT CONFIGURATION
As a sample configuration, assume the following layout of the real
-mode segment (this is a typical, and recommended layout):
+mode segment:
0x0000-0x7FFF Real mode kernel
0x8000-0x8FFF Stack and heap
@@ -321,9 +312,9 @@ Such a boot loader should enter the following fields in the header:
**** LOADING THE REST OF THE KERNEL
-The 32-bit (non-real-mode) kernel starts at offset (setup_sects+1)*512
-in the kernel file (again, if setup_sects == 0 the real value is 4.)
-It should be loaded at address 0x10000 for Image/zImage kernels and
+The non-real-mode kernel starts at offset (setup_sects+1)*512 in the
+kernel file (again, if setup_sects == 0 the real value is 4.) It
+should be loaded at address 0x10000 for Image/zImage kernels and
0x100000 for bzImage kernels.
The kernel is a bzImage kernel if the protocol >= 2.00 and the 0x01
diff --git a/trunk/Documentation/ibm-acpi.txt b/trunk/Documentation/ibm-acpi.txt
index 8b3fd82b2ce7..c437b1aeff55 100644
--- a/trunk/Documentation/ibm-acpi.txt
+++ b/trunk/Documentation/ibm-acpi.txt
@@ -1,16 +1,16 @@
IBM ThinkPad ACPI Extras Driver
- Version 0.12
- 17 August 2005
+ Version 0.8
+ 8 November 2004
Borislav Deianov
http://ibm-acpi.sf.net/
-This is a Linux ACPI driver for the IBM ThinkPad laptops. It supports
-various features of these laptops which are accessible through the
-ACPI framework but not otherwise supported by the generic Linux ACPI
-drivers.
+This is a Linux ACPI driver for the IBM ThinkPad laptops. It aims to
+support various features of these laptops which are accessible through
+the ACPI framework but not otherwise supported by the generic Linux
+ACPI drivers.
Status
@@ -25,14 +25,9 @@ detailed description):
- ThinkLight on and off
- limited docking and undocking
- UltraBay eject
- - CMOS control
- - LED control
- - ACPI sounds
- - temperature sensors
- - Experimental: embedded controller register dump
- - Experimental: LCD brightness control
- - Experimental: volume control
- - Experimental: fan speed, fan enable/disable
+ - Experimental: CMOS control
+ - Experimental: LED control
+ - Experimental: ACPI sounds
A compatibility table by model and feature is maintained on the web
site, http://ibm-acpi.sf.net/. I appreciate any success or failure
@@ -96,12 +91,12 @@ driver is still in the alpha stage, the exact proc file format and
commands supported by the various features is guaranteed to change
frequently.
-Driver version -- /proc/acpi/ibm/driver
----------------------------------------
+Driver Version -- /proc/acpi/ibm/driver
+--------------------------------------
The driver name and version. No commands can be written to this file.
-Hot keys -- /proc/acpi/ibm/hotkey
+Hot Keys -- /proc/acpi/ibm/hotkey
---------------------------------
Without this driver, only the Fn-F4 key (sleep button) generates an
@@ -193,7 +188,7 @@ and, on the X40, video corruption. By disabling automatic switching,
the flickering or video corruption can be avoided.
The video_switch command cycles through the available video outputs
-(it simulates the behavior of Fn-F7).
+(it sumulates the behavior of Fn-F7).
Video expansion can be toggled through this feature. This controls
whether the display is expanded to fill the entire LCD screen when a
@@ -206,12 +201,6 @@ Fn-F7 from working. This also disables the video output switching
features of this driver, as it uses the same ACPI methods as
Fn-F7. Video switching on the console should still work.
-UPDATE: There's now a patch for the X.org Radeon driver which
-addresses this issue. Some people are reporting success with the patch
-while others are still having problems. For more information:
-
-https://bugs.freedesktop.org/show_bug.cgi?id=2000
-
ThinkLight control -- /proc/acpi/ibm/light
------------------------------------------
@@ -222,7 +211,7 @@ models which do not make the status available will show it as
echo on > /proc/acpi/ibm/light
echo off > /proc/acpi/ibm/light
-Docking / undocking -- /proc/acpi/ibm/dock
+Docking / Undocking -- /proc/acpi/ibm/dock
------------------------------------------
Docking and undocking (e.g. with the X4 UltraBase) requires some
@@ -239,15 +228,11 @@ NOTE: These events will only be generated if the laptop was docked
when originally booted. This is due to the current lack of support for
hot plugging of devices in the Linux ACPI framework. If the laptop was
booted while not in the dock, the following message is shown in the
-logs:
-
- Mar 17 01:42:34 aero kernel: ibm_acpi: dock device not present
-
-In this case, no dock-related events are generated but the dock and
-undock commands described below still work. They can be executed
-manually or triggered by Fn key combinations (see the example acpid
-configuration files included in the driver tarball package available
-on the web site).
+logs: "ibm_acpi: dock device not present". No dock-related events are
+generated but the dock and undock commands described below still
+work. They can be executed manually or triggered by Fn key
+combinations (see the example acpid configuration files included in
+the driver tarball package available on the web site).
When the eject request button on the dock is pressed, the first event
above is generated. The handler for this event should issue the
@@ -282,7 +267,7 @@ the only docking stations currently supported are the X-series
UltraBase docks and "dumb" port replicators like the Mini Dock (the
latter don't need any ACPI support, actually).
-UltraBay eject -- /proc/acpi/ibm/bay
+UltraBay Eject -- /proc/acpi/ibm/bay
------------------------------------
Inserting or ejecting an UltraBay device requires some actions to be
@@ -299,11 +284,8 @@ when the laptop was originally booted (on the X series, the UltraBay
is in the dock, so it may not be present if the laptop was undocked).
This is due to the current lack of support for hot plugging of devices
in the Linux ACPI framework. If the laptop was booted without the
-UltraBay, the following message is shown in the logs:
-
- Mar 17 01:42:34 aero kernel: ibm_acpi: bay device not present
-
-In this case, no bay-related events are generated but the eject
+UltraBay, the following message is shown in the logs: "ibm_acpi: bay
+device not present". No bay-related events are generated but the eject
command described below still works. It can be executed manually or
triggered by a hot key combination.
@@ -324,33 +306,22 @@ necessary to enable the UltraBay device (e.g. call idectl).
The contents of the /proc/acpi/ibm/bay file shows the current status
of the UltraBay, as provided by the ACPI framework.
-EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
-this feature, you need to supply the experimental=1 parameter when
-loading the module):
-
-These models do not have a button near the UltraBay device to request
-a hot eject but rather require the laptop to be put to sleep
-(suspend-to-ram) before the bay device is ejected or inserted).
-The sequence of steps to eject the device is as follows:
-
- echo eject > /proc/acpi/ibm/bay
- put the ThinkPad to sleep
- remove the drive
- resume from sleep
- cat /proc/acpi/ibm/bay should show that the drive was removed
-
-On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
-supported. Use "eject2" instead of "eject" for the second bay.
+Experimental Features
+---------------------
-Note: the UltraBay eject support on the 600e/x, A22p and A3x is
-EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
+The following features are marked experimental because using them
+involves guessing the correct values of some parameters. Guessing
+incorrectly may have undesirable effects like crashing your
+ThinkPad. USE THESE WITH CAUTION! To activate them, you'll need to
+supply the experimental=1 parameter when loading the module.
-CMOS control -- /proc/acpi/ibm/cmos
------------------------------------
+Experimental: CMOS control - /proc/acpi/ibm/cmos
+------------------------------------------------
This feature is used internally by the ACPI firmware to control the
-ThinkLight on most newer ThinkPad models. It may also control LCD
-brightness, sounds volume and more, but only on some models.
+ThinkLight on most newer ThinkPad models. It appears that it can also
+control LCD brightness, sounds volume and more, but only on some
+models.
The commands are non-negative integer numbers:
@@ -359,9 +330,10 @@ The commands are non-negative integer numbers:
echo 2 >/proc/acpi/ibm/cmos
...
-The range of valid numbers is 0 to 21, but not all have an effect and
-the behavior varies from model to model. Here is the behavior on the
-X40 (tpb is the ThinkPad Buttons utility):
+The range of numbers which are used internally by various models is 0
+to 21, but it's possible that numbers outside this range have
+interesting behavior. Here is the behavior on the X40 (tpb is the
+ThinkPad Buttons utility):
0 - no effect but tpb reports "Volume down"
1 - no effect but tpb reports "Volume up"
@@ -374,18 +346,26 @@ X40 (tpb is the ThinkPad Buttons utility):
13 - ThinkLight off
14 - no effect but tpb reports ThinkLight status change
-LED control -- /proc/acpi/ibm/led
----------------------------------
+If you try this feature, please send me a report similar to the
+above. On models which allow control of LCD brightness or sound
+volume, I'd like to provide this functionality in an user-friendly
+way, but first I need a way to identify the models which this is
+possible.
+
+Experimental: LED control - /proc/acpi/ibm/LED
+----------------------------------------------
Some of the LED indicators can be controlled through this feature. The
available commands are:
- echo ' on' >/proc/acpi/ibm/led
- echo ' off' >/proc/acpi/ibm/led
- echo ' blink' >/proc/acpi/ibm/led
+ echo on >/proc/acpi/ibm/led
+ echo off >/proc/acpi/ibm/led
+ echo blink >/proc/acpi/ibm/led
-The range is 0 to 7. The set of LEDs that can be
-controlled varies from model to model. Here is the mapping on the X40:
+The parameter is a non-negative integer. The range of LED
+numbers used internally by various models is 0 to 7 but it's possible
+that numbers outside this range are also valid. Here is the mapping on
+the X40:
0 - power
1 - battery (orange)
@@ -396,224 +376,49 @@ controlled varies from model to model. Here is the mapping on the X40:
All of the above can be turned on and off and can be made to blink.
-ACPI sounds -- /proc/acpi/ibm/beep
-----------------------------------
+If you try this feature, please send me a report similar to the
+above. I'd like to provide this functionality in an user-friendly way,
+but first I need to identify the which numbers correspond to which
+LEDs on various models.
+
+Experimental: ACPI sounds - /proc/acpi/ibm/beep
+-----------------------------------------------
The BEEP method is used internally by the ACPI firmware to provide
-audible alerts in various situations. This feature allows the same
+audible alerts in various situtation. This feature allows the same
sounds to be triggered manually.
The commands are non-negative integer numbers:
- echo >/proc/acpi/ibm/beep
+ echo 0 >/proc/acpi/ibm/beep
+ echo 1 >/proc/acpi/ibm/beep
+ echo 2 >/proc/acpi/ibm/beep
+ ...
-The valid range is 0 to 17. Not all numbers trigger sounds
-and the sounds vary from model to model. Here is the behavior on the
-X40:
+The range of numbers which are used internally by various models is 0
+to 17, but it's possible that numbers outside this range are also
+valid. Here is the behavior on the X40:
- 0 - stop a sound in progress (but use 17 to stop 16)
- 2 - two beeps, pause, third beep ("low battery")
+ 2 - two beeps, pause, third beep
3 - single beep
- 4 - high, followed by low-pitched beep ("unable")
+ 4 - "unable"
5 - single beep
- 6 - very high, followed by high-pitched beep ("AC/DC")
+ 6 - "AC/DC"
7 - high-pitched beep
9 - three short beeps
10 - very long beep
12 - low-pitched beep
- 15 - three high-pitched beeps repeating constantly, stop with 0
- 16 - one medium-pitched beep repeating constantly, stop with 17
- 17 - stop 16
-
-Temperature sensors -- /proc/acpi/ibm/thermal
----------------------------------------------
-
-Most ThinkPads include six or more separate temperature sensors but
-only expose the CPU temperature through the standard ACPI methods.
-This feature shows readings from up to eight different sensors. Some
-readings may not be valid, e.g. may show large negative values. For
-example, on the X40, a typical output may be:
-
-temperatures: 42 42 45 41 36 -128 33 -128
-
-Thomas Gruber took his R51 apart and traced all six active sensors in
-his laptop (the location of sensors may vary on other models):
-
-1: CPU
-2: Mini PCI Module
-3: HDD
-4: GPU
-5: Battery
-6: N/A
-7: Battery
-8: N/A
-
-No commands can be written to this file.
-
-EXPERIMENTAL: Embedded controller reigster dump -- /proc/acpi/ibm/ecdump
-------------------------------------------------------------------------
-
-This feature is marked EXPERIMENTAL because the implementation
-directly accesses hardware registers and may not work as expected. USE
-WITH CAUTION! To use this feature, you need to supply the
-experimental=1 parameter when loading the module.
-
-This feature dumps the values of 256 embedded controller
-registers. Values which have changed since the last time the registers
-were dumped are marked with a star:
-
-[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
-EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
-EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
-EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
-EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
-EC 0x30: 01 07 1a 00 30 04 00 00 *85 00 00 10 00 50 00 00
-EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
-EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 *bc *02 *bc
-EC 0x60: *02 *bc *02 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0x70: 00 00 00 00 00 12 30 40 *24 *26 *2c *27 *20 80 *1f 80
-EC 0x80: 00 00 00 06 *37 *0e 03 00 00 00 0e 07 00 00 00 00
-EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xa0: *ff 09 ff 09 ff ff *64 00 *00 *00 *a2 41 *ff *ff *e0 00
-EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
-EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
-
-This feature can be used to determine the register holding the fan
-speed on some models. To do that, do the following:
-
- - make sure the battery is fully charged
- - make sure the fan is running
- - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so
-
-The first step makes sure various charging-related values don't
-vary. The second ensures that the fan-related values do vary, since
-the fan speed fluctuates a bit. The third will (hopefully) mark the
-fan register with a star:
-
-[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
-EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
-EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
-EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
-EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
-EC 0x30: 01 07 1a 00 30 04 00 00 85 00 00 10 00 50 00 00
-EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
-EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 bc 02 bc
-EC 0x60: 02 bc 02 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0x70: 00 00 00 00 00 12 30 40 24 27 2c 27 21 80 1f 80
-EC 0x80: 00 00 00 06 *be 0d 03 00 00 00 0e 07 00 00 00 00
-EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xa0: ff 09 ff 09 ff ff 64 00 00 00 a2 41 ff ff e0 00
-EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
-EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
-
-Another set of values that varies often is the temperature
-readings. Since temperatures don't change vary fast, you can take
-several quick dumps to eliminate them.
-
-You can use a similar method to figure out the meaning of other
-embedded controller registers - e.g. make sure nothing else changes
-except the charging or discharging battery to determine which
-registers contain the current battery capacity, etc. If you experiment
-with this, do send me your results (including some complete dumps with
-a description of the conditions when they were taken.)
-
-EXPERIMENTAL: LCD brightness control -- /proc/acpi/ibm/brightness
------------------------------------------------------------------
-
-This feature is marked EXPERIMENTAL because the implementation
-directly accesses hardware registers and may not work as expected. USE
-WITH CAUTION! To use this feature, you need to supply the
-experimental=1 parameter when loading the module.
-
-This feature allows software control of the LCD brightness on ThinkPad
-models which don't have a hardware brightness slider. The available
-commands are:
-
- echo up >/proc/acpi/ibm/brightness
- echo down >/proc/acpi/ibm/brightness
- echo 'level ' >/proc/acpi/ibm/brightness
-
-The number range is 0 to 7, although not all of them may be
-distinct. The current brightness level is shown in the file.
-
-EXPERIMENTAL: Volume control -- /proc/acpi/ibm/volume
------------------------------------------------------
-
-This feature is marked EXPERIMENTAL because the implementation
-directly accesses hardware registers and may not work as expected. USE
-WITH CAUTION! To use this feature, you need to supply the
-experimental=1 parameter when loading the module.
-
-This feature allows volume control on ThinkPad models which don't have
-a hardware volume knob. The available commands are:
-
- echo up >/proc/acpi/ibm/volume
- echo down >/proc/acpi/ibm/volume
- echo mute >/proc/acpi/ibm/volume
- echo 'level ' >/proc/acpi/ibm/volume
-
-The number range is 0 to 15 although not all of them may be
-distinct. The unmute the volume after the mute command, use either the
-up or down command (the level command will not unmute the volume).
-The current volume level and mute state is shown in the file.
-
-EXPERIMENTAL: fan speed, fan enable/disable -- /proc/acpi/ibm/fan
------------------------------------------------------------------
-
-This feature is marked EXPERIMENTAL because the implementation
-directly accesses hardware registers and may not work as expected. USE
-WITH CAUTION! To use this feature, you need to supply the
-experimental=1 parameter when loading the module.
-
-This feature attempts to show the current fan speed. The speed is read
-directly from the hardware registers of the embedded controller. This
-is known to work on later R, T and X series ThinkPads but may show a
-bogus value on other models.
-
-The fan may be enabled or disabled with the following commands:
-
- echo enable >/proc/acpi/ibm/fan
- echo disable >/proc/acpi/ibm/fan
-
-WARNING WARNING WARNING: do not leave the fan disabled unless you are
-monitoring the temperature sensor readings and you are ready to enable
-it if necessary to avoid overheating.
-
-The fan only runs if it's enabled *and* the various temperature
-sensors which control it read high enough. On the X40, this seems to
-depend on the CPU and HDD temperatures. Specifically, the fan is
-turned on when either the CPU temperature climbs to 56 degrees or the
-HDD temperature climbs to 46 degrees. The fan is turned off when the
-CPU temperature drops to 49 degrees and the HDD temperature drops to
-41 degrees. These thresholds cannot currently be controlled.
-
-On the X31 and X40 (and ONLY on those models), the fan speed can be
-controlled to a certain degree. Once the fan is running, it can be
-forced to run faster or slower with the following command:
-
- echo 'speed ' > /proc/acpi/ibm/thermal
-
-The sustainable range of fan speeds on the X40 appears to be from
-about 3700 to about 7350. Values outside this range either do not have
-any effect or the fan speed eventually settles somewhere in that
-range. The fan cannot be stopped or started with this command.
-
-On the 570, temperature readings are not available through this
-feature and the fan control works a little differently. The fan speed
-is reported in levels from 0 (off) to 7 (max) and can be controlled
-with the following command:
- echo 'level ' > /proc/acpi/ibm/thermal
+(I've only been able to identify a couple of them).
+If you try this feature, please send me a report similar to the
+above. I'd like to provide this functionality in an user-friendly way,
+but first I need to identify the which numbers correspond to which
+sounds on various models.
-Multiple Commands, Module Parameters
-------------------------------------
+
+Multiple Command, Module Parameters
+-----------------------------------
Multiple commands can be written to the proc files in one shot by
separating them with commas, for example:
@@ -646,19 +451,24 @@ scripts (included with ibm-acpi for completeness):
/usr/local/sbin/laptop_mode -- from the Linux kernel source
distribution, see Documentation/laptop-mode.txt
/sbin/service -- comes with Redhat/Fedora distributions
- /usr/sbin/hibernate -- from the Software Suspend 2 distribution,
- see http://softwaresuspend.berlios.de/
-Toan T Nguyen notes that Suse uses the
-powersave program to suspend ('powersave --suspend-to-ram') or
-hibernate ('powersave --suspend-to-disk'). This means that the
-hibernate script is not needed on that distribution.
+Toan T Nguyen has written a SuSE powersave
+script for the X20, included in config/usr/sbin/ibm_hotkeys_X20
Henrik Brix Andersen has written a Gentoo ACPI event
handler script for the X31. You can get the latest version from
http://dev.gentoo.org/~brix/files/x31.sh
David Schweikert has written an alternative blank.sh
-script which works on Debian systems. This scripts has now been
-extended to also work on Fedora systems and included as the default
-blank.sh in the distribution.
+script which works on Debian systems, included in
+configs/etc/acpi/actions/blank-debian.sh
+
+
+TODO
+----
+
+I'd like to implement the following features but haven't yet found the
+time and/or I don't yet know how to implement them:
+
+- UltraBay floppy drive support
+
diff --git a/trunk/Documentation/input/yealink.txt b/trunk/Documentation/input/yealink.txt
deleted file mode 100644
index 85f095a7ad04..000000000000
--- a/trunk/Documentation/input/yealink.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-Driver documentation for yealink usb-p1k phones
-
-0. Status
-~~~~~~~~~
-
-The p1k is a relatively cheap usb 1.1 phone with:
- - keyboard full support, yealink.ko / input event API
- - LCD full support, yealink.ko / sysfs API
- - LED full support, yealink.ko / sysfs API
- - dialtone full support, yealink.ko / sysfs API
- - ringtone full support, yealink.ko / sysfs API
- - audio playback full support, snd_usb_audio.ko / alsa API
- - audio record full support, snd_usb_audio.ko / alsa API
-
-For vendor documentation see http://www.yealink.com
-
-
-1. Compilation (stand alone version)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Currently only kernel 2.6.x.y versions are supported.
-In order to build the yealink.ko module do:
-
- make
-
-If you encounter problems please check if in the MAKE_OPTS variable in
-the Makefile is pointing to the location where your kernel sources
-are located, default /usr/src/linux.
-
-
-
-2. keyboard features
-~~~~~~~~~~~~~~~~~~~~
-The current mapping in the kernel is provided by the map_p1k_to_key
-function:
-
- Physical USB-P1K button layout input events
-
-
- up up
- IN OUT left, right
- down down
-
- pickup C hangup enter, backspace, escape
- 1 2 3 1, 2, 3
- 4 5 6 4, 5, 6,
- 7 8 9 7, 8, 9,
- * 0 # *, 0, #,
-
- The "up" and "down" keys, are symbolised by arrows on the button.
- The "pickup" and "hangup" keys are symbolised by a green and red phone
- on the button.
-
-
-3. LCD features
-~~~~~~~~~~~~~~~
-The LCD is divided and organised as a 3 line display:
-
- |[] [][] [][] [][] in |[][]
- |[] M [][] D [][] : [][] out |[][]
- store
-
- NEW REP SU MO TU WE TH FR SA
-
- [] [] [] [] [] [] [] [] [] [] [] []
- [] [] [] [] [] [] [] [] [] [] [] []
-
-
-Line 1 Format (see below) : 18.e8.M8.88...188
- Icon names : M D : IN OUT STORE
-Line 2 Format : .........
- Icon name : NEW REP SU MO TU WE TH FR SA
-Line 3 Format : 888888888888
-
-
-Format description:
- From a user space perspective the world is seperated in "digits" and "icons".
- A digit can have a character set, an icon can only be ON or OFF.
-
- Format specifier
- '8' : Generic 7 segment digit with individual addressable segments
-
- Reduced capabillity 7 segm digit, when segments are hard wired together.
- '1' : 2 segments digit only able to produce a 1.
- 'e' : Most significant day of the month digit,
- able to produce at least 1 2 3.
- 'M' : Most significant minute digit,
- able to produce at least 0 1 2 3 4 5.
-
- Icons or pictograms:
- '.' : For example like AM, PM, SU, a 'dot' .. or other single segment
- elements.
-
-
-4. Driver usage
-~~~~~~~~~~~~~~~
-For userland the following interfaces are available using the sysfs interface:
- /sys/.../
- line1 Read/Write, lcd line1
- line2 Read/Write, lcd line2
- line3 Read/Write, lcd line3
-
- get_icons Read, returns a set of available icons.
- hide_icon Write, hide the element by writing the icon name.
- show_icon Write, display the element by writing the icon name.
-
- map_seg7 Read/Write, the 7 segments char set, common for all
- yealink phones. (see map_to_7segment.h)
-
- ringtone Write, upload binary representation of a ringtone,
- see yealink.c. status EXPERIMENTAL due to potential
- races between async. and sync usb calls.
-
-
-4.1 lineX
-~~~~~~~~~
-Reading /sys/../lineX will return the format string with its current value:
-
- Example:
- cat ./line3
- 888888888888
- Linux Rocks!
-
-Writing to /sys/../lineX will set the coresponding LCD line.
- - Excess characters are ignored.
- - If less characters are written than allowed, the remaining digits are
- unchanged.
- - The tab '\t'and '\n' char does not overwrite the original content.
- - Writing a space to an icon will always hide its content.
-
- Example:
- date +"%m.%e.%k:%M" | sed 's/^0/ /' > ./line1
-
- Will update the LCD with the current date & time.
-
-
-4.2 get_icons
-~~~~~~~~~~~~~
-Reading will return all available icon names and its current settings:
-
- cat ./get_icons
- on M
- on D
- on :
- IN
- OUT
- STORE
- NEW
- REP
- SU
- MO
- TU
- WE
- TH
- FR
- SA
- LED
- DIALTONE
- RINGTONE
-
-
-4.3 show/hide icons
-~~~~~~~~~~~~~~~~~~~
-Writing to these files will update the state of the icon.
-Only one icon at a time can be updated.
-
-If an icon is also on a ./lineX the corresponding value is
-updated with the first letter of the icon.
-
- Example - light up the store icon:
- echo -n "STORE" > ./show_icon
-
- cat ./line1
- 18.e8.M8.88...188
- S
-
- Example - sound the ringtone for 10 seconds:
- echo -n RINGTONE > /sys/..../show_icon
- sleep 10
- echo -n RINGTONE > /sys/..../hide_icon
-
-
-5. Sound features
-~~~~~~~~~~~~~~~~~
-Sound is supported by the ALSA driver: snd_usb_audio
-
-One 16-bit channel with sample and playback rates of 8000 Hz is the practical
-limit of the device.
-
- Example - recording test:
- arecord -v -d 10 -r 8000 -f S16_LE -t wav foobar.wav
-
- Example - playback test:
- aplay foobar.wav
-
-
-6. Credits & Acknowledgments
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- - Olivier Vandorpe, for starting the usbb2k-api project doing much of
- the reverse engineering.
- - Martin Diehl, for pointing out how to handle USB memory allocation.
- - Dmitry Torokhov, for the numerous code reviews and suggestions.
-
diff --git a/trunk/Documentation/kbuild/makefiles.txt b/trunk/Documentation/kbuild/makefiles.txt
index 9a1586590d82..2616a58a5a4b 100644
--- a/trunk/Documentation/kbuild/makefiles.txt
+++ b/trunk/Documentation/kbuild/makefiles.txt
@@ -872,13 +872,7 @@ When kbuild executes the following steps are followed (roughly):
Assignments to $(targets) are without $(obj)/ prefix.
if_changed may be used in conjunction with custom commands as
defined in 6.7 "Custom kbuild commands".
-
Note: It is a typical mistake to forget the FORCE prerequisite.
- Another common pitfall is that whitespace is sometimes
- significant; for instance, the below will fail (note the extra space
- after the comma):
- target: source(s) FORCE
- #WRONG!# $(call if_changed, ld/objcopy/gzip)
ld
Link target. Often LDFLAGS_$@ is used to set specific options to ld.
diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt
index d2f0c67ba1fb..3d5cd7a09b2f 100644
--- a/trunk/Documentation/kernel-parameters.txt
+++ b/trunk/Documentation/kernel-parameters.txt
@@ -1174,11 +1174,6 @@ running once the system is up.
New name for the ramdisk parameter.
See Documentation/ramdisk.txt.
- rdinit= [KNL]
- Format:
- Run specified binary instead of /init from the ramdisk,
- used for early userspace startup. See initrd.
-
reboot= [BUGS=IA-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
Format: [,[,...]]
See arch/*/kernel/reboot.c.
diff --git a/trunk/Documentation/networking/README.ipw2100 b/trunk/Documentation/networking/README.ipw2100
deleted file mode 100644
index 2046948b020d..000000000000
--- a/trunk/Documentation/networking/README.ipw2100
+++ /dev/null
@@ -1,246 +0,0 @@
-
-===========================
-Intel(R) PRO/Wireless 2100 Network Connection Driver for Linux
-README.ipw2100
-
-March 14, 2005
-
-===========================
-Index
----------------------------
-0. Introduction
-1. Release 1.1.0 Current Features
-2. Command Line Parameters
-3. Sysfs Helper Files
-4. Radio Kill Switch
-5. Dynamic Firmware
-6. Power Management
-7. Support
-8. License
-
-
-===========================
-0. Introduction
------------- ----- ----- ---- --- -- -
-
-This document provides a brief overview of the features supported by the
-IPW2100 driver project. The main project website, where the latest
-development version of the driver can be found, is:
-
- http://ipw2100.sourceforge.net
-
-There you can find the not only the latest releases, but also information about
-potential fixes and patches, as well as links to the development mailing list
-for the driver project.
-
-
-===========================
-1. Release 1.1.0 Current Supported Features
----------------------------
-- Managed (BSS) and Ad-Hoc (IBSS)
-- WEP (shared key and open)
-- Wireless Tools support
-- 802.1x (tested with XSupplicant 1.0.1)
-
-Enabled (but not supported) features:
-- Monitor/RFMon mode
-- WPA/WPA2
-
-The distinction between officially supported and enabled is a reflection
-on the amount of validation and interoperability testing that has been
-performed on a given feature.
-
-
-===========================
-2. Command Line Parameters
----------------------------
-
-If the driver is built as a module, the following optional parameters are used
-by entering them on the command line with the modprobe command using this
-syntax:
-
- modprobe ipw2100 [