-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 119036 b: refs/heads/master c: fab349c h: refs/heads/master v: v3
- Loading branch information
Linus Torvalds
committed
Nov 15, 2008
1 parent
6594441
commit a248028
Showing
170 changed files
with
8,163 additions
and
712 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 31c00fc15ebd35c1647775dbfc167a15d46657fd | ||
refs/heads/master: fab349cceb25f92bac1400601c5ef8345a166958 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
What: /sys/class/c2port/ | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/ directory will contain files and | ||
directories that will provide a unified interface to | ||
the C2 port interface. | ||
|
||
What: /sys/class/c2port/c2portX | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/ directory is related to X-th | ||
C2 port into the system. Each directory will contain files to | ||
manage and control its C2 port. | ||
|
||
What: /sys/class/c2port/c2portX/access | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/access file enable the access | ||
to the C2 port from the system. No commands can be sent | ||
till this entry is set to 0. | ||
|
||
What: /sys/class/c2port/c2portX/dev_id | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/dev_id file show the device ID | ||
of the connected micro. | ||
|
||
What: /sys/class/c2port/c2portX/flash_access | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/flash_access file enable the | ||
access to the on-board flash of the connected micro. | ||
No commands can be sent till this entry is set to 0. | ||
|
||
What: /sys/class/c2port/c2portX/flash_block_size | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/flash_block_size file show | ||
the on-board flash block size of the connected micro. | ||
|
||
What: /sys/class/c2port/c2portX/flash_blocks_num | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/flash_blocks_num file show | ||
the on-board flash blocks number of the connected micro. | ||
|
||
What: /sys/class/c2port/c2portX/flash_data | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/flash_data file export | ||
the content of the on-board flash of the connected micro. | ||
|
||
What: /sys/class/c2port/c2portX/flash_erase | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/flash_erase file execute | ||
the "erase" command on the on-board flash of the connected | ||
micro. | ||
|
||
What: /sys/class/c2port/c2portX/flash_erase | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/flash_erase file show the | ||
on-board flash size of the connected micro. | ||
|
||
What: /sys/class/c2port/c2portX/reset | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/reset file execute a "reset" | ||
command on the connected micro. | ||
|
||
What: /sys/class/c2port/c2portX/rev_id | ||
Date: October 2008 | ||
Contact: Rodolfo Giometti <giometti@linux.it> | ||
Description: | ||
The /sys/class/c2port/c2portX/rev_id file show the revision ID | ||
of the connected micro. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
C2 port support | ||
--------------- | ||
|
||
(C) Copyright 2007 Rodolfo Giometti <giometti@enneenne.com> | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
|
||
|
||
Overview | ||
-------- | ||
|
||
This driver implements the support for Linux of Silicon Labs (Silabs) | ||
C2 Interface used for in-system programming of micro controllers. | ||
|
||
By using this driver you can reprogram the in-system flash without EC2 | ||
or EC3 debug adapter. This solution is also useful in those systems | ||
where the micro controller is connected via special GPIOs pins. | ||
|
||
References | ||
---------- | ||
|
||
The C2 Interface main references are at (http://www.silabs.com) | ||
Silicon Laboratories site], see: | ||
|
||
- AN127: FLASH Programming via the C2 Interface at | ||
http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/Small_Form_Factor/en/an127.pdf, and | ||
|
||
- C2 Specification at | ||
http://www.silabs.com/public/documents/tpub_doc/spec/Microcontrollers/en/C2spec.pdf, | ||
|
||
however it implements a two wire serial communication protocol (bit | ||
banging) designed to enable in-system programming, debugging, and | ||
boundary-scan testing on low pin-count Silicon Labs devices. Currently | ||
this code supports only flash programming but extensions are easy to | ||
add. | ||
|
||
Using the driver | ||
---------------- | ||
|
||
Once the driver is loaded you can use sysfs support to get C2port's | ||
info or read/write in-system flash. | ||
|
||
# ls /sys/class/c2port/c2port0/ | ||
access flash_block_size flash_erase rev_id | ||
dev_id flash_blocks_num flash_size subsystem/ | ||
flash_access flash_data reset uevent | ||
|
||
Initially the C2port access is disabled since you hardware may have | ||
such lines multiplexed with other devices so, to get access to the | ||
C2port, you need the command: | ||
|
||
# echo 1 > /sys/class/c2port/c2port0/access | ||
|
||
after that you should read the device ID and revision ID of the | ||
connected micro controller: | ||
|
||
# cat /sys/class/c2port/c2port0/dev_id | ||
8 | ||
# cat /sys/class/c2port/c2port0/rev_id | ||
1 | ||
|
||
However, for security reasons, the in-system flash access in not | ||
enabled yet, to do so you need the command: | ||
|
||
# echo 1 > /sys/class/c2port/c2port0/flash_access | ||
|
||
After that you can read the whole flash: | ||
|
||
# cat /sys/class/c2port/c2port0/flash_data > image | ||
|
||
erase it: | ||
|
||
# echo 1 > /sys/class/c2port/c2port0/flash_erase | ||
|
||
and write it: | ||
|
||
# cat image > /sys/class/c2port/c2port0/flash_data | ||
|
||
after writing you have to reset the device to execute the new code: | ||
|
||
# echo 1 > /sys/class/c2port/c2port0/reset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Kernel driver adt7462 | ||
====================== | ||
|
||
Supported chips: | ||
* Analog Devices ADT7462 | ||
Prefix: 'adt7462' | ||
Addresses scanned: I2C 0x58, 0x5C | ||
Datasheet: Publicly available at the Analog Devices website | ||
|
||
Author: Darrick J. Wong | ||
|
||
Description | ||
----------- | ||
|
||
This driver implements support for the Analog Devices ADT7462 chip family. | ||
|
||
This chip is a bit of a beast. It has 8 counters for measuring fan speed. It | ||
can also measure 13 voltages or 4 temperatures, or various combinations of the | ||
two. See the chip documentation for more details about the exact set of | ||
configurations. This driver does not allow one to configure the chip; that is | ||
left to the system designer. | ||
|
||
A sophisticated control system for the PWM outputs is designed into the ADT7462 | ||
that allows fan speed to be adjusted automatically based on any of the three | ||
temperature sensors. Each PWM output is individually adjustable and | ||
programmable. Once configured, the ADT7462 will adjust the PWM outputs in | ||
response to the measured temperatures without further host intervention. This | ||
feature can also be disabled for manual control of the PWM's. | ||
|
||
Each of the measured inputs (voltage, temperature, fan speed) has | ||
corresponding high/low limit values. The ADT7462 will signal an ALARM if | ||
any measured value exceeds either limit. | ||
|
||
The ADT7462 samples all inputs continuously. The driver will not read | ||
the registers more often than once every other second. Further, | ||
configuration data is only read once per minute. | ||
|
||
Special Features | ||
---------------- | ||
|
||
The ADT7462 have a 10-bit ADC and can therefore measure temperatures | ||
with 0.25 degC resolution. | ||
|
||
The Analog Devices datasheet is very detailed and describes a procedure for | ||
determining an optimal configuration for the automatic PWM control. | ||
|
||
The driver will report sensor labels when it is able to determine that | ||
information from the configuration registers. | ||
|
||
Configuration Notes | ||
------------------- | ||
|
||
Besides standard interfaces driver adds the following: | ||
|
||
* PWM Control | ||
|
||
* pwm#_auto_point1_pwm and temp#_auto_point1_temp and | ||
* pwm#_auto_point2_pwm and temp#_auto_point2_temp - | ||
|
||
point1: Set the pwm speed at a lower temperature bound. | ||
point2: Set the pwm speed at a higher temperature bound. | ||
|
||
The ADT7462 will scale the pwm between the lower and higher pwm speed when | ||
the temperature is between the two temperature boundaries. PWM values range | ||
from 0 (off) to 255 (full speed). Fan speed will be set to maximum when the | ||
temperature sensor associated with the PWM control exceeds temp#_max. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Kernel driver lis3lv02d | ||
================== | ||
|
||
Supported chips: | ||
|
||
* STMicroelectronics LIS3LV02DL and LIS3LV02DQ | ||
|
||
Author: | ||
Yan Burman <burman.yan@gmail.com> | ||
Eric Piel <eric.piel@tremplin-utc.net> | ||
|
||
|
||
Description | ||
----------- | ||
|
||
This driver provides support for the accelerometer found in various HP laptops | ||
sporting the feature officially called "HP Mobile Data Protection System 3D" or | ||
"HP 3D DriveGuard". It detect automatically laptops with this sensor. Known models | ||
(for now the HP 2133, nc6420, nc2510, nc8510, nc84x0, nw9440 and nx9420) will | ||
have their axis automatically oriented on standard way (eg: you can directly | ||
play neverball). The accelerometer data is readable via | ||
/sys/devices/platform/lis3lv02d. | ||
|
||
Sysfs attributes under /sys/devices/platform/lis3lv02d/: | ||
position - 3D position that the accelerometer reports. Format: "(x,y,z)" | ||
calibrate - read: values (x, y, z) that are used as the base for input class device operation. | ||
write: forces the base to be recalibrated with the current position. | ||
rate - reports the sampling rate of the accelerometer device in HZ | ||
|
||
This driver also provides an absolute input class device, allowing | ||
the laptop to act as a pinball machine-esque joystick. | ||
|
||
Axes orientation | ||
---------------- | ||
|
||
For better compatibility between the various laptops. The values reported by | ||
the accelerometer are converted into a "standard" organisation of the axes | ||
(aka "can play neverball out of the box"): | ||
* When the laptop is horizontal the position reported is about 0 for X and Y | ||
and a positive value for Z | ||
* If the left side is elevated, X increases (becomes positive) | ||
* If the front side (where the touchpad is) is elevated, Y decreases (becomes negative) | ||
* If the laptop is put upside-down, Z becomes negative | ||
|
||
If your laptop model is not recognized (cf "dmesg"), you can send an email to the | ||
authors to add it to the database. When reporting a new laptop, please include | ||
the output of "dmidecode" plus the value of /sys/devices/platform/lis3lv02d/position | ||
in these four cases. | ||
|
Oops, something went wrong.