电源管理是实现低功耗的一种方式,是从应用程序到内核框架,再到设备驱动和硬件设备都要系统考虑的一个系统工程。
源码位置:kernel/power/
Linux 3.0版本在linux2.6.32版本基础上的改动更新:
1)、Fix operator precedence bug.
2)、call __get_wall_to_monotonic() instead of using wall_to_monotonic.
3)、use get_xtime_and_monotonic_and_sleep_offset in get_expired_time.
4)、Free memory bitmaps if opening /dev/snapshot fails.
5)、Merge commit ‘v3.0-rc5’.
该部分源码augustatek有在linux2.6.32版本的基础上改动更新:
1)、Add sleep in suspend().
2)、Add arm power down support.
3)、remove the sleep to solve “wakeup too long”.
3.11. USB Gadget驱动
源码位置:drivers/usb/gadget/android.c
drivers/usb/gadget/f_adb.c
drivers/usb/gadget/f_accessory.c (new file)
drivers/usb/gadget/f_mtp.c (new file)
drivers/usb/gadget/f_mass_storage.c
Linux 3.0版本在linux2.6.32版本基础上的改动更新:
1)、Add userspace notifications for USB state changes.
2)、Remove unused function android_usb_set_connected().
3)、Add usb_composite_force_reset utility to force enumeration.
4)、Fix section mismatch warning.
5)、Disable MTP when RNDIS function is enabled.
6)、Remove WAKEUP flag from bmAttributes.
7)、Fixed Android gadget function discovery & product matching.
8)、android Fix gadget descriptor compliance for IAD's.
9)、Support switching vendor ID when configuration changes.
10)、Fix problem switching vendor IDs.
11)、New gadget driver for android USB accesories.
12)、Misc improvements and cleanup:
- Add URI string.
- Replace type string with a description string.
- Add a control call to retrieve accessory protocol version (currently 1).
- Driver read() and write() calls now fail after USB disconnect until driver file is closed and reopened.
- Misc cleanup work
13)、Clear accessory strings when USB is disconnected.
14)、Clear previous strings on ACCESSORY_GET_PROTOCOL.
15)、Clear disconnected flag when driver file is opened.
16)、Add string for accessory's unique serial number.
17)、Set bNumEndpoints to correct value of 2.
18)、Update android gadget driver.
* Functions and the device descriptor are configured from user space:
echo 0 > /sys/class/android_usb/android0/enable
echo adb,acm > /sys/class/android_usb/android0/functions
echo 2 > /sys/class/android_usb/android0/f_acm/instances
echo 1 > /sys/class/android_usb/android0/enable
* Driver does not require platform data anymore.
* Moved function initialization to android.c instead of each function file.
* Replaced switches by uevents.
19)、Add PTP variant of MTP USB function.
20)、dequeue request on error in adb_read.
该部分源码augustatek有在linux2.6.32版本的基础上改动更新:
1)、fix usb pm and adb suspend issues.
2)、prevent system suspend when enabling adb.
3)、add android usb adb functions.
4)、system crash if disconnect usb cable during file transfer.
5)、usb cable plug in and out sometimes can cause kernel panic.
3.12. 文件系统部分(UBIFS、Yaffs2)
UBIFS:
源码位置:fs/ubifs/
ubifs源码一直处于更新状态,每个linux内核版本对应的ubifs源码都有变化,从linux2.6.32至linux3.0共有6次merge动作。
The UBI File-System source code git tree has two branches: master and linux-next
Master:contains the most recent stuff which is often incomplete, buggy, or not tested very well.
linux-next:contains more or less stable patches goes to main-line.
该部分源码augustatek有在linux2.6.32版本的基础上改动更新:
1)、Use continuous memory and async mode to resolve “ubifs is bad for sync mode”.
Yaffs2:
源码位置:fs/yaffs2/
Linux 3.0版本在linux2.6.32版本基础上的改动更新:
1)、Don’t force YAFFS_TRACE_ALWAYS for all trace levels.
该部分源码augustatek有在linux2.6.32版本的基础上改动更新:
1)、Update yaffs2 from official site to fix un-expected android system perm issue.
3.13. MTD驱动
Linux3.0版本在linux2.6.32的基础上有针对UBIFS的相关merge动作,此外还有一些针对不同厂商nand的更新改动。
3.14. 显示驱动(Framebuffer)
android2.2至android4.0期间,android对framebuffer部分的改动更新有:
1)、Add fb_edid_add_monspecs for parsing extended edid information.
2)、Put the partial update magic value into the fix_screen struct.
3)、Add support for RGBX 8888 image format.
4)、Fix framebuffer console(Don’t allow non panning updates to bypass the wait for the panel to turn on).
5)、Set the correct pack pattern for XRGB/ARGB.
6)、Add ION Memory Manager.
3.15. 视频驱动(V4L2)
Linux 3.0版本在linux2.6.32版本基础上的改动更新:
1)、增加了对一些camera sensors的支持;
2)、Add a media-bus API for configuring v4l2 subdev pixel and frame formats.
新增的API有
+ enum_mbus_fmt: enumerate pixel formats, provided by a video data source
+ g_mbus_fmt: get the current pixel format, provided by a video data source
+ try_mbus_fmt: try to set a pixel format on a video data source
+ s_mbus_fmt: set a pixel format on a video data source
3.16. 音频驱动(ALSA)
Linux3.0使用版本alsa-driver-1.0.24,android4.0中alsa-lib已不被使用,取而代之的是tinyalsa.
Linux2.6.32使用版本alsa-driver-1.0.21
3.17. Event输入设备驱动
Linux 3.0版本在linux2.6.32版本基础上的改动更新:
1)、增加了对一些input device的支持;
2)、Implement input filters;
+ filter: separates normal event handlers from "filters".
3)、add support for disabling gpios through sysfs;
Now gpio-keys input driver exports 4 new attributes to userland through sysfs: /sys/devices/platform/gpio-keys/keys [ro] /sys/devices/platform/gpio-keys/switches [ro] /sys/devices/platform/gpio-keys/disabled_keys [rw] /sys/devices/platform/gpio-keys/disables_switches [rw]
3.18. Wifi
3.19. Bluetooth
