You can subscribe to this list here.
| 2006 |
Jan
|
Feb
(4) |
Mar
(135) |
Apr
(130) |
May
(82) |
Jun
(101) |
Jul
(75) |
Aug
(37) |
Sep
(28) |
Oct
(45) |
Nov
(114) |
Dec
(27) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(22) |
Feb
(60) |
Mar
(81) |
Apr
(120) |
May
(29) |
Jun
(50) |
Jul
(67) |
Aug
(41) |
Sep
(36) |
Oct
(4) |
Nov
(4) |
Dec
|
| 2008 |
Jan
(5) |
Feb
(17) |
Mar
(5) |
Apr
(6) |
May
(5) |
Jun
(9) |
Jul
(5) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <les...@16...> - 2007-04-16 11:30:23
|
1/C+tLXEuPe5q8u+o6izp7zSo6nE+rrDo7oNCiAgICC7qrfhyrXStdPQz965q8u+yse+rbmkycy+ 1teisuG1x7zHvK/KtdK10+vDs9LXzqrSu8zltPPQzdfbus/G89K1oaPP1tLyw7/Uwr34z+69z7bg zeqzybK7wcvP+srbtu62yKGiz9bT0MuwxrHTxbvdttTN4rT6wO2jrMbVzajLsMaxo6jJzMa3z/rK 26GixuTL/Lf+zvEgoaK547jmoaLUy8rkoaK9qNb+uaSzzKGi1+LB3qOp1PbWtcuwtcijrM/qz7jL sMLKv8m4+b7dvfC27rTz0KHAtMnMzNa148r9oaO5q8u+sb7XxbnLv83WwcnP19rWvKOsv8nPyL+q vt/LsMaxuPi587mry76jrLT9yc/N+NHp1qS78rW9y7DO8b7W0enWpLrz1Nm4tr/uo6ENCiAgICDI 9LnzuavLvqOos6e80qOp1Nq0y8/u0rXO8cnP09DQ6NKqu/LT0NLJwse1xLu2063AtLXn18nRr6Os ubLI2bei1bmjobTyyMXWrrSmo6y+tMfrwcK94qOhDQrBqs+1yMs61cXPyMn6DQrBqs+1tee7sDoo MCkxMzkgMjY1MzMgMTM5ICAgUVE6NjA1NjA2NjE2DQpNU046c3pfaHVhZmVuZ0Bob3RtYWlsLmNv bSANCkUtbWFpbDpodWFmZW5nNjg4OEAxMjYuY29t |
|
From: <nbo...@us...> - 2007-04-16 03:17:46
|
Revision: 118
http://svn.sourceforge.net/mactel-linux/?rev=118&view=rev
Author: nboichat
Date: 2007-04-15 20:17:44 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Update to latest git.
Modified Paths:
--------------
trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch
trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch
Modified: trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch 2007-04-16 03:16:51 UTC (rev 117)
+++ trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch 2007-04-16 03:17:44 UTC (rev 118)
@@ -12,7 +12,7 @@
4 files changed, 948 insertions(+), 0 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
-index 829407f..3e19a09 100644
+index ef84419..a4aab8c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -382,6 +382,12 @@ L: lin...@vg...
Modified: trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch 2007-04-16 03:16:51 UTC (rev 117)
+++ trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch 2007-04-16 03:17:44 UTC (rev 118)
@@ -55,7 +55,7 @@
+register (UMSR) 0xee has bit 30 set. If not the TjMax is 100 degrees C as
+(sometimes) documented in processor datasheet.
diff --git a/MAINTAINERS b/MAINTAINERS
-index 3e19a09..b12f11a 100644
+index a4aab8c..41e617a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -973,6 +973,12 @@ M: mh...@wi...
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nbo...@us...> - 2007-04-16 03:16:56
|
Revision: 117
http://svn.sourceforge.net/mactel-linux/?rev=117&view=rev
Author: nboichat
Date: 2007-04-15 20:16:51 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Fix crash when led triggers are activated on the keyboard backlight.
Added Paths:
-----------
trunk/kernel/mactel-patches-2.6.21/0013-applesmc_fix_sleep_in_led_brightness_set.patch
trunk/kernel/mactel-patches-2.6.21/0014-applesmc_int.patch
Removed Paths:
-------------
trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch
Added: trunk/kernel/mactel-patches-2.6.21/0013-applesmc_fix_sleep_in_led_brightness_set.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0013-applesmc_fix_sleep_in_led_brightness_set.patch (rev 0)
+++ trunk/kernel/mactel-patches-2.6.21/0013-applesmc_fix_sleep_in_led_brightness_set.patch 2007-04-16 03:16:51 UTC (rev 117)
@@ -0,0 +1,158 @@
+Cannot sleep in led->brightness_set handler, as it might be called from a softirq, so we use a workqueue to change the brightness (as recommended by Richard Purdie)
+
+From: Nicolas Boichat <ni...@bo...>
+
+
+---
+
+ drivers/hwmon/applesmc.c | 61 +++++++++++++++++++++++++++++++++++++---------
+ 1 files changed, 49 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
+index 4ec38ef..ea0a004 100644
+--- a/drivers/hwmon/applesmc.c
++++ b/drivers/hwmon/applesmc.c
+@@ -38,6 +38,7 @@
+ #include <asm/io.h>
+ #include <linux/leds.h>
+ #include <linux/hwmon.h>
++#include <linux/workqueue.h>
+
+ /* data port used by Apple SMC */
+ #define APPLESMC_DATA_PORT 0x300
+@@ -116,7 +117,7 @@ struct dmi_match_data {
+ int temperature_set;
+ };
+
+-static int debug = 0;
++static const int debug = 0;
+ static struct platform_device *pdev;
+ static s16 rest_x;
+ static s16 rest_y;
+@@ -141,8 +142,10 @@ static struct mutex applesmc_lock;
+ */
+ static unsigned int key_at_index;
+
++static struct workqueue_struct *applesmc_led_wq;
++
+ /*
+- * __wait_status - Wait up to 100ms for the status port to get a certain value
++ * __wait_status - Wait up to 2ms for the status port to get a certain value
+ * (masked with 0x0f), returning zero if the value is obtained. Callers must
+ * hold applesmc_lock.
+ */
+@@ -152,9 +155,14 @@ static int __wait_status(u8 val)
+
+ val = val & APPLESMC_STATUS_MASK;
+
+- for (i = 0; i < 10000; i++) {
+- if ((inb(APPLESMC_CMD_PORT) & APPLESMC_STATUS_MASK) == val)
++ for (i = 0; i < 200; i++) {
++ if ((inb(APPLESMC_CMD_PORT) & APPLESMC_STATUS_MASK) == val) {
++ if (debug)
++ printk(KERN_DEBUG
++ "Waited %d us for status %x\n",
++ i*10, val);
+ return 0;
++ }
+ udelay(10);
+ }
+
+@@ -721,17 +729,33 @@ static ssize_t applesmc_calibrate_store(struct device *dev,
+ return count;
+ }
+
+-static void applesmc_backlight_set(struct led_classdev *led_cdev,
+- enum led_brightness value)
++/* Store the next backlight value to be written by the work */
++static unsigned int backlight_value;
++
++static void applesmc_backlight_set(struct work_struct *work)
+ {
+ u8 buffer[2];
+
+ mutex_lock(&applesmc_lock);
+- buffer[0] = value;
++ buffer[0] = backlight_value;
+ buffer[1] = 0x00;
+ applesmc_write_key(BACKLIGHT_KEY, buffer, 2);
+ mutex_unlock(&applesmc_lock);
+ }
++DECLARE_WORK(backlight_work, &applesmc_backlight_set);
++
++static void applesmc_brightness_set(struct led_classdev *led_cdev,
++ enum led_brightness value)
++{
++ int ret;
++
++ backlight_value = value;
++ ret = queue_work(applesmc_led_wq, &backlight_work);
++
++ if (debug && (!ret)) {
++ printk(KERN_DEBUG "applesmc: work was already on the queue.\n");
++ }
++}
+
+ static ssize_t applesmc_key_count_show(struct device *dev,
+ struct device_attribute *attr, char *sysfsbuf)
+@@ -887,7 +911,7 @@ static ssize_t applesmc_key_at_index_store(struct device *dev,
+ static struct led_classdev applesmc_backlight = {
+ .name = "smc:kbd_backlight",
+ .default_trigger = "nand-disk",
+- .brightness_set = applesmc_backlight_set,
++ .brightness_set = applesmc_brightness_set,
+ };
+
+ static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
+@@ -1234,25 +1258,35 @@ static int __init applesmc_init(void)
+ if (ret)
+ goto out_accelerometer;
+
++ /* Create the workqueue */
++ applesmc_led_wq = create_singlethread_workqueue("applesmc-led");
++ if (!applesmc_led_wq) {
++ ret = -ENOMEM;
++ goto out_light_sysfs;
++ }
++
+ /* register as a led device */
+ ret = led_classdev_register(&pdev->dev, &applesmc_backlight);
+ if (ret < 0)
+- goto out_light_sysfs;
++ goto out_light_wq;
+ }
+
+ hwmon_class_dev = hwmon_device_register(&pdev->dev);
+ if (IS_ERR(hwmon_class_dev)) {
+ ret = PTR_ERR(hwmon_class_dev);
+- goto out_light;
++ goto out_light_ledclass;
+ }
+
+ printk(KERN_INFO "applesmc: driver successfully loaded.\n");
+
+ return 0;
+
+-out_light:
++out_light_ledclass:
+ if (applesmc_light)
+ led_classdev_unregister(&applesmc_backlight);
++out_light_wq:
++ if (applesmc_light)
++ destroy_workqueue(applesmc_led_wq);
+ out_light_sysfs:
+ if (applesmc_light)
+ sysfs_remove_file(&pdev->dev.kobj, &dev_attr_light.attr);
+@@ -1280,8 +1314,11 @@ out:
+ static void __exit applesmc_exit(void)
+ {
+ hwmon_device_unregister(hwmon_class_dev);
+- if (applesmc_light)
++ if (applesmc_light) {
+ led_classdev_unregister(&applesmc_backlight);
++ destroy_workqueue(applesmc_led_wq);
++ sysfs_remove_file(&pdev->dev.kobj, &dev_attr_light.attr);
++ }
+ if (applesmc_accelerometer)
+ applesmc_release_accelerometer();
+ sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group);
Deleted: trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch 2007-04-16 03:11:46 UTC (rev 116)
+++ trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch 2007-04-16 03:16:51 UTC (rev 117)
@@ -1,410 +0,0 @@
-Interrupt support for the accelerometer.
-
-From: Nicolas Boichat <ni...@bo...>
-
-
----
-
- drivers/hwmon/applesmc.c | 316 +++++++++++++++++++++++++++++++++++++++++++---
- 1 files changed, 293 insertions(+), 23 deletions(-)
-
-diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
-index 4ec38ef..6ad1c2d 100644
---- a/drivers/hwmon/applesmc.c
-+++ b/drivers/hwmon/applesmc.c
-@@ -38,14 +38,20 @@
- #include <asm/io.h>
- #include <linux/leds.h>
- #include <linux/hwmon.h>
-+#include <linux/interrupt.h>
-
- /* data port used by Apple SMC */
- #define APPLESMC_DATA_PORT 0x300
- /* command/status port used by Apple SMC */
- #define APPLESMC_CMD_PORT 0x304
-+/* status port used by Apple SMC to get which interrupt type just happened */
-+#define APPLESMC_INT_PORT 0x31f
-
- #define APPLESMC_NR_PORTS 32 /* 0x300-0x31f */
-
-+/* Defined in ACPI DSDT table, should we read it from there? */
-+#define APPLESMC_IRQ 6
-+
- #define APPLESMC_MAX_DATA_LENGTH 32
-
- #define APPLESMC_STATUS_MASK 0x0f
-@@ -56,6 +62,8 @@
-
- #define KEY_COUNT_KEY "#KEY" /* r-o ui32 */
-
-+#define INTERRUPT_OK_KEY "NTOK" /* w-o ui8 */
-+
- #define LIGHT_SENSOR_LEFT_KEY "ALV0" /* r-o {alv (6 bytes) */
- #define LIGHT_SENSOR_RIGHT_KEY "ALV1" /* r-o {alv (6 bytes) */
- #define BACKLIGHT_KEY "LKSB" /* w-o {lkb (2 bytes) */
-@@ -67,6 +75,19 @@
- #define MOTION_SENSOR_Z_KEY "MO_Z" /* r-o sp78 (2 bytes) */
- #define MOTION_SENSOR_KEY "MOCN" /* r/w ui16 */
-
-+/*
-+ * Interrupt controls.
-+ * If the norm of the position (sqrt(MO_X^2+MO_Y^2+MO_Z^2)) is smaller than
-+ * MOLT (free fall), or bigger than MOHT (high acceleration) for longer than the
-+ * value of MOLD (or MOHD), SMC will trigger an interrupt.
-+ */
-+#define MOTION_LOW_NORM "MOLT" /* r/w sp78 (2 bytes) */
-+#define MOTION_HIGH_NORM "MOHT" /* r/w sp78 (2 bytes) */
-+#define MOTION_LOW_NORM_INTERVAL "MOLD" /* r/w ui8 */
-+#define MOTION_HIGH_NORM_INTERVAL "MOHD" /* r/w ui8 */
-+
-+#define MSDW_KEY "MSDW" /* r/w flag (1 byte) */
-+
- #define FANS_COUNT "FNum" /* r-o ui8 */
- #define FANS_MANUAL "FS! " /* r-w ui16 */
- #define FAN_ACTUAL_SPEED "F0Ac" /* r-o fpe2 (2 bytes) */
-@@ -340,12 +361,79 @@ static int applesmc_read_motion_sensor(int index, s16* value)
- }
-
- /*
-+ * applesmc_init_check_key_value - checks if a given key contains the bytes in
-+ * buffer, if not, writes these bytes.
-+ * In case of failure retry every INIT_WAIT_MSECS msec, and timeout if it
-+ * waited more than INIT_TIMEOUT_MSECS in total.
-+ * Returns zero on success or a negative error on failure. Callers must
-+ * hold applesmc_lock.
-+ */
-+static int applesmc_init_check_key_value(const char* key, u8* buffer, u8 len)
-+{
-+ int total, ret, i, compare;
-+ u8 rdbuffer[APPLESMC_MAX_DATA_LENGTH];
-+
-+ if (len > APPLESMC_MAX_DATA_LENGTH) {
-+ printk(KERN_ERR "applesmc_init_check_key_value: cannot "
-+ "read/write more than %d bytes",
-+ APPLESMC_MAX_DATA_LENGTH);
-+ return -EINVAL;
-+ }
-+
-+ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
-+ if (!(ret = applesmc_read_key(key, rdbuffer, len))) {
-+ compare = 1;
-+ for (i = 0; i < len; i++) {
-+ if (rdbuffer[i] != buffer[i]) {
-+ compare = 0;
-+ break;
-+ }
-+ }
-+
-+ if (compare) {
-+ return 0;
-+ }
-+ }
-+ ret = applesmc_write_key(key, buffer, len);
-+ msleep(INIT_WAIT_MSECS);
-+ }
-+
-+ if (ret)
-+ return ret;
-+ else
-+ return -EIO;
-+}
-+
-+irqreturn_t applesmc_irq_handler(int irq, void *dev_id)
-+{
-+ u8 int_type = inb(APPLESMC_INT_PORT);
-+
-+ switch (int_type) {
-+ case 0x60:
-+ printk("applesmc: received a free fall interrupt\n");
-+ break;
-+ case 0x6f:
-+ printk("applesmc: received a high acceleration interrupt\n");
-+ break;
-+ case 0x80:
-+ printk("applesmc: received a shock interrupt\n");
-+ break;
-+ default:
-+ printk("applesmc: received an unknown interrupt %x\n", int_type);
-+ }
-+
-+ return IRQ_NONE;
-+}
-+
-+/*
- * applesmc_device_init - initialize the accelerometer. Returns zero on success
- * and negative error code on failure. Can sleep.
- */
- static int applesmc_device_init(void)
- {
-- int total, ret = -ENXIO;
-+ int total;
-+ int ret = -ENXIO;
-+ int ret1, ret2;
- u8 buffer[2];
-
- if (!applesmc_accelerometer)
-@@ -353,32 +441,79 @@ static int applesmc_device_init(void)
-
- mutex_lock(&applesmc_lock);
-
-+ /* Accept interrupts */
-+ buffer[0] = 0x01;
- for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
-- if (debug)
-- printk(KERN_DEBUG "applesmc try %d\n", total);
-- if (!applesmc_read_key(MOTION_SENSOR_KEY, buffer, 2) &&
-- (buffer[0] != 0x00 || buffer[1] != 0x00)) {
-- if (total == INIT_TIMEOUT_MSECS) {
-- printk(KERN_DEBUG "applesmc: device has"
-- " already been initialized"
-- " (0x%02x, 0x%02x).\n",
-- buffer[0], buffer[1]);
-- } else {
-- printk(KERN_DEBUG "applesmc: device"
-- " successfully initialized"
-- " (0x%02x, 0x%02x).\n",
-- buffer[0], buffer[1]);
-- }
-- ret = 0;
-- goto out;
-- }
-- buffer[0] = 0xe0;
-- buffer[1] = 0x00;
-- applesmc_write_key(MOTION_SENSOR_KEY, buffer, 2);
-+ ret1 = applesmc_write_key(INTERRUPT_OK_KEY, buffer, 1);
-+ msleep(INIT_WAIT_MSECS);
-+
-+ if (!ret1)
-+ break;
-+ }
-+ if (ret1)
-+ printk(KERN_WARNING "applesmc: Cannot set NTOK key, "
-+ "will not receive interrupts.\n");
-+
-+ /* Setup interrupt controls. */
-+ buffer[0] = 20; /* 20 msecs */
-+ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM_INTERVAL,
-+ buffer, 1);
-+
-+ buffer[0] = 20; /* 20 msecs */
-+ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM_INTERVAL,
-+ buffer, 1);
-+
-+ if (ret1 || ret2) {
-+ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
-+ "interrupt interval, might not receive "
-+ "some interrupts.");
-+ }
-+
-+ buffer[0] = 0x00;
-+ buffer[1] = 0x60;
-+ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM, buffer, 2);
-+
-+ buffer[0] = 0x01;
-+ buffer[1] = 0xc0;
-+ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM, buffer, 2);
-+
-+ if (ret1 || ret2) {
-+ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
-+ "min/max norm parameters, "
-+ "might not receive some interrupts.");
-+ }
-+
-+ /* Mysterious key. */
-+ buffer[0] = 0x01;
-+ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
-+ ret1 = applesmc_write_key(MSDW_KEY, buffer, 1);
- msleep(INIT_WAIT_MSECS);
-+
-+ if (!ret1)
-+ break;
-+ }
-+ if (ret1)
-+ printk(KERN_WARNING "applesmc: Cannot set MSDW key\n");
-+
-+ /* Initialize the device. */
-+ buffer[0] = 0xe0;
-+ buffer[1] = 0xf8;
-+ if (applesmc_init_check_key_value(MOTION_SENSOR_KEY, buffer, 2)) {
-+ printk(KERN_WARNING "applesmc: failed to init "
-+ "the accelerometer\n");
-+ goto out;
- }
-
-- printk(KERN_WARNING "applesmc: failed to init the device\n");
-+ ret1 = request_irq(APPLESMC_IRQ, applesmc_irq_handler, IRQF_DISABLED,
-+ "applesmc_irq_handler", NULL);
-+
-+ if (ret1) {
-+ printk(KERN_WARNING "applesmc: cannot setup irq handler\n");
-+ }
-+
-+ printk(KERN_DEBUG "applesmc: accelerometer "
-+ "successfully initialized.\n");
-+ ret = 0;
-
- out:
- mutex_unlock(&applesmc_lock);
-@@ -423,9 +558,16 @@ static int applesmc_resume(struct platform_device *dev)
- return applesmc_device_init();
- }
-
-+static int applesmc_remove(struct platform_device *dev)
-+{
-+ free_irq(6, NULL);
-+ return 0;
-+}
-+
- static struct platform_driver applesmc_driver = {
- .probe = applesmc_probe,
- .resume = applesmc_resume,
-+ .remove = applesmc_remove,
- .driver = {
- .name = "applesmc",
- .owner = THIS_MODULE,
-@@ -884,6 +1026,122 @@ static ssize_t applesmc_key_at_index_store(struct device *dev,
- return count;
- }
-
-+static ssize_t applesmc_accelerometer_show(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ int ret;
-+ unsigned int value = 0;
-+ u8 buffer[2];
-+ char* key;
-+ int length;
-+ struct sensor_device_attribute_2 *sensor_attr =
-+ to_sensor_dev_attr_2(attr);
-+
-+ switch(sensor_attr->index) {
-+ case 0:
-+ key = MOTION_LOW_NORM_INTERVAL;
-+ length = 1;
-+ break;
-+ case 1:
-+ key = MOTION_HIGH_NORM_INTERVAL;
-+ length = 1;
-+ break;
-+ case 2:
-+ key = MOTION_LOW_NORM;
-+ length = 2;
-+ break;
-+ case 3:
-+ key = MOTION_HIGH_NORM;
-+ length = 2;
-+ break;
-+ default:
-+ printk("Invalid index for applesmc_accelerometer_show");
-+ return -EINVAL;
-+ }
-+
-+ mutex_lock(&applesmc_lock);
-+
-+ ret = applesmc_read_key(key, buffer, length);
-+ if (length == 2)
-+ value = ((unsigned int)buffer[0] << 8) | buffer[1];
-+ else if (length == 1)
-+ value = buffer[0];
-+ else {
-+ printk("Invalid length for applesmc_param_show");
-+ ret = -EINVAL;
-+ }
-+
-+ mutex_unlock(&applesmc_lock);
-+ if (ret)
-+ return ret;
-+ else
-+ return snprintf(sysfsbuf, PAGE_SIZE, "%u\n", value);
-+}
-+
-+static ssize_t applesmc_accelerometer_store(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *sysfsbuf, size_t count)
-+{
-+ int ret;
-+ u32 value;
-+ u8 buffer[2];
-+ char* key;
-+ int length;
-+ struct sensor_device_attribute_2 *sensor_attr =
-+ to_sensor_dev_attr_2(attr);
-+
-+ switch(sensor_attr->index) {
-+ case 0:
-+ key = MOTION_LOW_NORM_INTERVAL;
-+ length = 1;
-+ break;
-+ case 1:
-+ key = MOTION_HIGH_NORM_INTERVAL;
-+ length = 1;
-+ break;
-+ case 2:
-+ key = MOTION_LOW_NORM;
-+ length = 2;
-+ break;
-+ case 3:
-+ key = MOTION_HIGH_NORM;
-+ length = 2;
-+ break;
-+ default:
-+ printk("Invalid index for applesmc_accelerometer_show");
-+ return -EINVAL;
-+ }
-+
-+ value = simple_strtoul(sysfsbuf, NULL, 10);
-+
-+ if (length == 2) {
-+ if (value > 0xffff)
-+ return -EINVAL;
-+
-+ buffer[0] = (value >> 8) & 0xff;
-+ buffer[1] = value & 0xff;
-+ } else if (length == 1) {
-+ if (value > 0xff)
-+ return -EINVAL;
-+
-+ buffer[0] = value & 0xff;
-+ } else {
-+ printk("Invalid length for applesmc_param_store");
-+ return -EINVAL;
-+ }
-+
-+ mutex_lock(&applesmc_lock);
-+
-+ ret = applesmc_write_key(key, buffer, length);
-+
-+ mutex_unlock(&applesmc_lock);
-+
-+ if (ret)
-+ return ret;
-+ else
-+ return count;
-+}
-+
- static struct led_classdev applesmc_backlight = {
- .name = "smc:kbd_backlight",
- .default_trigger = "nand-disk",
-@@ -893,10 +1151,22 @@ static struct led_classdev applesmc_backlight = {
- static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
- static DEVICE_ATTR(calibrate, 0644,
- applesmc_calibrate_show, applesmc_calibrate_store);
-+static SENSOR_DEVICE_ATTR(low_norm_trigger_interval, 0644,
-+ applesmc_accelerometer_show, applesmc_accelerometer_store, 0);
-+static SENSOR_DEVICE_ATTR(high_norm_trigger_interval, 0644,
-+ applesmc_accelerometer_show, applesmc_accelerometer_store, 1);
-+static SENSOR_DEVICE_ATTR(low_norm_trigger, 0644,
-+ applesmc_accelerometer_show, applesmc_accelerometer_store, 2);
-+static SENSOR_DEVICE_ATTR(high_norm_trigger, 0644,
-+ applesmc_accelerometer_show, applesmc_accelerometer_store, 3);
-
- static struct attribute *accelerometer_attributes[] = {
- &dev_attr_position.attr,
- &dev_attr_calibrate.attr,
-+ &sensor_dev_attr_low_norm_trigger.dev_attr.attr,
-+ &sensor_dev_attr_high_norm_trigger.dev_attr.attr,
-+ &sensor_dev_attr_low_norm_trigger_interval.dev_attr.attr,
-+ &sensor_dev_attr_high_norm_trigger_interval.dev_attr.attr,
- NULL
- };
-
Added: trunk/kernel/mactel-patches-2.6.21/0014-applesmc_int.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0014-applesmc_int.patch (rev 0)
+++ trunk/kernel/mactel-patches-2.6.21/0014-applesmc_int.patch 2007-04-16 03:16:51 UTC (rev 117)
@@ -0,0 +1,410 @@
+Interrupt support for the accelerometer.
+
+From: Nicolas Boichat <ni...@bo...>
+
+
+---
+
+ drivers/hwmon/applesmc.c | 316 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 293 insertions(+), 23 deletions(-)
+
+diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
+index ea0a004..bf1b6e6 100644
+--- a/drivers/hwmon/applesmc.c
++++ b/drivers/hwmon/applesmc.c
+@@ -39,14 +39,20 @@
+ #include <linux/leds.h>
+ #include <linux/hwmon.h>
+ #include <linux/workqueue.h>
++#include <linux/interrupt.h>
+
+ /* data port used by Apple SMC */
+ #define APPLESMC_DATA_PORT 0x300
+ /* command/status port used by Apple SMC */
+ #define APPLESMC_CMD_PORT 0x304
++/* status port used by Apple SMC to get which interrupt type just happened */
++#define APPLESMC_INT_PORT 0x31f
+
+ #define APPLESMC_NR_PORTS 32 /* 0x300-0x31f */
+
++/* Defined in ACPI DSDT table, should we read it from there? */
++#define APPLESMC_IRQ 6
++
+ #define APPLESMC_MAX_DATA_LENGTH 32
+
+ #define APPLESMC_STATUS_MASK 0x0f
+@@ -57,6 +63,8 @@
+
+ #define KEY_COUNT_KEY "#KEY" /* r-o ui32 */
+
++#define INTERRUPT_OK_KEY "NTOK" /* w-o ui8 */
++
+ #define LIGHT_SENSOR_LEFT_KEY "ALV0" /* r-o {alv (6 bytes) */
+ #define LIGHT_SENSOR_RIGHT_KEY "ALV1" /* r-o {alv (6 bytes) */
+ #define BACKLIGHT_KEY "LKSB" /* w-o {lkb (2 bytes) */
+@@ -68,6 +76,19 @@
+ #define MOTION_SENSOR_Z_KEY "MO_Z" /* r-o sp78 (2 bytes) */
+ #define MOTION_SENSOR_KEY "MOCN" /* r/w ui16 */
+
++/*
++ * Interrupt controls.
++ * If the norm of the position (sqrt(MO_X^2+MO_Y^2+MO_Z^2)) is smaller than
++ * MOLT (free fall), or bigger than MOHT (high acceleration) for longer than the
++ * value of MOLD (or MOHD), SMC will trigger an interrupt.
++ */
++#define MOTION_LOW_NORM "MOLT" /* r/w sp78 (2 bytes) */
++#define MOTION_HIGH_NORM "MOHT" /* r/w sp78 (2 bytes) */
++#define MOTION_LOW_NORM_INTERVAL "MOLD" /* r/w ui8 */
++#define MOTION_HIGH_NORM_INTERVAL "MOHD" /* r/w ui8 */
++
++#define MSDW_KEY "MSDW" /* r/w flag (1 byte) */
++
+ #define FANS_COUNT "FNum" /* r-o ui8 */
+ #define FANS_MANUAL "FS! " /* r-w ui16 */
+ #define FAN_ACTUAL_SPEED "F0Ac" /* r-o fpe2 (2 bytes) */
+@@ -348,12 +369,79 @@ static int applesmc_read_motion_sensor(int index, s16* value)
+ }
+
+ /*
++ * applesmc_init_check_key_value - checks if a given key contains the bytes in
++ * buffer, if not, writes these bytes.
++ * In case of failure retry every INIT_WAIT_MSECS msec, and timeout if it
++ * waited more than INIT_TIMEOUT_MSECS in total.
++ * Returns zero on success or a negative error on failure. Callers must
++ * hold applesmc_lock.
++ */
++static int applesmc_init_check_key_value(const char* key, u8* buffer, u8 len)
++{
++ int total, ret, i, compare;
++ u8 rdbuffer[APPLESMC_MAX_DATA_LENGTH];
++
++ if (len > APPLESMC_MAX_DATA_LENGTH) {
++ printk(KERN_ERR "applesmc_init_check_key_value: cannot "
++ "read/write more than %d bytes",
++ APPLESMC_MAX_DATA_LENGTH);
++ return -EINVAL;
++ }
++
++ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
++ if (!(ret = applesmc_read_key(key, rdbuffer, len))) {
++ compare = 1;
++ for (i = 0; i < len; i++) {
++ if (rdbuffer[i] != buffer[i]) {
++ compare = 0;
++ break;
++ }
++ }
++
++ if (compare) {
++ return 0;
++ }
++ }
++ ret = applesmc_write_key(key, buffer, len);
++ msleep(INIT_WAIT_MSECS);
++ }
++
++ if (ret)
++ return ret;
++ else
++ return -EIO;
++}
++
++irqreturn_t applesmc_irq_handler(int irq, void *dev_id)
++{
++ u8 int_type = inb(APPLESMC_INT_PORT);
++
++ switch (int_type) {
++ case 0x60:
++ printk("applesmc: received a free fall interrupt\n");
++ break;
++ case 0x6f:
++ printk("applesmc: received a high acceleration interrupt\n");
++ break;
++ case 0x80:
++ printk("applesmc: received a shock interrupt\n");
++ break;
++ default:
++ printk("applesmc: received an unknown interrupt %x\n", int_type);
++ }
++
++ return IRQ_NONE;
++}
++
++/*
+ * applesmc_device_init - initialize the accelerometer. Returns zero on success
+ * and negative error code on failure. Can sleep.
+ */
+ static int applesmc_device_init(void)
+ {
+- int total, ret = -ENXIO;
++ int total;
++ int ret = -ENXIO;
++ int ret1, ret2;
+ u8 buffer[2];
+
+ if (!applesmc_accelerometer)
+@@ -361,32 +449,79 @@ static int applesmc_device_init(void)
+
+ mutex_lock(&applesmc_lock);
+
++ /* Accept interrupts */
++ buffer[0] = 0x01;
+ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
+- if (debug)
+- printk(KERN_DEBUG "applesmc try %d\n", total);
+- if (!applesmc_read_key(MOTION_SENSOR_KEY, buffer, 2) &&
+- (buffer[0] != 0x00 || buffer[1] != 0x00)) {
+- if (total == INIT_TIMEOUT_MSECS) {
+- printk(KERN_DEBUG "applesmc: device has"
+- " already been initialized"
+- " (0x%02x, 0x%02x).\n",
+- buffer[0], buffer[1]);
+- } else {
+- printk(KERN_DEBUG "applesmc: device"
+- " successfully initialized"
+- " (0x%02x, 0x%02x).\n",
+- buffer[0], buffer[1]);
+- }
+- ret = 0;
+- goto out;
+- }
+- buffer[0] = 0xe0;
+- buffer[1] = 0x00;
+- applesmc_write_key(MOTION_SENSOR_KEY, buffer, 2);
++ ret1 = applesmc_write_key(INTERRUPT_OK_KEY, buffer, 1);
++ msleep(INIT_WAIT_MSECS);
++
++ if (!ret1)
++ break;
++ }
++ if (ret1)
++ printk(KERN_WARNING "applesmc: Cannot set NTOK key, "
++ "will not receive interrupts.\n");
++
++ /* Setup interrupt controls. */
++ buffer[0] = 20; /* 20 msecs */
++ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM_INTERVAL,
++ buffer, 1);
++
++ buffer[0] = 20; /* 20 msecs */
++ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM_INTERVAL,
++ buffer, 1);
++
++ if (ret1 || ret2) {
++ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
++ "interrupt interval, might not receive "
++ "some interrupts.");
++ }
++
++ buffer[0] = 0x00;
++ buffer[1] = 0x60;
++ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM, buffer, 2);
++
++ buffer[0] = 0x01;
++ buffer[1] = 0xc0;
++ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM, buffer, 2);
++
++ if (ret1 || ret2) {
++ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
++ "min/max norm parameters, "
++ "might not receive some interrupts.");
++ }
++
++ /* Mysterious key. */
++ buffer[0] = 0x01;
++ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
++ ret1 = applesmc_write_key(MSDW_KEY, buffer, 1);
+ msleep(INIT_WAIT_MSECS);
++
++ if (!ret1)
++ break;
++ }
++ if (ret1)
++ printk(KERN_WARNING "applesmc: Cannot set MSDW key\n");
++
++ /* Initialize the device. */
++ buffer[0] = 0xe0;
++ buffer[1] = 0xf8;
++ if (applesmc_init_check_key_value(MOTION_SENSOR_KEY, buffer, 2)) {
++ printk(KERN_WARNING "applesmc: failed to init "
++ "the accelerometer\n");
++ goto out;
+ }
+
+- printk(KERN_WARNING "applesmc: failed to init the device\n");
++ ret1 = request_irq(APPLESMC_IRQ, applesmc_irq_handler, IRQF_DISABLED,
++ "applesmc_irq_handler", NULL);
++
++ if (ret1) {
++ printk(KERN_WARNING "applesmc: cannot setup irq handler\n");
++ }
++
++ printk(KERN_DEBUG "applesmc: accelerometer "
++ "successfully initialized.\n");
++ ret = 0;
+
+ out:
+ mutex_unlock(&applesmc_lock);
+@@ -431,9 +566,16 @@ static int applesmc_resume(struct platform_device *dev)
+ return applesmc_device_init();
+ }
+
++static int applesmc_remove(struct platform_device *dev)
++{
++ free_irq(6, NULL);
++ return 0;
++}
++
+ static struct platform_driver applesmc_driver = {
+ .probe = applesmc_probe,
+ .resume = applesmc_resume,
++ .remove = applesmc_remove,
+ .driver = {
+ .name = "applesmc",
+ .owner = THIS_MODULE,
+@@ -908,6 +1050,122 @@ static ssize_t applesmc_key_at_index_store(struct device *dev,
+ return count;
+ }
+
++static ssize_t applesmc_accelerometer_show(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ int ret;
++ unsigned int value = 0;
++ u8 buffer[2];
++ char* key;
++ int length;
++ struct sensor_device_attribute_2 *sensor_attr =
++ to_sensor_dev_attr_2(attr);
++
++ switch(sensor_attr->index) {
++ case 0:
++ key = MOTION_LOW_NORM_INTERVAL;
++ length = 1;
++ break;
++ case 1:
++ key = MOTION_HIGH_NORM_INTERVAL;
++ length = 1;
++ break;
++ case 2:
++ key = MOTION_LOW_NORM;
++ length = 2;
++ break;
++ case 3:
++ key = MOTION_HIGH_NORM;
++ length = 2;
++ break;
++ default:
++ printk("Invalid index for applesmc_accelerometer_show");
++ return -EINVAL;
++ }
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_read_key(key, buffer, length);
++ if (length == 2)
++ value = ((unsigned int)buffer[0] << 8) | buffer[1];
++ else if (length == 1)
++ value = buffer[0];
++ else {
++ printk("Invalid length for applesmc_param_show");
++ ret = -EINVAL;
++ }
++
++ mutex_unlock(&applesmc_lock);
++ if (ret)
++ return ret;
++ else
++ return snprintf(sysfsbuf, PAGE_SIZE, "%u\n", value);
++}
++
++static ssize_t applesmc_accelerometer_store(struct device *dev,
++ struct device_attribute *attr,
++ const char *sysfsbuf, size_t count)
++{
++ int ret;
++ u32 value;
++ u8 buffer[2];
++ char* key;
++ int length;
++ struct sensor_device_attribute_2 *sensor_attr =
++ to_sensor_dev_attr_2(attr);
++
++ switch(sensor_attr->index) {
++ case 0:
++ key = MOTION_LOW_NORM_INTERVAL;
++ length = 1;
++ break;
++ case 1:
++ key = MOTION_HIGH_NORM_INTERVAL;
++ length = 1;
++ break;
++ case 2:
++ key = MOTION_LOW_NORM;
++ length = 2;
++ break;
++ case 3:
++ key = MOTION_HIGH_NORM;
++ length = 2;
++ break;
++ default:
++ printk("Invalid index for applesmc_accelerometer_show");
++ return -EINVAL;
++ }
++
++ value = simple_strtoul(sysfsbuf, NULL, 10);
++
++ if (length == 2) {
++ if (value > 0xffff)
++ return -EINVAL;
++
++ buffer[0] = (value >> 8) & 0xff;
++ buffer[1] = value & 0xff;
++ } else if (length == 1) {
++ if (value > 0xff)
++ return -EINVAL;
++
++ buffer[0] = value & 0xff;
++ } else {
++ printk("Invalid length for applesmc_param_store");
++ return -EINVAL;
++ }
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_write_key(key, buffer, length);
++
++ mutex_unlock(&applesmc_lock);
++
++ if (ret)
++ return ret;
++ else
++ return count;
++}
++
+ static struct led_classdev applesmc_backlight = {
+ .name = "smc:kbd_backlight",
+ .default_trigger = "nand-disk",
+@@ -917,10 +1175,22 @@ static struct led_classdev applesmc_backlight = {
+ static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
+ static DEVICE_ATTR(calibrate, 0644,
+ applesmc_calibrate_show, applesmc_calibrate_store);
++static SENSOR_DEVICE_ATTR(low_norm_trigger_interval, 0644,
++ applesmc_accelerometer_show, applesmc_accelerometer_store, 0);
++static SENSOR_DEVICE_ATTR(high_norm_trigger_interval, 0644,
++ applesmc_accelerometer_show, applesmc_accelerometer_store, 1);
++static SENSOR_DEVICE_ATTR(low_norm_trigger, 0644,
++ applesmc_accelerometer_show, applesmc_accelerometer_store, 2);
++static SENSOR_DEVICE_ATTR(high_norm_trigger, 0644,
++ applesmc_accelerometer_show, applesmc_accelerometer_store, 3);
+
+ static struct attribute *accelerometer_attributes[] = {
+ &dev_attr_position.attr,
+ &dev_attr_calibrate.attr,
++ &sensor_dev_attr_low_norm_trigger.dev_attr.attr,
++ &sensor_dev_attr_high_norm_trigger.dev_attr.attr,
++ &sensor_dev_attr_low_norm_trigger_interval.dev_attr.attr,
++ &sensor_dev_attr_high_norm_trigger_interval.dev_attr.attr,
+ NULL
+ };
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nbo...@us...> - 2007-04-16 03:11:52
|
Revision: 116
http://svn.sourceforge.net/mactel-linux/?rev=116&view=rev
Author: nboichat
Date: 2007-04-15 20:11:46 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Fix appleir patch (CodingStyle, etc...)
Modified Paths:
--------------
trunk/kernel/mactel-patches-2.6.21/0002-appleir.patch
Modified: trunk/kernel/mactel-patches-2.6.21/0002-appleir.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0002-appleir.patch 2007-04-12 16:38:57 UTC (rev 115)
+++ trunk/kernel/mactel-patches-2.6.21/0002-appleir.patch 2007-04-16 03:11:46 UTC (rev 116)
@@ -7,8 +7,8 @@
drivers/usb/input/Kconfig | 4
drivers/usb/input/Makefile | 1
- drivers/usb/input/appleir.c | 390 +++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 395 insertions(+), 0 deletions(-)
+ drivers/usb/input/appleir.c | 384 +++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 389 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
index 69a9f3b..f88c132 100644
@@ -39,10 +39,29 @@
obj-$(CONFIG_USB_MTOUCH) += mtouchusb.o
diff --git a/drivers/usb/input/appleir.c b/drivers/usb/input/appleir.c
new file mode 100644
-index 0000000..dc5f604
+index 0000000..5f049c7
--- /dev/null
+++ b/drivers/usb/input/appleir.c
-@@ -0,0 +1,390 @@
+@@ -0,0 +1,384 @@
++/*
++ * drivers/usb/input/appleir.c - driver for Apple Intel-based Macs IR Receiver
++ *
++ * Copyright (C) 2006 James McKenzie <ma...@ma...>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License v2 as published by the
++ * Free Software Foundation.
++ *
++ * 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.
++ *
++ * You should have received a copy of the GNU General Public License along with
++ * this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
@@ -50,386 +69,361 @@
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <linux/usb/input.h>
++#include <linux/mutex.h>
+#include <asm/unaligned.h>
+#include <asm/byteorder.h>
+
-+/*
-+ * Version Information
-+ *
-+ */
-+
-+#if 0
-+#define DUMP_PACKETS
-+#else
-+#undef DUMP_PACKETS
-+#endif
-+
-+#define DRIVER_VERSION "v1.1"
++#define DRIVER_VERSION "v1.2"
+#define DRIVER_AUTHOR "James McKenzie"
-+#define DRIVER_DESC "USB Apple MacMini IR Receiver driver"
++#define DRIVER_DESC "USB Apple MacIntel IR Receiver driver"
+#define DRIVER_LICENSE "GPL"
+
-+MODULE_AUTHOR (DRIVER_AUTHOR);
-+MODULE_DESCRIPTION (DRIVER_DESC);
-+MODULE_LICENSE (DRIVER_LICENSE);
++MODULE_AUTHOR(DRIVER_AUTHOR);
++MODULE_DESCRIPTION(DRIVER_DESC);
++MODULE_LICENSE(DRIVER_LICENSE);
+
-+#ifndef USB_VENDOR_ID_APPLE
+#define USB_VENDOR_ID_APPLE 0x05ac
-+#endif
-+#ifndef USB_DEVICE_ID_APPLE_IR
+#define USB_DEVICE_ID_APPLE_IR 0x8240
-+#endif
+
+#define URB_SIZE 32
+
+#define MAX_KEYS 8
-+#define MAX_KEYS_MASK (MAX_KEYS - 1 )
++#define MAX_KEYS_MASK (MAX_KEYS - 1)
+
-+struct appleir
-+{
-+ struct input_dev *dev;
-+ uint8_t *data;
-+ dma_addr_t dma_buf;
-+ struct usb_device *usbdev;
-+ struct urb *urb;
-+ int timer_initted;
-+ struct timer_list key_up_timer;
-+ int current_key;
-+ char phys[32];
++static int debug = 0;
++
++struct appleir {
++ struct input_dev *dev;
++ uint8_t *data;
++ dma_addr_t dma_buf;
++ struct usb_device *usbdev;
++ struct urb *urb;
++ struct timer_list key_up_timer;
++ int current_key;
++ struct mutex current_key_lock;
++ char phys[32];
+};
+
+
+static struct usb_device_id appleir_ids[] = {
-+ {USB_DEVICE (USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR),.driver_info = 0},
-+ {}
++ {
++ USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR),
++ .driver_info = 0
++ },
++ {}
+};
+
-+MODULE_DEVICE_TABLE (usb, appleir_ids);
++MODULE_DEVICE_TABLE(usb, appleir_ids);
+
++/*
++ * Devices report the following, where XX depends on the remote and/or the
++ * receiver (at least 83, ca, ee have been reported as possible values).
++ * The fifth byte's LSB also depends on the hardware.
++ * 25 87 ee XX 0a/0b +
++ * 25 87 ee XX 0c/0d -
++ * 25 87 ee XX 09/08 <<
++ * 25 87 ee XX 06/07 >>
++ * 25 87 ee XX 05/04 >"
++ * 25 87 ee 83 03/02 menu
++ * 26 00 00 00 00 for key repeat
++ *
++ * Thomas Glanzmann also observes the following event sometimes sent after a key
++ * is released, which I interpret as a flat battery message:
++ * 25 87 e0 ca 06 flat battery
++ */
+
-+/* I have two devices both of which report the following */
-+/* 25 87 ee 83 0a + */
-+/* 25 87 ee 83 0c - */
-+/* 25 87 ee 83 09 << */
-+/* 25 87 ee 83 06 >> */
-+/* 25 87 ee 83 05 >" */
-+/* 25 87 ee 83 03 menu */
-+/* 26 00 00 00 00 for key repeat*/
-+
-+/* Thomas Glanzmann reports the following responses */
-+/* 25 87 ee ca 0b + */
-+/* 25 87 ee ca 0d - */
-+/* 25 87 ee ca 08 << */
-+/* 25 87 ee ca 07 >> */
-+/* 25 87 ee ca 04 >" */
-+/* 25 87 ee ca 02 menu */
-+/* 26 00 00 00 00 for key repeat*/
-+/* He also observes the following event sometimes */
-+/* sent after a key is release, which I interpret */
-+/* as a flat battery message */
-+/* 25 87 e0 ca 06 flat battery */
-+
-+
+static int keymap[MAX_KEYS] = {
-+ KEY_RESERVED, KEY_MENU,
-+ KEY_PLAYPAUSE, KEY_NEXTSONG,
-+ KEY_PREVIOUSSONG, KEY_VOLUMEUP,
-+ KEY_VOLUMEDOWN, KEY_RESERVED
++ KEY_RESERVED, KEY_MENU,
++ KEY_PLAYPAUSE, KEY_NEXTSONG,
++ KEY_PREVIOUSSONG, KEY_VOLUMEUP,
++ KEY_VOLUMEDOWN, KEY_RESERVED
+};
+
-+static void
-+dump_packet (struct appleir *appleir, char *msg, uint8_t * data, int len)
++static void dump_packet(struct appleir *appleir, char *msg,
++ uint8_t * data, int len)
+{
-+ int i;
++ int i;
+
-+ printk (KERN_ERR "appleir: %s (%d bytes)", msg, len);
++ printk(KERN_ERR "appleir: %s (%d bytes)", msg, len);
+
-+ for (i = 0; i < len; ++i)
-+ {
-+ printk (" %02x", data[i]);
-+ }
++ for (i = 0; i < len; ++i) {
++ printk(" %02x", data[i]);
++ }
+
-+ printk ("\n");
++ printk("\n");
+}
+
+
-+static void
-+key_up (struct appleir *appleir, int key)
++static void key_up(struct appleir *appleir, int key)
+{
-+ //printk (KERN_ERR "key %d up\n", key);
-+ input_report_key (appleir->dev, key, 0);
-+ input_sync (appleir->dev);
++ if (debug)
++ printk (KERN_DEBUG "key %d up\n", key);
++
++ input_report_key(appleir->dev, key, 0);
++ input_sync(appleir->dev);
+}
+
-+static void
-+key_down (struct appleir *appleir, int key)
++static void key_down(struct appleir *appleir, int key)
+{
-+ //printk (KERN_ERR "key %d down\n", key);
-+ input_report_key (appleir->dev, key, 1);
-+ input_sync (appleir->dev);
++ if (debug)
++ printk (KERN_DEBUG "key %d down\n", key);
++
++ input_report_key(appleir->dev, key, 1);
++ input_sync(appleir->dev);
+}
+
-+static void
-+battery_flat (struct appleir *appleir)
++static void battery_flat(struct appleir *appleir)
+{
-+ printk (KERN_ERR "appleir: possible flat battery?\n");
++ printk(KERN_WARNING "appleir: possible flat battery?\n");
+}
+
-+static void
-+key_up_tick (unsigned long data)
++static void key_up_tick(unsigned long data)
+{
-+ struct appleir *appleir = (struct appleir *) data;
++ struct appleir *apple_ir = (struct appleir*)data;
+
-+ if (appleir->current_key)
-+ {
-+ key_up (appleir, appleir->current_key);
-+ appleir->current_key = 0;
-+ }
++ mutex_lock(&apple_ir->current_key_lock);
++ if (apple_ir->current_key) {
++ key_up(apple_ir, apple_ir->current_key);
++ apple_ir->current_key = 0;
++ }
++ mutex_unlock(&apple_ir->current_key_lock);
+}
+
-+static void
-+new_data (struct appleir *appleir, uint8_t * data, int len)
++static void parse_data(struct appleir *apple_ir, uint8_t *data, int len)
+{
-+ static const uint8_t keydown[] = { 0x25, 0x87, 0xee };
-+ static const uint8_t keyrepeat[] = { 0x26, 0x00, 0x00, 0x00, 0x00 };
-+ static const uint8_t flatbattery[] = { 0x25, 0x87, 0xe0 };
++ static const uint8_t keydown[] = { 0x25, 0x87, 0xee };
++ static const uint8_t keyrepeat[] = { 0x26, 0x00, 0x00, 0x00, 0x00 };
++ static const uint8_t flatbattery[] = { 0x25, 0x87, 0xe0 };
+
-+#ifdef DUMP_PACKETS
-+ dump_packet (appleir, "received", data, len);
-+#endif
++ if (debug)
++ dump_packet(apple_ir, "received", data, len);
+
-+ if (len != 5)
-+ return;
++ if (len != 5)
++ return;
+
-+ if (!memcmp (data, keydown, sizeof (keydown)))
-+ {
-+ /*If we already have a key down, take it up before marking */
-+ /*this one down */
-+ if (appleir->current_key)
-+ key_up (appleir, appleir->current_key);
-+ appleir->current_key = keymap[(data[4] >> 1) & MAX_KEYS_MASK];
++ if (!memcmp(data, keydown, sizeof(keydown))) {
++ /*
++ * If we already have a key down, take it up before marking
++ * this one down.
++ */
++ mutex_lock(&apple_ir->current_key_lock);
+
-+ key_down (appleir, appleir->current_key);
-+ /*remote doesn't do key up, either pull them up, in the test */
-+ /*above, or here set a timer which pulls them up after 1/8 s */
-+ mod_timer (&appleir->key_up_timer, jiffies + HZ / 8);
++ if (apple_ir->current_key)
++ key_up(apple_ir, apple_ir->current_key);
++ apple_ir->current_key = keymap[(data[4] >> 1) & MAX_KEYS_MASK];
+
-+ return;
-+ }
++ key_down(apple_ir, apple_ir->current_key);
+
-+ if (!memcmp (data, keyrepeat, sizeof (keyrepeat)))
-+ {
-+ key_down (appleir, appleir->current_key);
-+ /*remote doesn't do key up, either pull them up, in the test */
-+ /*above, or here set a timer which pulls them up after 1/8 s */
-+ mod_timer (&appleir->key_up_timer, jiffies + HZ / 8);
-+ return;
-+ }
++ mutex_unlock(&apple_ir->current_key_lock);
+
-+ if (!memcmp (data, flatbattery, sizeof (flatbattery)))
-+ {
-+ battery_flat (appleir);
-+ /*Fall through */
-+ }
++ /*
++ * Remote doesn't do key up, either pull them up, in the test
++ * above, or here set a timer which pulls them up after 1/8 s
++ */
++ mod_timer(&apple_ir->key_up_timer, jiffies + HZ / 8);
+
-+ dump_packet (appleir, "unknown packet", data, len);
++ return;
++ }
++
++ if (!memcmp(data, keyrepeat, sizeof(keyrepeat))) {
++ mutex_lock(&apple_ir->current_key_lock);
++ key_down(apple_ir, apple_ir->current_key);
++ mutex_unlock(&apple_ir->current_key_lock);
++
++ /*
++ * Remote doesn't do key up, either pull them up, in the test
++ * above, or here set a timer which pulls them up after 1/8 s
++ */
++ mod_timer(&apple_ir->key_up_timer, jiffies + HZ / 8);
++ return;
++ }
++
++ if (!memcmp(data, flatbattery, sizeof(flatbattery))) {
++ battery_flat(apple_ir);
++ /* Fall through */
++ }
++
++ dump_packet(apple_ir, "unknown packet", data, len);
+}
+
-+static void
-+appleir_urb (struct urb *urb, struct pt_regs *regs)
++static void appleir_urb(struct urb *urb)
+{
-+ struct appleir *appleir = urb->context;
-+ int retval;
++ struct appleir *appleir = urb->context;
++ int retval;
+
-+ switch (urb->status)
-+ {
-+ case 0:
-+ new_data (appleir, urb->transfer_buffer, urb->actual_length);
-+ break;
-+ case -ECONNRESET:
-+ case -ENOENT:
-+ case -ESHUTDOWN:
-+ /* this urb is terminated, clean up */
-+ dbg ("%s - urb shutting down with status: %d", __FUNCTION__,
-+ urb->status);
-+ return;
-+ default:
-+ dbg ("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
-+ }
++ switch (urb->status) {
++ case 0:
++ parse_data(appleir, urb->transfer_buffer, urb->actual_length);
++ break;
++ case -ECONNRESET:
++ case -ENOENT:
++ case -ESHUTDOWN:
++ /* this urb is terminated, clean up */
++ dbg("%s - urb shutting down with status: %d",
++ __FUNCTION__, urb->status);
++ return;
++ default:
++ dbg("%s - nonzero urb status received: %d",
++ __FUNCTION__, urb->status);
++ }
+
-+ retval = usb_submit_urb (urb, GFP_ATOMIC);
-+ if (retval)
-+ err ("%s - usb_submit_urb failed with result %d", __FUNCTION__, retval);
++ retval = usb_submit_urb(urb, GFP_ATOMIC);
++ if (retval)
++ err("%s - usb_submit_urb failed with result %d",
++ __FUNCTION__, retval);
+}
+
+
-+static int
-+appleir_open (struct input_dev *dev)
++static int appleir_open(struct input_dev *dev)
+{
-+ struct appleir *appleir = dev->private;
++ struct appleir *appleir = dev->private;
+
-+ //appleir->urb->dev = appleir->usbdev;
++ if (usb_submit_urb(appleir->urb, GFP_KERNEL))
++ return -EIO;
+
-+ if (usb_submit_urb (appleir->urb, GFP_KERNEL))
-+ return -EIO;
-+
-+ return 0;
++ return 0;
+}
+
-+static void
-+appleir_close (struct input_dev *dev)
++static void appleir_close(struct input_dev *dev)
+{
-+ struct appleir *appleir = dev->private;
-+ usb_kill_urb (appleir->urb);
-+ del_timer_sync (&appleir->key_up_timer);
++ struct appleir *appleir = dev->private;
++ usb_kill_urb(appleir->urb);
++ del_timer_sync(&appleir->key_up_timer);
+}
+
-+
-+
-+
-+static int
-+appleir_probe (struct usb_interface *intf, const struct usb_device_id *id)
++static int appleir_probe(struct usb_interface *intf,
++ const struct usb_device_id *id)
+{
-+ struct usb_device *dev = interface_to_usbdev (intf);
-+ struct usb_endpoint_descriptor *endpoint;
-+ struct appleir *appleir = NULL;
-+ struct input_dev *input_dev;
-+ int i;
++ struct usb_device *dev = interface_to_usbdev(intf);
++ struct usb_endpoint_descriptor *endpoint;
++ struct appleir *appleir = NULL;
++ struct input_dev *input_dev;
++ int i;
+
-+ appleir = kzalloc (sizeof (struct appleir), GFP_KERNEL);
-+ if (!appleir)
-+ goto fail;
++ appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
++ if (!appleir)
++ goto fail;
+
-+ memset (appleir, 0, sizeof (struct appleir));
++ memset(appleir, 0, sizeof(struct appleir));
+
++ mutex_init(&appleir->current_key_lock);
+
-+ appleir->data =
-+ usb_buffer_alloc (dev, URB_SIZE, GFP_KERNEL, &appleir->dma_buf);
-+ if (!appleir->data)
-+ goto fail;
++ appleir->data =
++ usb_buffer_alloc(dev, URB_SIZE, GFP_KERNEL, &appleir->dma_buf);
++ if (!appleir->data)
++ goto fail_appleir;
+
-+ appleir->urb = usb_alloc_urb (0, GFP_KERNEL);
-+ if (!appleir->urb)
-+ goto fail;
++ appleir->urb = usb_alloc_urb(0, GFP_KERNEL);
++ if (!appleir->urb)
++ goto fail_buffer;
+
-+ appleir->usbdev = dev;
++ appleir->usbdev = dev;
+
-+ input_dev = input_allocate_device ();
-+ if (!input_dev)
-+ goto fail;
++ input_dev = input_allocate_device();
++ if (!input_dev)
++ goto fail_urb;
+
-+ appleir->dev = input_dev;
++ appleir->dev = input_dev;
+
++ usb_make_path(dev, appleir->phys, sizeof(appleir->phys));
++ strlcpy(appleir->phys, "/input0", sizeof(appleir->phys));
+
-+ usb_make_path (dev, appleir->phys, sizeof (appleir->phys));
-+ strlcpy (appleir->phys, "/input0", sizeof (appleir->phys));
++ input_dev->name = "Apple MacIntel infrared remote control driver";
++ input_dev->phys = appleir->phys;
++ usb_to_input_id(dev, &input_dev->id);
++ input_dev->cdev.dev = &intf->dev;
++ input_dev->private = appleir;
+
-+ input_dev->name = "Apple Mac mini infrared remote control driver";
-+ input_dev->phys = appleir->phys;
-+ usb_to_input_id (dev, &input_dev->id);
-+ input_dev->cdev.dev = &intf->dev;
-+ input_dev->private = appleir;
++ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
++ input_dev->ledbit[0] = 0;
+
-+ input_dev->evbit[0] = BIT (EV_KEY) | BIT (EV_REP);
-+ input_dev->ledbit[0] = 0;
++ for (i = 0; i < MAX_KEYS; i++) {
++ set_bit(keymap[i], input_dev->keybit);
++ }
+
-+ for (i = 0; i < MAX_KEYS; i++)
-+ {
-+ set_bit (keymap[i], input_dev->keybit);
-+ }
++ clear_bit(0, input_dev->keybit);
+
-+ clear_bit (0, input_dev->keybit);
++ input_dev->open = appleir_open;
++ input_dev->close = appleir_close;
+
-+ input_dev->open = appleir_open;
-+ input_dev->close = appleir_close;
++ endpoint = &intf->cur_altsetting->endpoint[0].desc;
+
-+ endpoint = &intf->cur_altsetting->endpoint[0].desc;
++ usb_fill_int_urb(appleir->urb, dev,
++ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
++ appleir->data, 8,
++ appleir_urb, appleir, endpoint->bInterval);
+
-+ usb_fill_int_urb (appleir->urb, dev,
-+ usb_rcvintpipe (dev, endpoint->bEndpointAddress),
-+ appleir->data, 8,
-+ appleir_urb, appleir, endpoint->bInterval);
++ appleir->urb->transfer_dma = appleir->dma_buf;
++ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
-+ appleir->urb->transfer_dma = appleir->dma_buf;
-+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
++ usb_set_intfdata(intf, appleir);
+
-+ usb_set_intfdata (intf, appleir);
++ init_timer(&appleir->key_up_timer);
+
-+ init_timer (&appleir->key_up_timer);
++ appleir->key_up_timer.function = key_up_tick;
++ appleir->key_up_timer.data = (unsigned long) appleir;
+
-+ appleir->key_up_timer.function = key_up_tick;
-+ appleir->key_up_timer.data = (unsigned long) appleir;
++ input_register_device(appleir->dev);
+
-+ appleir->timer_initted++;
++ return 0;
+
-+ input_register_device (appleir->dev);
++fail_timer:
++ del_timer_sync(&appleir->key_up_timer);
+
-+ return 0;
++fail_input_device:
++ input_free_device(appleir->dev);
+
-+fail:
++fail_urb:
++ usb_free_urb(appleir->urb);
+
-+ if (appleir)
-+ {
++fail_buffer:
++ usb_buffer_free(dev, URB_SIZE, appleir->data, appleir->dma_buf);
+
++fail_appleir:
++ kfree(appleir);
+
-+ if (appleir->data)
-+ usb_buffer_free (dev, URB_SIZE, appleir->data, appleir->dma_buf);
-+
-+ if (appleir->timer_initted)
-+ del_timer_sync (&appleir->key_up_timer);
-+
-+ if (appleir->dev)
-+ input_free_device (appleir->dev);
-+
-+ kfree (appleir);
-+ }
-+
-+ return -ENOMEM;
++fail:
++ return -ENOMEM;
+}
+
-+static void
-+appleir_disconnect (struct usb_interface *intf)
++static void appleir_disconnect(struct usb_interface *intf)
+{
-+ struct appleir *appleir = usb_get_intfdata (intf);
++ struct appleir *appleir = usb_get_intfdata(intf);
+
-+ usb_set_intfdata (intf, NULL);
-+ if (appleir)
-+ {
-+ input_unregister_device (appleir->dev);
-+ if (appleir->timer_initted)
-+ del_timer_sync (&appleir->key_up_timer);
-+ usb_kill_urb (appleir->urb);
-+ usb_free_urb (appleir->urb);
-+ usb_buffer_free (interface_to_usbdev (intf), URB_SIZE, appleir->data,
-+ appleir->dma_buf);
-+ kfree (appleir);
-+ }
++ usb_set_intfdata(intf, NULL);
++ if (appleir) {
++ input_unregister_device(appleir->dev);
++ del_timer_sync(&appleir->key_up_timer);
++ usb_kill_urb(appleir->urb);
++ usb_free_urb(appleir->urb);
++ usb_buffer_free(interface_to_usbdev(intf), URB_SIZE,
++ appleir->data, appleir->dma_buf);
++ kfree(appleir);
++ }
+}
+
+static struct usb_driver appleir_driver = {
-+ .name = "appleir",
-+ .probe = appleir_probe,
-+ .disconnect = appleir_disconnect,
-+ .id_table = appleir_ids,
++ .name = "appleir",
++ .probe = appleir_probe,
++ .disconnect = appleir_disconnect,
++ .id_table = appleir_ids,
+};
+
-+static int __init
-+appleir_init (void)
++static int __init appleir_init(void)
+{
-+ int retval;
-+ retval = usb_register (&appleir_driver);
-+ if (retval)
-+ goto out;
-+ info (DRIVER_VERSION ":" DRIVER_DESC);
-+out:
-+ return retval;
++ int retval;
++ retval = usb_register(&appleir_driver);
++ if (retval)
++ goto out;
++ info(DRIVER_VERSION ":" DRIVER_DESC);
++ out:
++ return retval;
+}
+
-+static void __exit
-+appleir_exit (void)
++static void __exit appleir_exit(void)
+{
-+ usb_deregister (&appleir_driver);
++ usb_deregister(&appleir_driver);
+}
+
-+module_init (appleir_init);
-+module_exit (appleir_exit);
++module_init(appleir_init);
++module_exit(appleir_exit);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Scott L. P. <pr...@df...> - 2007-04-14 13:45:34
|
Nope, I was just proved wrong. It happens whether or not I have the mactel patches applied. Scott =) Nicolas Boichat wrote: > Scott L. Price wrote: >> On my MacBook Pro 2,2 I am still having problems with the battery >> indicator. What happens is after a number of hours (less than 24 >> usually) my battery indicator goes to mostly 0: > >> crazyharry BAT0 # cat /proc/acpi/battery/BAT0/info >> present: yes >> design capacity: 0 mWh >> last full capacity: 0 mWh >> battery technology: rechargeable >> design voltage: 0 mV >> design capacity warning: 250 mWh >> design capacity low: 100 mWh >> capacity granularity 1: 10 mWh >> capacity granularity 2: 10 mWh >> model number: >> serial number: >> battery type: >> OEM info: > >> crazyharry BAT0 # cat /proc/acpi/battery/BAT0/state >> present: yes >> capacity state: ok >> charging state: charging >> present rate: 0 mW >> remaining capacity: 0 mWh >> present voltage: 0 mV > >> It stays there until I either reboot into MacOS, or reset the battery >> controller (remove battery and ac adapter and hold the power button down >> for 5 seconds). > >> I have seen this problem mentioned on the list before, but I was >> wondering if anyone has figured out what is going on to cause this problem. > > Interesting, if it happens with the latest kernel version, I think you > should file a bug in http://bugzilla.kernel.org/ . > > Best regards, > > Nicolas -- Electrical Engineering/Web Development Hunt Utilities Group LLC http://www.hugllc.com Pine River, MN (218) 587-5001 Hopkins, MN (952) 935-2418 |
|
From: Nicolas B. <ni...@bo...> - 2007-04-14 13:32:44
|
Hi again,
Richard Purdie wrote:
> Hi,
>
> On Sat, 2007-04-14 at 16:05 +0800, Nicolas Boichat wrote:
>
>> Bradley Hook wrote:
>>
>>> Slightly off-topic, but I've been experiencing a minor bug in the
>>> keyboard backlight feature.
>>>
>>> I say it is "minor" only because the feature serves no real functional
>>> purpose. You can activate a trigger called "heartbeat" that will cause
>>> the keyboard light to pulse at a speed based on the CPU usage. On my
>>> MBP17, after activating this trigger the machine will either lock-up
>>> or core dump within about a minute (timing is not consistent).
>>>
>>>
>> This is caused by the fact applesmc_backlight_set locks a mutex (or more
>> precisely sleeps while trying to lock a mutex) while being in a softirq
>> context.
>>
>> This might be obvious for others, but it was not for me, and there is
>> absolutely no mention in the documentation of the fact it is not always
>> safe to sleep in the brightness_set handler of a led_class device (it is
>> safe when it is called because someone wrote to the brightness sysfs file).
>>
>
> Its never safe for a brightness_set handler to sleep. They're designed
> to be called from interrupt context and as you've noted, several
> triggers do that.
>
> The solution if you have locks like your case is to offload the work to
> a workqueue, there is simply no other way to do it.
>
Ok, I used a workqueue. Andrew, please ignore the previous patch
("[PATCH] applesmc - fix crash when activating a led trigger on the
keyboard backlight"), and use this one instead, thanks.
> I'll have a look to see if I can improve the documentation (patches
> welcome).
>
>
>> Also, the led-trigger code seems buggy when it comes to locking. Setting
>> CONFIG_DEBUG_SPINLOCK_SLEEP causes a lot a warnings. The problem is that
>> the list of triggers is locked using a rw spinlock, but the rest of the
>> code seems to ignore that, and calls a lot of functions which can sleep
>> (kzalloc with GFP_KERNEL, sysfs_add_file, mutex_lock, etc...). I think
>> the list lock should be converted to a mutex (or maybe modified to use
>> RCU). I'm not very experienced in that domain, but if you want I can
>> provide a patch for this.
>>
>
> Someone else has mentioned this within the past few days and there is a
> problem with the trigger->activate and ->deactivate calls occurring
> within a spinlock. Its not a simple problem to solve unfortunately and
> you can't just convert to a mutex but I'm looking at it. Again, patches
> welcome but its going to need careful thought.
>
Ok you know your code better so maybe it's easier and better if you do
it. I'll tell you if I suddenly decide to work on that, so we don't
duplicate our work.
Best regards,
Nicolas
- Cannot sleep in led->brightness_set handler, as it might be called from a
softirq, so we use a workqueue to change the brightness (as recommended by
Richard Purdie)
- Reduce wait_status timetout from 100ms to 2ms, as wait_status either takes less
than 1.5 ms, or fails.
Signed-off-by: Nicolas Boichat <ni...@bo...>
---
drivers/hwmon/applesmc.c | 61 +++++++++++++++++++++++++++++++++++++---------
1 files changed, 49 insertions(+), 12 deletions(-)
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 4ec38ef..ea0a004 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -38,6 +38,7 @@
#include <asm/io.h>
#include <linux/leds.h>
#include <linux/hwmon.h>
+#include <linux/workqueue.h>
/* data port used by Apple SMC */
#define APPLESMC_DATA_PORT 0x300
@@ -116,7 +117,7 @@ struct dmi_match_data {
int temperature_set;
};
-static int debug = 0;
+static const int debug = 0;
static struct platform_device *pdev;
static s16 rest_x;
static s16 rest_y;
@@ -141,8 +142,10 @@ static struct mutex applesmc_lock;
*/
static unsigned int key_at_index;
+static struct workqueue_struct *applesmc_led_wq;
+
/*
- * __wait_status - Wait up to 100ms for the status port to get a certain value
+ * __wait_status - Wait up to 2ms for the status port to get a certain value
* (masked with 0x0f), returning zero if the value is obtained. Callers must
* hold applesmc_lock.
*/
@@ -152,9 +155,14 @@ static int __wait_status(u8 val)
val = val & APPLESMC_STATUS_MASK;
- for (i = 0; i < 10000; i++) {
- if ((inb(APPLESMC_CMD_PORT) & APPLESMC_STATUS_MASK) == val)
+ for (i = 0; i < 200; i++) {
+ if ((inb(APPLESMC_CMD_PORT) & APPLESMC_STATUS_MASK) == val) {
+ if (debug)
+ printk(KERN_DEBUG
+ "Waited %d us for status %x\n",
+ i*10, val);
return 0;
+ }
udelay(10);
}
@@ -721,17 +729,33 @@ static ssize_t applesmc_calibrate_store(struct device *dev,
return count;
}
-static void applesmc_backlight_set(struct led_classdev *led_cdev,
- enum led_brightness value)
+/* Store the next backlight value to be written by the work */
+static unsigned int backlight_value;
+
+static void applesmc_backlight_set(struct work_struct *work)
{
u8 buffer[2];
mutex_lock(&applesmc_lock);
- buffer[0] = value;
+ buffer[0] = backlight_value;
buffer[1] = 0x00;
applesmc_write_key(BACKLIGHT_KEY, buffer, 2);
mutex_unlock(&applesmc_lock);
}
+DECLARE_WORK(backlight_work, &applesmc_backlight_set);
+
+static void applesmc_brightness_set(struct led_classdev *led_cdev,
+ enum led_brightness value)
+{
+ int ret;
+
+ backlight_value = value;
+ ret = queue_work(applesmc_led_wq, &backlight_work);
+
+ if (debug && (!ret)) {
+ printk(KERN_DEBUG "applesmc: work was already on the queue.\n");
+ }
+}
static ssize_t applesmc_key_count_show(struct device *dev,
struct device_attribute *attr, char *sysfsbuf)
@@ -887,7 +911,7 @@ static ssize_t applesmc_key_at_index_store(struct device *dev,
static struct led_classdev applesmc_backlight = {
.name = "smc:kbd_backlight",
.default_trigger = "nand-disk",
- .brightness_set = applesmc_backlight_set,
+ .brightness_set = applesmc_brightness_set,
};
static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
@@ -1234,25 +1258,35 @@ static int __init applesmc_init(void)
if (ret)
goto out_accelerometer;
+ /* Create the workqueue */
+ applesmc_led_wq = create_singlethread_workqueue("applesmc-led");
+ if (!applesmc_led_wq) {
+ ret = -ENOMEM;
+ goto out_light_sysfs;
+ }
+
/* register as a led device */
ret = led_classdev_register(&pdev->dev, &applesmc_backlight);
if (ret < 0)
- goto out_light_sysfs;
+ goto out_light_wq;
}
hwmon_class_dev = hwmon_device_register(&pdev->dev);
if (IS_ERR(hwmon_class_dev)) {
ret = PTR_ERR(hwmon_class_dev);
- goto out_light;
+ goto out_light_ledclass;
}
printk(KERN_INFO "applesmc: driver successfully loaded.\n");
return 0;
-out_light:
+out_light_ledclass:
if (applesmc_light)
led_classdev_unregister(&applesmc_backlight);
+out_light_wq:
+ if (applesmc_light)
+ destroy_workqueue(applesmc_led_wq);
out_light_sysfs:
if (applesmc_light)
sysfs_remove_file(&pdev->dev.kobj, &dev_attr_light.attr);
@@ -1280,8 +1314,11 @@ out:
static void __exit applesmc_exit(void)
{
hwmon_device_unregister(hwmon_class_dev);
- if (applesmc_light)
+ if (applesmc_light) {
led_classdev_unregister(&applesmc_backlight);
+ destroy_workqueue(applesmc_led_wq);
+ sysfs_remove_file(&pdev->dev.kobj, &dev_attr_light.attr);
+ }
if (applesmc_accelerometer)
applesmc_release_accelerometer();
sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group);
|
|
From: Miguel S. F. <mig...@gm...> - 2007-04-14 12:12:44
|
Hi, On 4/12/07, Sven Anders <an...@an...> wrote: > Miguel Sousa Filipe schrieb: > > Hi all, > > > > I too only have C1 and C2 states. > > Does it change, if you remove the battery? I removed the power cord (on battery), and now the C3 state appears.! > Which firmware revision do you use? Is it the latest? how can I check that? > Do you have an MacBook, Pro, 17"? No, its a MacBook Pro 15.4", 1st generation (Core Duo @ 2.0ghz) Best regards, -- Miguel Sousa Filipe |
|
From: Miguel S. F. <mig...@gm...> - 2007-04-14 12:06:50
|
On 4/13/07, Kai Weber <kai...@gl...> wrote: > * Miguel Sousa Filipe <mig...@gm...>: > > > Several people (me included) miss updated .config files in the SVN > > repository. > > > > What I would really like, would be to have a .config for each > > particular model in respect to hardware. > > What about other kernel features like LVM, IPV6, initrd, module support > yes/no? What should be included? Maybe a list, of what has to be enabled > for support leaving out the other infos would be the way to go. > Everything has a module seems to be the answer for that. (except drivers needed at ealy boot time) > Kai > -- > * http://www.glorybox.de/ > PGP 1024D/594D4132 B693 5073 013F 7F56 5DCC D9C2 E6B5 448C 594D 4132 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Mactel-linux-devel mailing list > Mac...@li... > https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel > -- Miguel Sousa Filipe |
|
From: franklinnyqp <fra...@ho...> - 2007-04-14 09:58:26
|
Hillo2 dad |
|
From: Richard P. <rp...@rp...> - 2007-04-14 08:46:02
|
Hi, On Sat, 2007-04-14 at 16:05 +0800, Nicolas Boichat wrote: > Bradley Hook wrote: > > Slightly off-topic, but I've been experiencing a minor bug in the > > keyboard backlight feature. > > > > I say it is "minor" only because the feature serves no real functional > > purpose. You can activate a trigger called "heartbeat" that will cause > > the keyboard light to pulse at a speed based on the CPU usage. On my > > MBP17, after activating this trigger the machine will either lock-up > > or core dump within about a minute (timing is not consistent). > > > > This is caused by the fact applesmc_backlight_set locks a mutex (or more > precisely sleeps while trying to lock a mutex) while being in a softirq > context. > > This might be obvious for others, but it was not for me, and there is > absolutely no mention in the documentation of the fact it is not always > safe to sleep in the brightness_set handler of a led_class device (it is > safe when it is called because someone wrote to the brightness sysfs file). Its never safe for a brightness_set handler to sleep. They're designed to be called from interrupt context and as you've noted, several triggers do that. The solution if you have locks like your case is to offload the work to a workqueue, there is simply no other way to do it. I'll have a look to see if I can improve the documentation (patches welcome). > Also, the led-trigger code seems buggy when it comes to locking. Setting > CONFIG_DEBUG_SPINLOCK_SLEEP causes a lot a warnings. The problem is that > the list of triggers is locked using a rw spinlock, but the rest of the > code seems to ignore that, and calls a lot of functions which can sleep > (kzalloc with GFP_KERNEL, sysfs_add_file, mutex_lock, etc...). I think > the list lock should be converted to a mutex (or maybe modified to use > RCU). I'm not very experienced in that domain, but if you want I can > provide a patch for this. Someone else has mentioned this within the past few days and there is a problem with the trigger->activate and ->deactivate calls occurring within a spinlock. Its not a simple problem to solve unfortunately and you can't just convert to a mutex but I'm looking at it. Again, patches welcome but its going to need careful thought. Cheers, Richard |
|
From: Nicolas B. <ni...@bo...> - 2007-04-14 08:06:18
|
Hi,
I got this bug report a while ago:
Bradley Hook wrote:
> Slightly off-topic, but I've been experiencing a minor bug in the
> keyboard backlight feature.
>
> I say it is "minor" only because the feature serves no real functional
> purpose. You can activate a trigger called "heartbeat" that will cause
> the keyboard light to pulse at a speed based on the CPU usage. On my
> MBP17, after activating this trigger the machine will either lock-up
> or core dump within about a minute (timing is not consistent).
>
This is caused by the fact applesmc_backlight_set locks a mutex (or more
precisely sleeps while trying to lock a mutex) while being in a softirq
context.
This might be obvious for others, but it was not for me, and there is
absolutely no mention in the documentation of the fact it is not always
safe to sleep in the brightness_set handler of a led_class device (it is
safe when it is called because someone wrote to the brightness sysfs file).
So, with the patch below, in case the mutex is locked for another
operation, the "brightness_set" called by the led trigger is simply
ignored. I don't think it is the behaviour we want, and I think it would
be a good idea to try again a little while afterwards. Richard, would
you like me to provide a patch for this? It would imply adding a
parameter to brightness_set indicating whether it's safe to sleep or
not, make it return an int, and modify the triggers code to retry if the
return value indicates an error.
Also, the led-trigger code seems buggy when it comes to locking. Setting
CONFIG_DEBUG_SPINLOCK_SLEEP causes a lot a warnings. The problem is that
the list of triggers is locked using a rw spinlock, but the rest of the
code seems to ignore that, and calls a lot of functions which can sleep
(kzalloc with GFP_KERNEL, sysfs_add_file, mutex_lock, etc...). I think
the list lock should be converted to a mutex (or maybe modified to use
RCU). I'm not very experienced in that domain, but if you want I can
provide a patch for this.
Best regards,
Nicolas
Cannot sleep in led->brightness_set handler if it is called from a softirq.
Reduce wait_status timetout from 100ms to 2ms, as wait_status either takes less
than 1.5 ms, or fails.
Signed-off-by: Nicolas Boichat <ni...@bo...>
---
drivers/hwmon/applesmc.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 4ec38ef..c93c290 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -142,7 +142,7 @@ static struct mutex applesmc_lock;
static unsigned int key_at_index;
/*
- * __wait_status - Wait up to 100ms for the status port to get a certain value
+ * __wait_status - Wait up to 2ms for the status port to get a certain value
* (masked with 0x0f), returning zero if the value is obtained. Callers must
* hold applesmc_lock.
*/
@@ -152,9 +152,14 @@ static int __wait_status(u8 val)
val = val & APPLESMC_STATUS_MASK;
- for (i = 0; i < 10000; i++) {
- if ((inb(APPLESMC_CMD_PORT) & APPLESMC_STATUS_MASK) == val)
+ for (i = 0; i < 200; i++) {
+ if ((inb(APPLESMC_CMD_PORT) & APPLESMC_STATUS_MASK) == val) {
+ if (debug)
+ printk(KERN_DEBUG
+ "Waited %d us for status %x\n",
+ i*10, val);
return 0;
+ }
udelay(10);
}
@@ -725,8 +730,18 @@ static void applesmc_backlight_set(struct led_classdev *led_cdev,
enum led_brightness value)
{
u8 buffer[2];
-
- mutex_lock(&applesmc_lock);
+
+ if (in_interrupt()) {
+ /* Cannot sleep, as we are called from a timer. */
+ if (!mutex_trylock(&applesmc_lock)) {
+ printk(KERN_ERR "applesmc: Could not set the backlight,"
+ " mutex is locked.\n");
+ return;
+ }
+ } else {
+ mutex_lock(&applesmc_lock);
+ }
+
buffer[0] = value;
buffer[1] = 0x00;
applesmc_write_key(BACKLIGHT_KEY, buffer, 2);
|
|
From: Scott L. P. <pr...@df...> - 2007-04-14 00:35:17
|
So far from my preliminary testing the battery indicator doesn't seem to go away if I don't load the applesmc module. I will have to test it a couple of days more to be sure, but the battery information usually went away within 6 hours. It has been more than 24 hours now and I still have it. Scott =) Nicolas Boichat wrote: > Scott L. Price wrote: >> On my MacBook Pro 2,2 I am still having problems with the battery >> indicator. What happens is after a number of hours (less than 24 >> usually) my battery indicator goes to mostly 0: > >> crazyharry BAT0 # cat /proc/acpi/battery/BAT0/info >> present: yes >> design capacity: 0 mWh >> last full capacity: 0 mWh >> battery technology: rechargeable >> design voltage: 0 mV >> design capacity warning: 250 mWh >> design capacity low: 100 mWh >> capacity granularity 1: 10 mWh >> capacity granularity 2: 10 mWh >> model number: >> serial number: >> battery type: >> OEM info: > >> crazyharry BAT0 # cat /proc/acpi/battery/BAT0/state >> present: yes >> capacity state: ok >> charging state: charging >> present rate: 0 mW >> remaining capacity: 0 mWh >> present voltage: 0 mV > >> It stays there until I either reboot into MacOS, or reset the battery >> controller (remove battery and ac adapter and hold the power button down >> for 5 seconds). > >> I have seen this problem mentioned on the list before, but I was >> wondering if anyone has figured out what is going on to cause this problem. > > Interesting, if it happens with the latest kernel version, I think you > should file a bug in http://bugzilla.kernel.org/ . > > Best regards, > > Nicolas -- Electrical Engineering/Web Development Hunt Utilities Group LLC http://www.hugllc.com Pine River, MN (218) 587-5001 Hopkins, MN (952) 935-2418 |
|
From: Kai W. <kai...@gl...> - 2007-04-13 17:54:00
|
* Miguel Sousa Filipe <mig...@gm...>: > Several people (me included) miss updated .config files in the SVN > repository. > > What I would really like, would be to have a .config for each > particular model in respect to hardware. What about other kernel features like LVM, IPV6, initrd, module support yes/no? What should be included? Maybe a list, of what has to be enabled for support leaving out the other infos would be the way to go. Kai -- * http://www.glorybox.de/ PGP 1024D/594D4132 B693 5073 013F 7F56 5DCC D9C2 E6B5 448C 594D 4132 |
|
From: Miguel S. F. <mig...@gm...> - 2007-04-13 16:52:58
|
Hi all, Several people (me included) miss updated .config files in the SVN repository. What I would really like, would be to have a .config for each particular model in respect to hardware. for instance: Macbook Pro 15.4 Core Duo (1st ed.) and Core 2 Duo have different hardware, so they should/could get diferent configs. Also, Macbook Pro and Macbook have different video cards. If possible, and if the kernel options don't conflict we could have a "master config" that would apply to any Intel Mac out there. but if not, specific config files based on hardware models would suffice. I say this because in the 2.6.17 days there was a good config file in the SVN repo that I used has a basis for my kernel config, and it was a great kernel setup. For more recent versions, the kernel config got outdated, and I ended up with a "poorly" configured kernel. Could someone provide recent 2.6.20 kernel config files for: - Macbook Pro 15.4" - Intel Core Duo + 802.11g (first revision) - Macbook Pro 15.4" - Intel Core 2 Duo + pre-802.11n (second revision?) - Macbook - Intel MacMini ..and others.. feel free to share... these configs should go in the SVN Repo.. after a "triage" and a selection, no? Best regards! -- Miguel Sousa Filipe |
|
From: Nick H. <li...@gm...> - 2007-04-13 00:39:25
|
On 13/04/07, Sven Anders <an...@an...> wrote:
>
> Miguel Sousa Filipe schrieb:
> > Hi all,
> >
> > I too only have C1 and C2 states.
>
> Does it change, if you remove the battery?
> Which firmware revision do you use? Is it the latest?
> Do you have an MacBook, Pro, 17"?
>
> Regards
> Sven
>
hi guys. just thought i'd throw some data in here too. i've got a 15" MBP
C2D, and with or without the battery, i only have states C1 and C2:
nick@wombat:~> cat /proc/acpi/processor/CPU?/power
active state: C2
max_cstate: C8
bus master activity: 00000000
states:
C1: type[C1] promotion[C2] demotion[--] latency[000]
usage[00000010] duration[00000000000000000000]
*C2: type[C2] promotion[--] demotion[C1] latency[001]
usage[00519404] duration[00000000002241198284]
active state: C2
max_cstate: C8
bus master activity: 00000000
states:
C1: type[C1] promotion[C2] demotion[--] latency[000]
usage[00000010] duration[00000000000000000000]
*C2: type[C2] promotion[--] demotion[C1] latency[001]
usage[00519437] duration[00000000002339078849]
nick@wombat:~>
how can i determine which firmware revision i'm using?
-Nick
|
|
From: Sven A. <an...@an...> - 2007-04-12 18:48:46
|
Miguel Sousa Filipe schrieb:
> Hi all,
>
> I too only have C1 and C2 states.
Does it change, if you remove the battery?
Which firmware revision do you use? Is it the latest?
Do you have an MacBook, Pro, 17"?
Regards
Sven
--
Sven Anders <an...@an...> () Ascii Ribbon Campaign
/\ Support plain text e-mail
ANDURAS service solutions AG
Innstraße 71 - 94036 Passau - Germany
Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 50-55
Rechtsform: Aktiengesellschaft - Sitz: Passau - Amtsgericht Passau HRB 6032
Mitglieder des Vorstands: Sven Anders, Marcus Junker
Vorsitzender des Aufsichtsrats: Dipl. Kfm. Thomas Träger
|
|
From: <hu...@us...> - 2007-04-12 16:38:59
|
Revision: 115
http://svn.sourceforge.net/mactel-linux/?rev=115&view=rev
Author: huceke
Date: 2007-04-12 09:38:57 -0700 (Thu, 12 Apr 2007)
Log Message:
-----------
Delete old kernel
Modified Paths:
--------------
trunk/mach_linux_boot/gen_header.c
Removed Paths:
-------------
trunk/mach_linux_boot/bzimage.h
Deleted: trunk/mach_linux_boot/bzimage.h
===================================================================
--- trunk/mach_linux_boot/bzimage.h 2007-04-12 16:38:05 UTC (rev 114)
+++ trunk/mach_linux_boot/bzimage.h 2007-04-12 16:38:57 UTC (rev 115)
@@ -1,73448 +0,0 @@
-#ifndef _BZIMAGE_
-#define _BZIMAGE_
-
-
-long lKernel = 1468720;
-unsigned char szKernel[] = {
-
-0x66, 0xEA, 0x08, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x8C, 0xC8, 0x8E, 0xD8, 0x8E, 0xC0, 0x8E, 0xD0, 0xBC, 0x00, 0x7C, 0xFB,
-0xFC, 0xBE, 0x31, 0x00, 0xAC, 0x20, 0xC0, 0x74, 0x09, 0xB4, 0x0E, 0xBB, 0x07, 0x00, 0xCD, 0x10, 0xEB, 0xF2, 0x31, 0xC0,
-0xCD, 0x16, 0xCD, 0x19, 0xEA, 0xF0, 0xFF, 0x00, 0xF0, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x20, 0x62, 0x6F, 0x6F, 0x74,
-0x69, 0x6E, 0x67, 0x20, 0x66, 0x72, 0x6F, 0x6D, 0x20, 0x66, 0x6C, 0x6F, 0x70, 0x70, 0x79, 0x20, 0x69, 0x73, 0x20, 0x6E,
-0x6F, 0x20, 0x6C, 0x6F, 0x6E, 0x67, 0x65, 0x72, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6F, 0x72, 0x74, 0x65, 0x64, 0x2E, 0x0D,
-0x0A, 0x50, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x20, 0x62, 0x6F, 0x6F, 0x74, 0x20, 0x6C,
-0x6F, 0x61, 0x64, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x20, 0x69, 0x6E, 0x73, 0x74, 0x65, 0x61,
-0x64, 0x2E, 0x0D, 0x0A, 0x0A, 0x52, 0x65, 0x6D, 0x6F, 0x76, 0x65, 0x20, 0x64, 0x69, 0x73, 0x6B, 0x20, 0x61, 0x6E, 0x64,
-0x20, 0x70, 0x72, 0x65, 0x73, 0x73, 0x20, 0x61, 0x6E, 0x79, 0x20, 0x6B, 0x65, 0x79, 0x20, 0x74, 0x6F, 0x20, 0x72, 0x65,
-0x62, 0x6F, 0x6F, 0x74, 0x20, 0x2E, 0x20, 0x2E, 0x20, 0x2E, 0x0D, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x01, 0x00,
-0xB3, 0x64, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x55, 0xAA, 0xEB, 0x36, 0x48, 0x64, 0x72, 0x53, 0x05, 0x02,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xC2, 0x10, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x1F,
-0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE8, 0xC5, 0x0C, 0x90, 0x8D, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x8E,
-0xD8, 0x2E, 0xF6, 0x06, 0x11, 0x00, 0x01, 0x74, 0x2E, 0x2E, 0x80, 0x3E, 0x10, 0x00, 0x00, 0x75, 0x26, 0x0E, 0x1F, 0x8D,
-0x36, 0xD0, 0x0D, 0xE8, 0x4F, 0xFF, 0xEB, 0xDB, 0x57, 0x72, 0x6F, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x61, 0x64, 0x65, 0x72,
-0x2C, 0x20, 0x67, 0x69, 0x76, 0x69, 0x6E, 0x67, 0x20, 0x75, 0x70, 0x2E, 0x2E, 0x2E, 0x00, 0x66, 0x31, 0xC0, 0x66, 0xA3,
-0xE0, 0x01, 0xA2, 0xE8, 0x01, 0x66, 0x31, 0xDB, 0xBF, 0xD0, 0x02, 0x66, 0xB8, 0x20, 0xE8, 0x00, 0x00, 0x66, 0xBA, 0x50,
-0x41, 0x4D, 0x53, 0x66, 0xB9, 0x14, 0x00, 0x00, 0x00, 0x1E, 0x07, 0xCD, 0x15, 0x72, 0x20, 0x66, 0x3D, 0x50, 0x41, 0x4D,
-0x53, 0x75, 0x18, 0xA0, 0xE8, 0x01, 0x3C, 0x80, 0x73, 0x11, 0xFE, 0x06, 0xE8, 0x01, 0x89, 0xF8, 0x83, 0xC0, 0x14, 0x89,
-0xC7, 0x66, 0x83, 0xFB, 0x00, 0x75, 0xC8, 0xF9, 0x31, 0xC9, 0x31, 0xD2, 0xB8, 0x01, 0xE8, 0xCD, 0x15, 0x72, 0x2A, 0x83,
-0xF9, 0x00, 0x75, 0x09, 0x83, 0xFA, 0x00, 0x75, 0x04, 0x89, 0xC1, 0x89, 0xDA, 0x66, 0x81, 0xE2, 0xFF, 0xFF, 0x00, 0x00,
-0x66, 0xC1, 0xE2, 0x06, 0x66, 0x89, 0x16, 0xE0, 0x01, 0x66, 0x81, 0xE1, 0xFF, 0xFF, 0x00, 0x00, 0x66, 0x01, 0x0E, 0xE0,
-0x01, 0xB4, 0x88, 0xCD, 0x15, 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-0x10, 0x00, 0x00, 0x10, 0x00, 0xB8, 0x18, 0x00, 0x00, 0x00, 0x8E, 0xD8, 0x8E, 0xC0, 0x8E, 0xE0, 0x8E, 0xE8, 0x8E, 0xD0,
-0x31, 0xC0, 0x40, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x39, 0x05, 0x00, 0x00, 0x10, 0x00, 0x74, 0xF2, 0xFF, 0xA6, 0x14, 0x02,
-0x00, 0x00, 0x32, 0x2E, 0x36, 0x2E, 0x32, 0x30, 0x2E, 0x34, 0x2D, 0x6D, 0x61, 0x63, 0x74, 0x65, 0x6C, 0x20, 0x28, 0x72,
-0x6F, 0x6F, 0x74, 0x40, 0x61, 0x74, 0x68, 0x6C, 0x6F, 0x6E, 0x78, 0x32, 0x29, 0x20, 0x23, 0x36, 0x33, 0x20, 0x54, 0x68,
-0x75, 0x20, 0x41, 0x70, 0x72, 0x20, 0x35, 0x20, 0x31, 0x37, 0x3A, 0x32, 0x33, 0x3A, 0x35, 0x34, 0x20, 0x55, 0x54, 0x43,
-0x20, 0x32, 0x30, 0x30, 0x37, 0x00, 0xFA, 0xB0, 0x80, 0xE6, 0x70, 0xCB, 0x51, 0x50, 0x31, 0xC9, 0x8E, 0xE1, 0x49, 0x8E,
-0xE9, 0xB9, 0x20, 0x00, 0x64, 0xA1, 0x00, 0x02, 0x50, 0x40, 0x64, 0xA3, 0x00, 0x02, 0xE8, 0x45, 0x00, 0x65, 0x3B, 0x06,
-0x10, 0x02, 0xE1, 0xF1, 0x64, 0x8F, 0x06, 0x00, 0x02, 0x58, 0x59, 0xC3, 0x66, 0x51, 0x66, 0xB9, 0xA0, 0x86, 0x01, 0x00,
-0x66, 0x49, 0x74, 0x14, 0xE8, 0x27, 0x00, 0xE4, 0x64, 0xA8, 0x01, 0x74, 0x07, 0xE8, 0x1E, 0x00, 0xE4, 0x60, 0xEB, 0xEC,
-0xA8, 0x02, 0x75, 0xE8, 0x66, 0x59, 0xC3, 0x51, 0xB4, 0x02, 0xCD, 0x1A, 0x88, 0xF0, 0x24, 0x0F, 0x88, 0xF4, 0xB1, 0x04,
-0xD2, 0xEC, 0xD5, 0x0A, 0x59, 0xC3, 0xE6, 0x80, 0xC3, 0x8D, 0x74, 0x00, 0x8D, 0xBD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x9A, 0xCF, 0x00,
-0xFF, 0xFF, 0x00, 0x00, 0x00, 0x92, 0xCF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x1E, 0x0F, 0xA1, 0x0E, 0x1F, 0x0E, 0x07, 0x31, 0xC0, 0x8E, 0xE8, 0xFC, 0xE8, 0x23, 0x00,
-0x64, 0xA1, 0xFA, 0x01, 0x83, 0xF8, 0xFD, 0x74, 0x0C, 0xE8, 0xE9, 0x02, 0x72, 0x0A, 0x8D, 0x36, 0x57, 0x1A, 0xE8, 0x58,
-0xFB, 0xE8, 0x65, 0x01, 0xE8, 0x49, 0x05, 0xE8, 0xD2, 0x07, 0xE8, 0x2F, 0x00, 0x1F, 0xC3, 0x64, 0xC6, 0x06, 0x0F, 0x00,
-0x00, 0xB4, 0x12, 0xB3, 0x10, 0xCD, 0x10, 0x64, 0x89, 0x1E, 0x0A, 0x00, 0x80, 0xFB, 0x10, 0x74, 0x16, 0xFE, 0x06, 0xEE,
-0x1A, 0xB8, 0x00, 0x1A, 0xCD, 0x10, 0x3C, 0x1A, 0x75, 0x09, 0x64, 0xFE, 0x06, 0x0F, 0x00, 0xFE, 0x06, 0xEE, 0x1A, 0xC3,
-0x80, 0x3E, 0xAE, 0x19, 0x00, 0x75, 0x4F, 0xB4, 0x03, 0x30, 0xFF, 0xCD, 0x10, 0x64, 0x89, 0x16, 0x00, 0x00, 0xB4, 0x0F,
-0xCD, 0x10, 0x64, 0x89, 0x1E, 0x04, 0x00, 0x64, 0xA3, 0x06, 0x00, 0x3C, 0x07, 0x75, 0x06, 0xC7, 0x06, 0xEF, 0x1A, 0x00,
-0xB0, 0x65, 0xA1, 0x85, 0x04, 0x64, 0xA3, 0x10, 0x00, 0xA1, 0xF1, 0x1A, 0x09, 0xC0, 0x74, 0x0A, 0x64, 0x88, 0x26, 0x07,
-0x00, 0x64, 0xA2, 0x0E, 0x00, 0xC3, 0xB0, 0x19, 0x80, 0x3E, 0xEE, 0x1A, 0x00, 0x74, 0x06, 0x65, 0xA0, 0x84, 0x04, 0xFE,
-0xC0, 0x64, 0xA2, 0x0E, 0x00, 0xC3, 0x8D, 0x3E, 0xF7, 0x1E, 0x64, 0xC6, 0x06, 0x0F, 0x00, 0x23, 0x8B, 0x45, 0x10, 0x64,
-0xA3, 0x24, 0x00, 0x8B, 0x45, 0x12, 0x64, 0xA3, 0x12, 0x00, 0x8B, 0x45, 0x14, 0x64, 0xA3, 0x14, 0x00, 0x8A, 0x45, 0x19,
-0xB4, 0x00, 0x64, 0xA3, 0x16, 0x00, 0x8A, 0x45, 0x1D, 0xB4, 0x00, 0x64, 0xA3, 0x32, 0x00, 0x66, 0x8B, 0x45, 0x28, 0x66,
-0x64, 0xA3, 0x18, 0x00, 0x66, 0x8B, 0x45, 0x1F, 0x66, 0x64, 0xA3, 0x26, 0x00, 0x66, 0x8B, 0x45, 0x23, 0x66, 0x64, 0xA3,
-0x2A, 0x00, 0x8B, 0x05, 0x64, 0xA3, 0x34, 0x00, 0x8D, 0x3E, 0xF7, 0x1E, 0xB8, 0x00, 0x4F, 0xCD, 0x10, 0x66, 0x31, 0xC0,
-0x8B, 0x45, 0x12, 0x66, 0x64, 0xA3, 0x1C, 0x00, 0x66, 0x8B, 0x45, 0x0A, 0x66, 0x64, 0xA3, 0x36, 0x00, 0x64, 0xA1, 0x16,
-0x00, 0x83, 0xF8, 0x08, 0x7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x3C, 0x7C, 0x02, 0x2C,
-0x3C, 0x88, 0xC1, 0xB4, 0x01, 0xCD, 0x16, 0x75, 0xE8, 0xE8, 0x03, 0xF8, 0x38, 0xC8, 0x75, 0xF3, 0xB0, 0x20, 0xC3, 0xB4,
-0x01, 0xCD, 0x16, 0x74, 0x06, 0x30, 0xE4, 0xCD, 0x16, 0xEB, 0xF4, 0xC3, 0x50, 0x88, 0xE0, 0xE8, 0x01, 0x00, 0x58, 0x50,
-0xC0, 0xE8, 0x04, 0xE8, 0x03, 0x00, 0x58, 0x24, 0x0F, 0x3C, 0x0A, 0x72, 0x02, 0x04, 0x07, 0x04, 0x30, 0xE9, 0xAD, 0xF3,
-0x50, 0x51, 0x30, 0xE4, 0xB1, 0x0A, 0xF6, 0xF9, 0x3C, 0x09, 0x76, 0x05, 0xE8, 0xF1, 0xFF, 0xEB, 0x05, 0x04, 0x30, 0xE8,
-0x97, 0xF3, 0x88, 0xE0, 0x04, 0x30, 0xE8, 0x90, 0xF3, 0x59, 0x58, 0xC3, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x50, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3C, 0x52, 0x45, 0x54, 0x55, 0x52,
-0x4E, 0x3E, 0x20, 0x74, 0x6F, 0x20, 0x73, 0x65, 0x65, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x20, 0x6D, 0x6F, 0x64, 0x65,
-0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6C, 0x61, 0x62, 0x6C, 0x65, 0x2C, 0x20, 0x3C, 0x53, 0x50, 0x41, 0x43, 0x45, 0x3E,
-0x20, 0x74, 0x6F, 0x20, 0x63, 0x6F, 0x6E, 0x74, 0x69, 0x6E, 0x75, 0x65, 0x20, 0x6F, 0x72, 0x20, 0x77, 0x61, 0x69, 0x74,
-0x20, 0x33, 0x30, 0x20, 0x73, 0x65, 0x63, 0x73, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x4D, 0x6F, 0x64, 0x65, 0x3A, 0x20, 0x20,
-0x20, 0x20, 0x43, 0x4F, 0x4C, 0x53, 0x78, 0x52, 0x4F, 0x57, 0x53, 0x3A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x45, 0x6E, 0x74,
-0x65, 0x72, 0x20, 0x6D, 0x6F, 0x64, 0x65, 0x20, 0x6E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x20, 0x6F, 0x72, 0x20, 0x60, 0x73,
-0x63, 0x61, 0x6E, 0x27, 0x3A, 0x20, 0x00, 0x55, 0x6E, 0x6B, 0x6E, 0x6F, 0x77, 0x6E, 0x20, 0x6D, 0x6F, 0x64, 0x65, 0x20,
-0x49, 0x44, 0x2E, 0x20, 0x54, 0x72, 0x79, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6E, 0x2E, 0x00, 0x59, 0x6F, 0x75, 0x20, 0x70,
-0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x61, 0x6E, 0x20, 0x75, 0x6E, 0x64, 0x65, 0x66, 0x69, 0x6E, 0x65, 0x64, 0x20, 0x6D,
-0x6F, 0x64, 0x65, 0x20, 0x6E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x2E, 0x0D, 0x0A, 0x00, 0x45, 0x72, 0x72, 0x6F, 0x72, 0x3A,
-0x20, 0x53, 0x63, 0x61, 0x6E, 0x6E, 0x69, 0x6E, 0x67, 0x20, 0x6F, 0x66, 0x20, 0x56, 0x45, 0x53, 0x41, 0x20, 0x6D, 0x6F,
-0x64, 0x65, 0x73, 0x20, 0x66, 0x61, 0x69, 0x6C, 0x65, 0x64, 0x2E, 0x20, 0x50, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x20, 0x72,
-0x65, 0x70, 0x6F, 0x72, 0x74, 0x20, 0x74, 0x6F, 0x20, 0x3C, 0x6D, 0x6A, 0x40, 0x75, 0x63, 0x77, 0x2E, 0x63, 0x7A, 0x3E,
-0x2E, 0x0D, 0x0A, 0x00, 0x43, 0x47, 0x41, 0x2F, 0x4D, 0x44, 0x41, 0x2F, 0x48, 0x47, 0x41, 0x00, 0x45, 0x47, 0x41, 0x00,
-0x20, 0x56, 0x47, 0x41, 0x00, 0x56, 0x45, 0x53, 0x41, 0x00, 0x56, 0x69, 0x64, 0x65, 0x6F, 0x20, 0x61, 0x64, 0x61, 0x70,
-0x74, 0x65, 0x72, 0x3A, 0x20, 0x00, 0x00, 0x00, 0xB8, 0x00, 0x00, 0x55, 0xAA, 0x5A, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFC, 0xFA, 0xB8, 0x18, 0x00, 0x00, 0x00, 0x8E, 0xD8, 0x8E, 0xC0, 0x8E, 0xE0, 0x8E, 0xE8, 0x8E, 0xD0, 0x8D, 0x66, 0x40,
-0xE8, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x81, 0xED, 0x19, 0x00, 0x00, 0x00, 0xBB, 0x00, 0x00, 0x10, 0x00, 0x2B, 0x9D, 0x6E,
-0x00, 0x00, 0x00, 0x8B, 0x85, 0xD2, 0x29, 0x16, 0x00, 0x01, 0xC3, 0xC1, 0xE8, 0x0C, 0x01, 0xC3, 0x81, 0xC3, 0x12, 0x80,
-0x00, 0x00, 0x81, 0xC3, 0xFF, 0x0F, 0x00, 0x00, 0x81, 0xE3, 0x00, 0xF0, 0xFF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, 0x14, 0x16, 0x65, 0xF9, 0x72, 0x58, 0x8C, 0xC6, 0x8C, 0xA9, 0xDF, 0x69, 0xC1,
-0xF6, 0x35, 0x41, 0xF5, 0x3B, 0xBC, 0xCD, 0x63, 0x17, 0x00, 0x9A, 0x8C, 0xB0, 0x96, 0xCE, 0x0E, 0xB6, 0x6F, 0x4C, 0x3D,
-0x6B, 0x8C, 0x68, 0x96, 0xBC, 0xFA, 0xE5, 0x96, 0xC9, 0xA6, 0x37, 0xE2, 0x50, 0x6F, 0xEC, 0x3D, 0xAB, 0x14, 0x9C, 0x04,
-0xEB, 0x50, 0x30, 0x2E, 0xA7, 0x7B, 0x9B, 0x99, 0xD6, 0xD9, 0x19, 0x0C, 0x6F, 0xC6, 0x0E, 0x91, 0xAF, 0xD7, 0xD3, 0xA1,
-0x53, 0x2A, 0xA0, 0x53, 0xB4, 0x49, 0xE3, 0xA0, 0x07, 0x06, 0xF1, 0x89, 0xDA, 0x8E, 0x1E, 0xB9, 0xE0, 0xA1, 0x52,...
[truncated message content] |
|
From: <nbo...@us...> - 2007-04-12 16:38:08
|
Revision: 114
http://svn.sourceforge.net/mactel-linux/?rev=114&view=rev
Author: nboichat
Date: 2007-04-12 09:38:05 -0700 (Thu, 12 Apr 2007)
Log Message:
-----------
Fix applesmc patch, and break it in parts (standard and enum will be sent first to -mm, int needs more testing on different hardware).
Added Paths:
-----------
trunk/kernel/mactel-patches-2.6.21/0011-applesmc_standard.patch
trunk/kernel/mactel-patches-2.6.21/0012-applesmc_enum.patch
trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch
Removed Paths:
-------------
trunk/kernel/mactel-patches-2.6.21/0011-applesmc2.patch
Deleted: trunk/kernel/mactel-patches-2.6.21/0011-applesmc2.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0011-applesmc2.patch 2007-04-12 16:36:44 UTC (rev 113)
+++ trunk/kernel/mactel-patches-2.6.21/0011-applesmc2.patch 2007-04-12 16:38:05 UTC (rev 114)
@@ -1,799 +0,0 @@
-New features for applesmc: 1. Add support for keys enumeration. 2. IRQ support for the accelerometer. 3. Add more temperature sensors on the Macbook Pro. 4. Add fan description reading.
-
-From: Nicolas Boichat <ni...@bo...>
-
-
----
-
- drivers/hwmon/applesmc.c | 601 +++++++++++++++++++++++++++++++++++++++++-----
- 1 files changed, 535 insertions(+), 66 deletions(-)
-
-diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
-index f7b59fc..f320f7b 100644
---- a/drivers/hwmon/applesmc.c
-+++ b/drivers/hwmon/applesmc.c
-@@ -37,40 +37,69 @@
- #include <linux/hwmon-sysfs.h>
- #include <asm/io.h>
- #include <linux/leds.h>
-+#include <linux/interrupt.h>
-
--/* data port used by apple SMC */
--#define APPLESMC_DATA_PORT 0x300
--/* command/status port used by apple SMC */
--#define APPLESMC_CMD_PORT 0x304
-+/* data port used by Apple SMC */
-+#define APPLESMC_DATA_PORT 0x300
-+/* command/status port used by Apple SMC */
-+#define APPLESMC_CMD_PORT 0x304
-+/* status port used by Apple SMC to get which interrupt type just happened */
-+#define APPLESMC_INT_PORT 0x31f
-
--#define APPLESMC_NR_PORTS 5 /* 0x300-0x304 */
-+#define APPLESMC_NR_PORTS 32 /* 0x300-0x31f */
-
--#define APPLESMC_STATUS_MASK 0x0f
--#define APPLESMC_READ_CMD 0x10
--#define APPLESMC_WRITE_CMD 0x11
-+#define APPLESMC_MAX_DATA_LENGTH 32
-+
-+/* Defined in ACPI DSDT table, should we read it from there? */
-+#define APPLESMC_IRQ 6
-+
-+#define APPLESMC_STATUS_MASK 0x0f
-+#define APPLESMC_READ_CMD 0x10
-+#define APPLESMC_WRITE_CMD 0x11
-+#define APPLESMC_GET_KEY_BY_INDEX_CMD 0x12
-+#define APPLESMC_GET_KEY_INFO_CMD 0x13
-+
-+#define KEY_COUNT_KEY "#KEY" /* r-o ui32 */
-+
-+#define INTERRUPT_OK_KEY "NTOK" /* w-o ui8 */
-
- #define LIGHT_SENSOR_LEFT_KEY "ALV0" /* r-o length 6 */
- #define LIGHT_SENSOR_RIGHT_KEY "ALV1" /* r-o length 6 */
--#define BACKLIGHT_KEY "LKSB" /* w-o */
-+#define BACKLIGHT_KEY "LKSB" /* w-o length 2 */
-
--#define CLAMSHELL_KEY "MSLD" /* r-o length 1 (unused) */
-+#define CLAMSHELL_KEY "MSLD" /* r-o ui8 (unused) */
-
--#define MOTION_SENSOR_X_KEY "MO_X" /* r-o length 2 */
--#define MOTION_SENSOR_Y_KEY "MO_Y" /* r-o length 2 */
--#define MOTION_SENSOR_Z_KEY "MO_Z" /* r-o length 2 */
--#define MOTION_SENSOR_KEY "MOCN" /* r/w length 2 */
-+#define MOTION_SENSOR_X_KEY "MO_X" /* r-o sp78 (2 bytes) */
-+#define MOTION_SENSOR_Y_KEY "MO_Y" /* r-o sp78 (2 bytes) */
-+#define MOTION_SENSOR_Z_KEY "MO_Z" /* r-o sp78 (2 bytes) */
-+#define MOTION_SENSOR_KEY "MOCN" /* r/w ui16 */
-
--#define FANS_COUNT "FNum" /* r-o length 1 */
--#define FANS_MANUAL "FS! " /* r-w length 2 */
--#define FAN_ACTUAL_SPEED "F0Ac" /* r-o length 2 */
--#define FAN_MIN_SPEED "F0Mn" /* r-o length 2 */
--#define FAN_MAX_SPEED "F0Mx" /* r-o length 2 */
--#define FAN_SAFE_SPEED "F0Sf" /* r-o length 2 */
--#define FAN_TARGET_SPEED "F0Tg" /* r-w length 2 */
-+/*
-+ * Interrupt controls.
-+ * If the norm of the position (sqrt(MO_X^2+MO_Y^2+MO_Z^2)) is smaller than
-+ * MOLT (free fall), or bigger than MOHT (high acceleration) for longer than the
-+ * value of MOLD (or MOHD), SMC will trigger an interrupt.
-+ */
-+#define MOTION_LOW_NORM "MOLT" /* r/w sp78 (2 bytes) */
-+#define MOTION_HIGH_NORM "MOHT" /* r/w sp78 (2 bytes) */
-+#define MOTION_LOW_NORM_INTERVAL "MOLD" /* r/w ui8 */
-+#define MOTION_HIGH_NORM_INTERVAL "MOHD" /* r/w ui8 */
-+
-+#define MSDW_KEY "MSDW" /* r/w flag (1 byte) */
-+
-+#define FANS_COUNT "FNum" /* r-o ui8 */
-+#define FANS_MANUAL "FS! " /* r-w ui16 */
-+#define FAN_ACTUAL_SPEED "F0Ac" /* r-o fpe2 */
-+#define FAN_MIN_SPEED "F0Mn" /* r-o fpe2 */
-+#define FAN_MAX_SPEED "F0Mx" /* r-o fpe2 */
-+#define FAN_SAFE_SPEED "F0Sf" /* r-o fpe2 */
-+#define FAN_TARGET_SPEED "F0Tg" /* r-w fpe2 */
-+#define FAN_ID "F0ID" /* r-o char[16] */
-
- /* Temperature sensors keys. First set for Macbook(Pro), second for Macmini */
--static const char* temperature_sensors_sets[][8] = {
-- { "TB0T", "TC0D", "TC0P", "Th0H", "Ts0P", "Th1H", "Ts1P", NULL },
-+static const char* temperature_sensors_sets[][13] = {
-+ { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H",
-+ "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL },
- { "TC0D", "TC0P", NULL }
- };
-
-@@ -122,6 +151,9 @@ static unsigned int applesmc_temperature_set;
-
- static struct mutex applesmc_lock;
-
-+/* Last index written to key_at_index sysfs file. */
-+static unsigned int key_at_index;
-+
- /*
- * __wait_status - Wait up to 100ms for the status port to get a certain value
- * (masked with 0x0f), returning zero if the value is obtained. Callers must
-@@ -152,17 +184,22 @@ static int __wait_status(u8 val)
- */
- static int applesmc_read_key(const char* key, u8* buffer, u8 len)
- {
-- int ret = -EIO;
- int i;
-
-+ if (len > APPLESMC_MAX_DATA_LENGTH) {
-+ printk(KERN_ERR "applesmc_read_key: cannot read more than "
-+ "%d bytes\n", APPLESMC_MAX_DATA_LENGTH);
-+ return -EINVAL;
-+ }
-+
- outb(APPLESMC_READ_CMD, APPLESMC_CMD_PORT);
- if (__wait_status(0x0c))
-- goto out;
-+ return -EIO;
-
- for (i = 0; i < 4; i++) {
- outb(key[i], APPLESMC_DATA_PORT);
- if (__wait_status(0x04))
-- goto out;
-+ return -EIO;
- }
- if (debug)
- printk(KERN_DEBUG "<%s", key);
-@@ -173,7 +210,7 @@ static int applesmc_read_key(const char* key, u8* buffer, u8 len)
-
- for (i = 0; i < len; i++) {
- if (__wait_status(0x05))
-- goto out;
-+ return -EIO;
- buffer[i] = inb(APPLESMC_DATA_PORT);
- if (debug)
- printk(KERN_DEBUG "<%x", buffer[i]);
-@@ -181,10 +218,7 @@ static int applesmc_read_key(const char* key, u8* buffer, u8 len)
- if (debug)
- printk(KERN_DEBUG "\n");
-
-- ret = 0;
--
--out:
-- return ret;
-+ return 0;
- }
-
- /*
-@@ -194,30 +228,100 @@ out:
- */
- static int applesmc_write_key(const char* key, u8* buffer, u8 len)
- {
-- int ret = -EIO;
- int i;
-
-+ if (len > APPLESMC_MAX_DATA_LENGTH) {
-+ printk(KERN_ERR "applesmc_write_key: cannot write more than "
-+ "%d bytes\n", APPLESMC_MAX_DATA_LENGTH);
-+ return -EINVAL;
-+ }
-+
- outb(APPLESMC_WRITE_CMD, APPLESMC_CMD_PORT);
- if (__wait_status(0x0c))
-- goto out;
-+ return -EIO;
-
- for (i = 0; i < 4; i++) {
- outb(key[i], APPLESMC_DATA_PORT);
- if (__wait_status(0x04))
-- goto out;
-+ return -EIO;
- }
-
- outb(len, APPLESMC_DATA_PORT);
-
- for (i = 0; i < len; i++) {
- if (__wait_status(0x04))
-- goto out;
-+ return -EIO;
- outb(buffer[i], APPLESMC_DATA_PORT);
- }
-
-- ret = 0;
--out:
-- return ret;
-+ return 0;
-+}
-+
-+/*
-+ * applesmc_get_key_at_index - get key at index, and put the result in key.
-+ * Returns zero on success or a negative error on failure. Callers must
-+ * hold applesmc_lock.
-+ */
-+static int applesmc_get_key_at_index(int index, char* key)
-+{
-+ int i;
-+ u8 readkey[4];
-+ readkey[0] = index >> 24;
-+ readkey[1] = index >> 16;
-+ readkey[2] = index >> 8;
-+ readkey[3] = index;
-+
-+ outb(APPLESMC_GET_KEY_BY_INDEX_CMD, APPLESMC_CMD_PORT);
-+ if (__wait_status(0x0c))
-+ return -EIO;
-+
-+ for (i = 0; i < 4; i++) {
-+ outb(readkey[i], APPLESMC_DATA_PORT);
-+ if (__wait_status(0x04))
-+ return -EIO;
-+ }
-+
-+ outb(4, APPLESMC_DATA_PORT);
-+
-+ for (i = 0; i < 4; i++) {
-+ if (__wait_status(0x05))
-+ return -EIO;
-+ key[i] = inb(APPLESMC_DATA_PORT);
-+ }
-+ key[4] = 0;
-+
-+ return 0;
-+}
-+
-+/*
-+ * applesmc_get_key_info - get key info, and put the result in info (char[6]).
-+ * Returns zero on success or a negative error on failure. Callers must
-+ * hold applesmc_lock.
-+ */
-+static int applesmc_get_key_info(char* key, char* info)
-+{
-+ int i;
-+
-+ outb(APPLESMC_GET_KEY_INFO_CMD, APPLESMC_CMD_PORT);
-+ if (__wait_status(0x0c))
-+ return -EIO;
-+
-+ for (i = 0; i < 4; i++) {
-+ outb(key[i], APPLESMC_DATA_PORT);
-+ if (__wait_status(0x04))
-+ return -EIO;
-+ }
-+
-+ outb(5, APPLESMC_DATA_PORT);
-+
-+ for (i = 0; i < 6; i++) {
-+ if (__wait_status(0x05))
-+ return -EIO;
-+ info[i] = inb(APPLESMC_DATA_PORT);
-+ }
-+ info[5] = 0;
-+
-+ return 0;
- }
-
- /*
-@@ -249,12 +353,79 @@ static int applesmc_read_motion_sensor(int index, s16* value)
- }
-
- /*
-+ * applesmc_init_check_key_value - checks if a given key contains the bytes in
-+ * buffer, if not, writes these bytes.
-+ * In case of failure retry every INIT_WAIT_MSECS msec, and timeout if it
-+ * waited more than INIT_TIMEOUT_MSECS in total.
-+ * Returns zero on success or a negative error on failure. Callers must
-+ * hold applesmc_lock.
-+ */
-+static int applesmc_init_check_key_value(const char* key, u8* buffer, u8 len)
-+{
-+ int total, ret, i, compare;
-+ u8 rdbuffer[APPLESMC_MAX_DATA_LENGTH];
-+
-+ if (len > APPLESMC_MAX_DATA_LENGTH) {
-+ printk(KERN_ERR "applesmc_init_check_key_value: cannot "
-+ "read/write more than %d bytes",
-+ APPLESMC_MAX_DATA_LENGTH);
-+ return -EINVAL;
-+ }
-+
-+ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
-+ if (!(ret = applesmc_read_key(key, rdbuffer, len))) {
-+ compare = 1;
-+ for (i = 0; i < len; i++) {
-+ if (rdbuffer[i] != buffer[i]) {
-+ compare = 0;
-+ break;
-+ }
-+ }
-+
-+ if (compare) {
-+ return 0;
-+ }
-+ }
-+ ret = applesmc_write_key(key, buffer, len);
-+ msleep(INIT_WAIT_MSECS);
-+ }
-+
-+ if (ret)
-+ return ret;
-+ else
-+ return -EIO;
-+}
-+
-+irqreturn_t applesmc_irq_handler(int irq, void *dev_id)
-+{
-+ u8 int_type = inb(APPLESMC_INT_PORT);
-+
-+ switch (int_type) {
-+ case 0x60:
-+ printk("applesmc: received a free fall interrupt\n");
-+ break;
-+ case 0x6f:
-+ printk("applesmc: received a high acceleration interrupt\n");
-+ break;
-+ case 0x80:
-+ printk("applesmc: received a shock interrupt\n");
-+ break;
-+ default:
-+ printk("applesmc: received an unknown interrupt %x\n", int_type);
-+ }
-+
-+ return IRQ_NONE;
-+}
-+
-+/*
- * applesmc_device_init - initialize the accelerometer. Returns zero on success
- * and negative error code on failure. Can sleep.
- */
- static int applesmc_device_init(void)
- {
-- int total, ret = -ENXIO;
-+ int total;
-+ int ret = -ENXIO;
-+ int ret1, ret2;
- u8 buffer[2];
-
- if (!applesmc_accelerometer)
-@@ -262,32 +433,76 @@ static int applesmc_device_init(void)
-
- mutex_lock(&applesmc_lock);
-
-+ /* Accept interrupts */
-+ buffer[0] = 0x01;
- for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
-- if (debug)
-- printk(KERN_DEBUG "applesmc try %d\n", total);
-- if (!applesmc_read_key(MOTION_SENSOR_KEY, buffer, 2) &&
-- (buffer[0] != 0x00 || buffer[1] != 0x00)) {
-- if (total == INIT_TIMEOUT_MSECS) {
-- printk(KERN_DEBUG "applesmc: device has"
-- " already been initialized"
-- " (0x%02x, 0x%02x).\n",
-- buffer[0], buffer[1]);
-- } else {
-- printk(KERN_DEBUG "applesmc: device"
-- " successfully initialized"
-- " (0x%02x, 0x%02x).\n",
-- buffer[0], buffer[1]);
-- }
-- ret = 0;
-- goto out;
-- }
-- buffer[0] = 0xe0;
-- buffer[1] = 0x00;
-- applesmc_write_key(MOTION_SENSOR_KEY, buffer, 2);
-+ ret1 = applesmc_write_key(INTERRUPT_OK_KEY, buffer, 1);
-+ msleep(INIT_WAIT_MSECS);
-+
-+ if (!ret1)
-+ break;
-+ }
-+ if (ret1)
-+ printk(KERN_WARNING "applesmc: Cannot set NTOK key, "
-+ "will not receive interrupts.\n");
-+
-+ /* Setup interrupt controls. */
-+ buffer[0] = 20; /* 20 msecs */
-+ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM_INTERVAL, buffer, 1);
-+
-+ buffer[0] = 20; /* 20 msecs */
-+ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM_INTERVAL, buffer, 1);
-+
-+ if (ret1 || ret2) {
-+ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
-+ "parameter 1, might not receive some interrupts.");
-+ }
-+
-+ buffer[0] = 0x00;
-+ buffer[1] = 0x60;
-+ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM, buffer, 2);
-+
-+ buffer[0] = 0x01;
-+ buffer[1] = 0xc0;
-+ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM, buffer, 2);
-+
-+ if (ret1 || ret2) {
-+ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
-+ "min/max norm parameters, "
-+ "might not receive some interrupts.");
-+ }
-+
-+ /* Mysterious key. */
-+ buffer[0] = 0x01;
-+ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
-+ ret1 = applesmc_write_key(MSDW_KEY, buffer, 1);
- msleep(INIT_WAIT_MSECS);
-+
-+ if (!ret1)
-+ break;
-+ }
-+ if (ret1)
-+ printk(KERN_WARNING "applesmc: Cannot set MSDW key\n");
-+
-+ /* Initialize the device. */
-+ buffer[0] = 0xe0;
-+ buffer[1] = 0xf8;
-+ if (applesmc_init_check_key_value(MOTION_SENSOR_KEY, buffer, 2)) {
-+ printk(KERN_WARNING "applesmc: failed to init "
-+ "the accelerometer\n");
-+ goto out;
-+ }
-+
-+ ret1 = request_irq(APPLESMC_IRQ, applesmc_irq_handler, IRQF_DISABLED,
-+ "applesmc_irq_handler", NULL);
-+
-+ if (ret1) {
-+ printk(KERN_WARNING "applesmc: cannot setup irq handler\n");
- }
-
-- printk(KERN_WARNING "applesmc: failed to init the device\n");
-+ printk(KERN_DEBUG "applesmc: accelerometer "
-+ "successfully initialized.\n");
-+ ret = 0;
-
- out:
- mutex_unlock(&applesmc_lock);
-@@ -332,9 +547,16 @@ static int applesmc_resume(struct platform_device *dev)
- return applesmc_device_init();
- }
-
-+static int applesmc_remove(struct platform_device *dev)
-+{
-+ free_irq(6, NULL);
-+ return 0;
-+}
-+
- static struct platform_driver applesmc_driver = {
- .probe = applesmc_probe,
- .resume = applesmc_resume,
-+ .remove = applesmc_remove,
- .driver = {
- .name = "applesmc",
- .owner = THIS_MODULE,
-@@ -587,6 +809,33 @@ out:
- return count;
- }
-
-+static ssize_t applesmc_show_fan_id(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ int ret;
-+ char newkey[5];
-+ u8 buffer[17];
-+ struct sensor_device_attribute_2 *sensor_attr =
-+ to_sensor_dev_attr_2(attr);
-+
-+ newkey[0] = FAN_ID[0];
-+ newkey[1] = '0' + sensor_attr->index;
-+ newkey[2] = FAN_ID[2];
-+ newkey[3] = FAN_ID[3];
-+ newkey[4] = 0;
-+
-+ mutex_lock(&applesmc_lock);
-+
-+ ret = applesmc_read_key(newkey, buffer, 16);
-+ buffer[16] = 0;
-+
-+ mutex_unlock(&applesmc_lock);
-+ if (ret)
-+ return ret;
-+ else
-+ return sprintf(sysfsbuf, "%s\n", buffer+4);
-+}
-+
- static ssize_t applesmc_calibrate_show(struct device *dev,
- struct device_attribute *attr, char *sysfsbuf)
- {
-@@ -603,6 +852,26 @@ static ssize_t applesmc_calibrate_store(struct device *dev,
- return count;
- }
-
-+static ssize_t applesmc_key_count_show(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ int ret;
-+ u8 buffer[4];
-+ u32 count;
-+
-+ mutex_lock(&applesmc_lock);
-+
-+ ret = applesmc_read_key(KEY_COUNT_KEY, buffer, 4);
-+ count = ((u32)buffer[0]<<24) + ((u32)buffer[1]<<16) +
-+ ((u32)buffer[2]<<8) + buffer[3];
-+
-+ mutex_unlock(&applesmc_lock);
-+ if (ret)
-+ return ret;
-+ else
-+ return sprintf(sysfsbuf, "%d\n", count);
-+}
-+
- static void applesmc_backlight_set(struct led_classdev *led_cdev,
- enum led_brightness value)
- {
-@@ -615,6 +884,165 @@ static void applesmc_backlight_set(struct led_classdev *led_cdev,
- mutex_unlock(&applesmc_lock);
- }
-
-+static ssize_t applesmc_key_at_index_show(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ char key[5];
-+ char info[6];
-+ u8 buffer[APPLESMC_MAX_DATA_LENGTH];
-+ char outbuffer[256];
-+ int ret, ret2;
-+ int i;
-+
-+ outbuffer[0] = 0;
-+
-+ mutex_lock(&applesmc_lock);
-+
-+ ret = applesmc_get_key_at_index(key_at_index, key);
-+
-+ if (!ret && key[0]) {
-+ applesmc_get_key_info(key, info);
-+
-+ ret2 = applesmc_read_key(key, buffer, info[0]);
-+ if (!ret2) {
-+ for (i = 0; i < info[0]; i++) {
-+ sprintf(outbuffer+(i*2), "%02x", buffer[i]);
-+ }
-+ outbuffer[info[0]*2] = 0;
-+ }
-+ }
-+
-+ mutex_unlock(&applesmc_lock);
-+
-+ if (!ret && key[0])
-+ return sprintf(sysfsbuf, "%d: %s [%d:%s] - %s\n", key_at_index, key, info[0], info+1, outbuffer);
-+ else
-+ return sprintf(sysfsbuf, "%d=invalid\n", key_at_index);
-+}
-+
-+static ssize_t applesmc_key_at_index_store(struct device *dev,
-+ struct device_attribute *attr, const char *sysfsbuf, size_t count)
-+{
-+ mutex_lock(&applesmc_lock);
-+
-+ key_at_index = simple_strtoul(sysfsbuf, NULL, 10);
-+
-+ mutex_unlock(&applesmc_lock);
-+
-+ return count;
-+}
-+
-+static ssize_t applesmc_param_show(char* key, int length, char *sysfsbuf)
-+{
-+ int ret;
-+ unsigned int value = 0;
-+ u8 buffer[2];
-+
-+ mutex_lock(&applesmc_lock);
-+
-+ ret = applesmc_read_key(key, buffer, length);
-+ if (length == 2) {
-+ value = ((unsigned int)buffer[0] << 8) | buffer[1];
-+ }
-+ else if (length == 1) {
-+ value = buffer[0];
-+ }
-+ else {
-+ printk("Invalid length for applesmc_param_show");
-+ ret = -EINVAL;
-+ }
-+
-+ mutex_unlock(&applesmc_lock);
-+ if (ret)
-+ return ret;
-+ else
-+ return sprintf(sysfsbuf, "%u\n", value);
-+}
-+
-+static ssize_t applesmc_param_store(char* key, int length,
-+ const char *sysfsbuf, size_t count)
-+{
-+ int ret;
-+ u32 value;
-+ u8 buffer[2];
-+
-+ value = simple_strtoul(sysfsbuf, NULL, 10);
-+
-+ if (length == 2) {
-+ if (value > 0xffff)
-+ return -EINVAL;
-+
-+ buffer[0] = (value >> 8) & 0xff;
-+ buffer[1] = value & 0xff;
-+ } else if (length == 1) {
-+ if (value > 0xff)
-+ return -EINVAL;
-+
-+ buffer[0] = value & 0xff;
-+ } else {
-+ printk("Invalid length for applesmc_param_store");
-+ return -EINVAL;
-+ }
-+
-+ mutex_lock(&applesmc_lock);
-+
-+ ret = applesmc_write_key(key, buffer, length);
-+
-+ mutex_unlock(&applesmc_lock);
-+ if (ret)
-+ return ret;
-+ else
-+ return count;
-+}
-+
-+static ssize_t applesmc_low_norm_trigger_show(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ return applesmc_param_show(MOTION_LOW_NORM_INTERVAL, 1, sysfsbuf);
-+}
-+
-+static ssize_t applesmc_high_norm_trigger_show(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ return applesmc_param_show(MOTION_HIGH_NORM_INTERVAL, 1, sysfsbuf);
-+}
-+
-+static ssize_t applesmc_low_norm_show(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ return applesmc_param_show(MOTION_LOW_NORM, 2, sysfsbuf);
-+}
-+
-+static ssize_t applesmc_high_norm_show(struct device *dev,
-+ struct device_attribute *attr, char *sysfsbuf)
-+{
-+ return applesmc_param_show(MOTION_HIGH_NORM, 2, sysfsbuf);
-+}
-+
-+static ssize_t applesmc_low_norm_trigger_store(struct device *dev,
-+ struct device_attribute *attr, const char *sysfsbuf, size_t count)
-+{
-+ return applesmc_param_store(MOTION_LOW_NORM_INTERVAL, 1, sysfsbuf, count);
-+}
-+
-+static ssize_t applesmc_high_norm_trigger_store(struct device *dev,
-+ struct device_attribute *attr, const char *sysfsbuf, size_t count)
-+{
-+ return applesmc_param_store(MOTION_HIGH_NORM_INTERVAL, 1, sysfsbuf, count);
-+}
-+
-+static ssize_t applesmc_low_norm_store(struct device *dev,
-+ struct device_attribute *attr, const char *sysfsbuf, size_t count)
-+{
-+ return applesmc_param_store(MOTION_LOW_NORM, 2, sysfsbuf, count);
-+}
-+
-+static ssize_t applesmc_high_norm_store(struct device *dev,
-+ struct device_attribute *attr, const char *sysfsbuf, size_t count)
-+{
-+ return applesmc_param_store(MOTION_HIGH_NORM, 2, sysfsbuf, count);
-+}
-+
- static struct led_classdev applesmc_backlight = {
- .name = "smc:kbd_backlight",
- .default_trigger = "nand-disk",
-@@ -624,9 +1052,29 @@ static struct led_classdev applesmc_backlight = {
- static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
- static DEVICE_ATTR(calibrate, 0644,
- applesmc_calibrate_show, applesmc_calibrate_store);
-+static DEVICE_ATTR(low_norm_trigger_interval, 0644, applesmc_low_norm_trigger_show, applesmc_low_norm_trigger_store);
-+static DEVICE_ATTR(high_norm_trigger_interval, 0644, applesmc_high_norm_trigger_show, applesmc_high_norm_trigger_store);
-+static DEVICE_ATTR(low_norm_trigger, 0644, applesmc_low_norm_show, applesmc_low_norm_store);
-+static DEVICE_ATTR(high_norm_trigger, 0644, applesmc_high_norm_show, applesmc_high_norm_store);
-
- static DEVICE_ATTR(light, 0444, applesmc_light_show, NULL);
-
-+static DEVICE_ATTR(key_count, 0444, applesmc_key_count_show, NULL);
-+static DEVICE_ATTR(key_at_index, 0600, applesmc_key_at_index_show, applesmc_key_at_index_store);
-+
-+static struct attribute *accelerometer_attributes[] = {
-+ &dev_attr_position.attr,
-+ &dev_attr_calibrate.attr,
-+ &dev_attr_low_norm_trigger.attr,
-+ &dev_attr_high_norm_trigger.attr,
-+ &dev_attr_low_norm_trigger_interval.attr,
-+ &dev_attr_high_norm_trigger_interval.attr,
-+ NULL
-+};
-+
-+static const struct attribute_group accelerometer_attributes_group =
-+ { .attrs = accelerometer_attributes };
-+
- /*
- * Macro defining SENSOR_DEVICE_ATTR for a fan sysfs entries.
- * - show actual speed
-@@ -655,6 +1103,9 @@ static SENSOR_DEVICE_ATTR_2(fan##offset##_target_speed, S_IRUGO | S_IWUSR, \
- static SENSOR_DEVICE_ATTR(fan##offset##_manual, S_IRUGO | S_IWUSR, \
- applesmc_show_fan_manual, applesmc_store_fan_manual, offset); \
- \
-+static SENSOR_DEVICE_ATTR(fan##offset##_id, S_IRUGO, \
-+ applesmc_show_fan_id, NULL, offset); \
-+\
- static struct attribute *fan##offset##_attributes[] = { \
- &sensor_dev_attr_fan##offset##_actual_speed.dev_attr.attr, \
- &sensor_dev_attr_fan##offset##_minimum_speed.dev_attr.attr, \
-@@ -662,6 +1113,7 @@ static struct attribute *fan##offset##_attributes[] = { \
- &sensor_dev_attr_fan##offset##_safe_speed.dev_attr.attr, \
- &sensor_dev_attr_fan##offset##_target_speed.dev_attr.attr, \
- &sensor_dev_attr_fan##offset##_manual.dev_attr.attr, \
-+ &sensor_dev_attr_fan##offset##_id.dev_attr.attr, \
- NULL \
- };
-
-@@ -694,6 +1146,16 @@ static SENSOR_DEVICE_ATTR(temperature_5, S_IRUGO,
- applesmc_show_temperature, NULL, 5);
- static SENSOR_DEVICE_ATTR(temperature_6, S_IRUGO,
- applesmc_show_temperature, NULL, 6);
-+static SENSOR_DEVICE_ATTR(temperature_7, S_IRUGO,
-+ applesmc_show_temperature, NULL, 7);
-+static SENSOR_DEVICE_ATTR(temperature_8, S_IRUGO,
-+ applesmc_show_temperature, NULL, 8);
-+static SENSOR_DEVICE_ATTR(temperature_9, S_IRUGO,
-+ applesmc_show_temperature, NULL, 9);
-+static SENSOR_DEVICE_ATTR(temperature_10, S_IRUGO,
-+ applesmc_show_temperature, NULL, 10);
-+static SENSOR_DEVICE_ATTR(temperature_11, S_IRUGO,
-+ applesmc_show_temperature, NULL, 11);
-
- static struct attribute *temperature_attributes[] = {
- &sensor_dev_attr_temperature_0.dev_attr.attr,
-@@ -703,6 +1165,11 @@ static struct attribute *temperature_attributes[] = {
- &sensor_dev_attr_temperature_4.dev_attr.attr,
- &sensor_dev_attr_temperature_5.dev_attr.attr,
- &sensor_dev_attr_temperature_6.dev_attr.attr,
-+ &sensor_dev_attr_temperature_7.dev_attr.attr,
-+ &sensor_dev_attr_temperature_8.dev_attr.attr,
-+ &sensor_dev_attr_temperature_9.dev_attr.attr,
-+ &sensor_dev_attr_temperature_10.dev_attr.attr,
-+ &sensor_dev_attr_temperature_11.dev_attr.attr,
- };
-
- /* Module stuff */
-@@ -734,11 +1201,8 @@ static int applesmc_create_accelerometer(void)
- {
- int ret;
-
-- ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_position.attr);
-- if (ret)
-- goto out;
--
-- ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_calibrate.attr);
-+ ret = sysfs_create_group(&pdev->dev.kobj,
-+ &accelerometer_attributes_group);
- if (ret)
- goto out;
-
-@@ -900,6 +1364,11 @@ static int __init applesmc_init(void)
- goto out_accelerometer;
- }
-
-+ ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_key_count.attr);
-+ ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_key_at_index.attr);
-+ if (ret)
-+ goto out_accelerometer;
-+
- printk(KERN_INFO "applesmc: driver successfully loaded.\n");
- return 0;
-
Added: trunk/kernel/mactel-patches-2.6.21/0011-applesmc_standard.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0011-applesmc_standard.patch (rev 0)
+++ trunk/kernel/mactel-patches-2.6.21/0011-applesmc_standard.patch 2007-04-12 16:38:05 UTC (rev 114)
@@ -0,0 +1,556 @@
+- Standardize applesmc to use sysfs filenames recommended by
+
+From: Nicolas Boichat <ni...@bo...>
+
+Documentation/hwmon/sysfs-interface.
+- Use snprintf instead of sprintf in sysfs show handlers.
+- Remove the sysfs files properly in case of initialisation problem, and when
+ the driver is unloaded.
+- Add various sanity checks and improvements of SMC key comments.
+- Add support for reading fan physical position (e.g. "Left Side")
+---
+
+ drivers/hwmon/applesmc.c | 280 ++++++++++++++++++++++++++++++++--------------
+ 1 files changed, 192 insertions(+), 88 deletions(-)
+
+diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
+index f7b59fc..531bc9a 100644
+--- a/drivers/hwmon/applesmc.c
++++ b/drivers/hwmon/applesmc.c
+@@ -37,40 +37,48 @@
+ #include <linux/hwmon-sysfs.h>
+ #include <asm/io.h>
+ #include <linux/leds.h>
++#include <linux/hwmon.h>
+
+-/* data port used by apple SMC */
++/* data port used by Apple SMC */
+ #define APPLESMC_DATA_PORT 0x300
+-/* command/status port used by apple SMC */
++/* command/status port used by Apple SMC */
+ #define APPLESMC_CMD_PORT 0x304
+
+-#define APPLESMC_NR_PORTS 5 /* 0x300-0x304 */
++#define APPLESMC_NR_PORTS 32 /* 0x300-0x31f */
++
++#define APPLESMC_MAX_DATA_LENGTH 32
+
+ #define APPLESMC_STATUS_MASK 0x0f
+ #define APPLESMC_READ_CMD 0x10
+ #define APPLESMC_WRITE_CMD 0x11
+
+-#define LIGHT_SENSOR_LEFT_KEY "ALV0" /* r-o length 6 */
+-#define LIGHT_SENSOR_RIGHT_KEY "ALV1" /* r-o length 6 */
+-#define BACKLIGHT_KEY "LKSB" /* w-o */
++#define LIGHT_SENSOR_LEFT_KEY "ALV0" /* r-o {alv (6 bytes) */
++#define LIGHT_SENSOR_RIGHT_KEY "ALV1" /* r-o {alv (6 bytes) */
++#define BACKLIGHT_KEY "LKSB" /* w-o {lkb (2 bytes) */
+
+-#define CLAMSHELL_KEY "MSLD" /* r-o length 1 (unused) */
++#define CLAMSHELL_KEY "MSLD" /* r-o ui8 (unused) */
+
+-#define MOTION_SENSOR_X_KEY "MO_X" /* r-o length 2 */
+-#define MOTION_SENSOR_Y_KEY "MO_Y" /* r-o length 2 */
+-#define MOTION_SENSOR_Z_KEY "MO_Z" /* r-o length 2 */
+-#define MOTION_SENSOR_KEY "MOCN" /* r/w length 2 */
++#define MOTION_SENSOR_X_KEY "MO_X" /* r-o sp78 (2 bytes) */
++#define MOTION_SENSOR_Y_KEY "MO_Y" /* r-o sp78 (2 bytes) */
++#define MOTION_SENSOR_Z_KEY "MO_Z" /* r-o sp78 (2 bytes) */
++#define MOTION_SENSOR_KEY "MOCN" /* r/w ui16 */
+
+-#define FANS_COUNT "FNum" /* r-o length 1 */
+-#define FANS_MANUAL "FS! " /* r-w length 2 */
+-#define FAN_ACTUAL_SPEED "F0Ac" /* r-o length 2 */
+-#define FAN_MIN_SPEED "F0Mn" /* r-o length 2 */
+-#define FAN_MAX_SPEED "F0Mx" /* r-o length 2 */
+-#define FAN_SAFE_SPEED "F0Sf" /* r-o length 2 */
+-#define FAN_TARGET_SPEED "F0Tg" /* r-w length 2 */
++#define FANS_COUNT "FNum" /* r-o ui8 */
++#define FANS_MANUAL "FS! " /* r-w ui16 */
++#define FAN_ACTUAL_SPEED "F0Ac" /* r-o fpe2 (2 bytes) */
++#define FAN_MIN_SPEED "F0Mn" /* r-o fpe2 (2 bytes) */
++#define FAN_MAX_SPEED "F0Mx" /* r-o fpe2 (2 bytes) */
++#define FAN_SAFE_SPEED "F0Sf" /* r-o fpe2 (2 bytes) */
++#define FAN_TARGET_SPEED "F0Tg" /* r-w fpe2 (2 bytes) */
++#define FAN_POSITION "F0ID" /* r-o char[16] */
+
+-/* Temperature sensors keys. First set for Macbook(Pro), second for Macmini */
+-static const char* temperature_sensors_sets[][8] = {
+- { "TB0T", "TC0D", "TC0P", "Th0H", "Ts0P", "Th1H", "Ts1P", NULL },
++/*
++ * Temperature sensors keys (sp78 - 2 bytes).
++ * First set for Macbook(Pro), second for Macmini.
++ */
++static const char* temperature_sensors_sets[][13] = {
++ { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H",
++ "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL },
+ { "TC0D", "TC0P", NULL }
+ };
+
+@@ -110,6 +118,7 @@ static s16 rest_x;
+ static s16 rest_y;
+ static struct timer_list applesmc_timer;
+ static struct input_dev *applesmc_idev;
++static struct class_device *hwmon_class_dev;
+
+ /* Indicates whether this computer has an accelerometer. */
+ static unsigned int applesmc_accelerometer;
+@@ -152,17 +161,22 @@ static int __wait_status(u8 val)
+ */
+ static int applesmc_read_key(const char* key, u8* buffer, u8 len)
+ {
+- int ret = -EIO;
+ int i;
+
++ if (len > APPLESMC_MAX_DATA_LENGTH) {
++ printk(KERN_ERR "applesmc_read_key: cannot read more than "
++ "%d bytes\n", APPLESMC_MAX_DATA_LENGTH);
++ return -EINVAL;
++ }
++
+ outb(APPLESMC_READ_CMD, APPLESMC_CMD_PORT);
+ if (__wait_status(0x0c))
+- goto out;
++ return -EIO;
+
+ for (i = 0; i < 4; i++) {
+ outb(key[i], APPLESMC_DATA_PORT);
+ if (__wait_status(0x04))
+- goto out;
++ return -EIO;
+ }
+ if (debug)
+ printk(KERN_DEBUG "<%s", key);
+@@ -173,7 +187,7 @@ static int applesmc_read_key(const char* key, u8* buffer, u8 len)
+
+ for (i = 0; i < len; i++) {
+ if (__wait_status(0x05))
+- goto out;
++ return -EIO;
+ buffer[i] = inb(APPLESMC_DATA_PORT);
+ if (debug)
+ printk(KERN_DEBUG "<%x", buffer[i]);
+@@ -181,10 +195,7 @@ static int applesmc_read_key(const char* key, u8* buffer, u8 len)
+ if (debug)
+ printk(KERN_DEBUG "\n");
+
+- ret = 0;
+-
+-out:
+- return ret;
++ return 0;
+ }
+
+ /*
+@@ -194,30 +205,33 @@ out:
+ */
+ static int applesmc_write_key(const char* key, u8* buffer, u8 len)
+ {
+- int ret = -EIO;
+ int i;
+
++ if (len > APPLESMC_MAX_DATA_LENGTH) {
++ printk(KERN_ERR "applesmc_write_key: cannot write more than "
++ "%d bytes\n", APPLESMC_MAX_DATA_LENGTH);
++ return -EINVAL;
++ }
++
+ outb(APPLESMC_WRITE_CMD, APPLESMC_CMD_PORT);
+ if (__wait_status(0x0c))
+- goto out;
++ return -EIO;
+
+ for (i = 0; i < 4; i++) {
+ outb(key[i], APPLESMC_DATA_PORT);
+ if (__wait_status(0x04))
+- goto out;
++ return -EIO;
+ }
+
+ outb(len, APPLESMC_DATA_PORT);
+
+ for (i = 0; i < len; i++) {
+ if (__wait_status(0x04))
+- goto out;
++ return -EIO;
+ outb(buffer[i], APPLESMC_DATA_PORT);
+ }
+
+- ret = 0;
+-out:
+- return ret;
++ return 0;
+ }
+
+ /*
+@@ -415,7 +429,7 @@ out:
+ if (ret)
+ return ret;
+ else
+- return sprintf(buf, "(%d,%d,%d)\n", x, y, z);
++ return snprintf(buf, PAGE_SIZE, "(%d,%d,%d)\n", x, y, z);
+ }
+
+ static ssize_t applesmc_light_show(struct device *dev,
+@@ -439,10 +453,10 @@ out:
+ if (ret)
+ return ret;
+ else
+- return sprintf(sysfsbuf, "(%d,%d)\n", left, right);
++ return snprintf(sysfsbuf, PAGE_SIZE, "(%d,%d)\n", left, right);
+ }
+
+-/* Displays degree Celsius * 100 */
++/* Displays degree Celsius * 1000 */
+ static ssize_t applesmc_show_temperature(struct device *dev,
+ struct device_attribute *devattr, char *sysfsbuf)
+ {
+@@ -456,15 +470,15 @@ static ssize_t applesmc_show_temperature(struct device *dev,
+ mutex_lock(&applesmc_lock);
+
+ ret = applesmc_read_key(key, buffer, 2);
+- temp = buffer[0]*100;
+- temp += (buffer[1] >> 6) * 25;
++ temp = buffer[0]*1000;
++ temp += (buffer[1] >> 6) * 250;
+
+ mutex_unlock(&applesmc_lock);
+
+ if (ret)
+ return ret;
+ else
+- return sprintf(sysfsbuf, "%u\n", temp);
++ return snprintf(sysfsbuf, PAGE_SIZE, "%u\n", temp);
+ }
+
+ static ssize_t applesmc_show_fan_speed(struct device *dev,
+@@ -492,7 +506,7 @@ static ssize_t applesmc_show_fan_speed(struct device *dev,
+ if (ret)
+ return ret;
+ else
+- return sprintf(sysfsbuf, "%u\n", speed);
++ return snprintf(sysfsbuf, PAGE_SIZE, "%u\n", speed);
+ }
+
+ static ssize_t applesmc_store_fan_speed(struct device *dev,
+@@ -547,7 +561,7 @@ static ssize_t applesmc_show_fan_manual(struct device *dev,
+ if (ret)
+ return ret;
+ else
+- return sprintf(sysfsbuf, "%d\n", manual);
++ return snprintf(sysfsbuf, PAGE_SIZE, "%d\n", manual);
+ }
+
+ static ssize_t applesmc_store_fan_manual(struct device *dev,
+@@ -587,10 +601,37 @@ out:
+ return count;
+ }
+
++static ssize_t applesmc_show_fan_position(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ int ret;
++ char newkey[5];
++ u8 buffer[17];
++ struct sensor_device_attribute_2 *sensor_attr =
++ to_sensor_dev_attr_2(attr);
++
++ newkey[0] = FAN_POSITION[0];
++ newkey[1] = '0' + sensor_attr->index;
++ newkey[2] = FAN_POSITION[2];
++ newkey[3] = FAN_POSITION[3];
++ newkey[4] = 0;
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_read_key(newkey, buffer, 16);
++ buffer[16] = 0;
++
++ mutex_unlock(&applesmc_lock);
++ if (ret)
++ return ret;
++ else
++ return snprintf(sysfsbuf, PAGE_SIZE, "%s\n", buffer+4);
++}
++
+ static ssize_t applesmc_calibrate_show(struct device *dev,
+ struct device_attribute *attr, char *sysfsbuf)
+ {
+- return sprintf(sysfsbuf, "(%d,%d)\n", rest_x, rest_y);
++ return snprintf(sysfsbuf, PAGE_SIZE, "(%d,%d)\n", rest_x, rest_y);
+ }
+
+ static ssize_t applesmc_calibrate_store(struct device *dev,
+@@ -625,6 +666,15 @@ static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
+ static DEVICE_ATTR(calibrate, 0644,
+ applesmc_calibrate_show, applesmc_calibrate_store);
+
++static struct attribute *accelerometer_attributes[] = {
++ &dev_attr_position.attr,
++ &dev_attr_calibrate.attr,
++ NULL
++};
++
++static const struct attribute_group accelerometer_attributes_group =
++ { .attrs = accelerometer_attributes };
++
+ static DEVICE_ATTR(light, 0444, applesmc_light_show, NULL);
+
+ /*
+@@ -637,31 +687,35 @@ static DEVICE_ATTR(light, 0444, applesmc_light_show, NULL);
+ * - show/store manual mode
+ */
+ #define sysfs_fan_speeds_offset(offset) \
+-static SENSOR_DEVICE_ATTR_2(fan##offset##_actual_speed, S_IRUGO, \
+- applesmc_show_fan_speed, NULL, 0, offset); \
++static SENSOR_DEVICE_ATTR_2(fan##offset##_input, S_IRUGO, \
++ applesmc_show_fan_speed, NULL, 0, offset-1); \
+ \
+-static SENSOR_DEVICE_ATTR_2(fan##offset##_minimum_speed, S_IRUGO | S_IWUSR, \
+- applesmc_show_fan_speed, applesmc_store_fan_speed, 1, offset); \
++static SENSOR_DEVICE_ATTR_2(fan##offset##_min, S_IRUGO | S_IWUSR, \
++ applesmc_show_fan_speed, applesmc_store_fan_speed, 1, offset-1); \
+ \
+-static SENSOR_DEVICE_ATTR_2(fan##offset##_maximum_speed, S_IRUGO, \
+- applesmc_show_fan_speed, NULL, 2, offset); \
++static SENSOR_DEVICE_ATTR_2(fan##offset##_max, S_IRUGO, \
++ applesmc_show_fan_speed, NULL, 2, offset-1); \
+ \
+-static SENSOR_DEVICE_ATTR_2(fan##offset##_safe_speed, S_IRUGO, \
+- applesmc_show_fan_speed, NULL, 3, offset); \
++static SENSOR_DEVICE_ATTR_2(fan##offset##_safe, S_IRUGO, \
++ applesmc_show_fan_speed, NULL, 3, offset-1); \
+ \
+-static SENSOR_DEVICE_ATTR_2(fan##offset##_target_speed, S_IRUGO | S_IWUSR, \
+- applesmc_show_fan_speed, applesmc_store_fan_speed, 4, offset); \
++static SENSOR_DEVICE_ATTR_2(fan##offset##_output, S_IRUGO | S_IWUSR, \
++ applesmc_show_fan_speed, applesmc_store_fan_speed, 4, offset-1); \
+ \
+ static SENSOR_DEVICE_ATTR(fan##offset##_manual, S_IRUGO | S_IWUSR, \
+- applesmc_show_fan_manual, applesmc_store_fan_manual, offset); \
++ applesmc_show_fan_manual, applesmc_store_fan_manual, offset-1); \
++\
++static SENSOR_DEVICE_ATTR(fan##offset##_position, S_IRUGO, \
++ applesmc_show_fan_position, NULL, offset-1); \
+ \
+ static struct attribute *fan##offset##_attributes[] = { \
+- &sensor_dev_attr_fan##offset##_actual_speed.dev_attr.attr, \
+- &sensor_dev_attr_fan##offset##_minimum_speed.dev_attr.attr, \
+- &sensor_dev_attr_fan##offset##_maximum_speed.dev_attr.attr, \
+- &sensor_dev_attr_fan##offset##_safe_speed.dev_attr.attr, \
+- &sensor_dev_attr_fan##offset##_target_speed.dev_attr.attr, \
++ &sensor_dev_attr_fan##offset##_input.dev_attr.attr, \
++ &sensor_dev_attr_fan##offset##_min.dev_attr.attr, \
++ &sensor_dev_attr_fan##offset##_max.dev_attr.attr, \
++ &sensor_dev_attr_fan##offset##_safe.dev_attr.attr, \
++ &sensor_dev_attr_fan##offset##_output.dev_attr.attr, \
+ &sensor_dev_attr_fan##offset##_manual.dev_attr.attr, \
++ &sensor_dev_attr_fan##offset##_position.dev_attr.attr, \
+ NULL \
+ };
+
+@@ -669,42 +723,61 @@ static struct attribute *fan##offset##_attributes[] = { \
+ * Create the needed functions for each fan using the macro defined above
+ * (2 fans are supported)
+ */
+-sysfs_fan_speeds_offset(0);
+ sysfs_fan_speeds_offset(1);
++sysfs_fan_speeds_offset(2);
+
+ static const struct attribute_group fan_attribute_groups[] = {
+- { .attrs = fan0_attributes },
+- { .attrs = fan1_attributes }
++ { .attrs = fan1_attributes },
++ { .attrs = fan2_attributes }
+ };
+
+ /*
+ * Temperature sensors sysfs entries.
+ */
+-static SENSOR_DEVICE_ATTR(temperature_0, S_IRUGO,
++static SENSOR_DEVICE_ATTR(temp_1_input, S_IRUGO,
+ applesmc_show_temperature, NULL, 0);
+-static SENSOR_DEVICE_ATTR(temperature_1, S_IRUGO,
++static SENSOR_DEVICE_ATTR(temp_2_input, S_IRUGO,
+ applesmc_show_temperature, NULL, 1);
+-static SENSOR_DEVICE_ATTR(temperature_2, S_IRUGO,
++static SENSOR_DEVICE_ATTR(temp_3_input, S_IRUGO,
+ applesmc_show_temperature, NULL, 2);
+-static SENSOR_DEVICE_ATTR(temperature_3, S_IRUGO,
++static SENSOR_DEVICE_ATTR(temp_4_input, S_IRUGO,
+ applesmc_show_temperature, NULL, 3);
+-static SENSOR_DEVICE_ATTR(temperature_4, S_IRUGO,
++static SENSOR_DEVICE_ATTR(temp_5_input, S_IRUGO,
+ applesmc_show_temperature, NULL, 4);
+-static SENSOR_DEVICE_ATTR(temperature_5, S_IRUGO,
++static SENSOR_DEVICE_ATTR(temp_6_input, S_IRUGO,
+ applesmc_show_temperature, NULL, 5);
+-static SENSOR_DEVICE_ATTR(temperature_6, S_IRUGO,
++static SENSOR_DEVICE_ATTR(temp_7_input, S_IRUGO,
+ applesmc_show_temperature, NULL, 6);
++static SENSOR_DEVICE_ATTR(temp_8_input, S_IRUGO,
++ applesmc_show_temperature, NULL, 7);
++static SENSOR_DEVICE_ATTR(temp_9_input, S_IRUGO,
++ applesmc_show_temperature, NULL, 8);
++static SENSOR_DEVICE_ATTR(temp_10_input, S_IRUGO,
++ applesmc_show_temperature, NULL, 9);
++static SENSOR_DEVICE_ATTR(temp_11_input, S_IRUGO,
++ applesmc_show_temperature, NULL, 10);
++static SENSOR_DEVICE_ATTR(temp_12_input, S_IRUGO,
++ applesmc_show_temperature, NULL, 11);
+
+ static struct attribute *temperature_attributes[] = {
+- &sensor_dev_attr_temperature_0.dev_attr.attr,
+- &sensor_dev_attr_temperature_1.dev_attr.attr,
+- &sensor_dev_attr_temperature_2.dev_attr.attr,
+- &sensor_dev_attr_temperature_3.dev_attr.attr,
+- &sensor_dev_attr_temperature_4.dev_attr.attr,
+- &sensor_dev_attr_temperature_5.dev_attr.attr,
+- &sensor_dev_attr_temperature_6.dev_attr.attr,
++ &sensor_dev_attr_temp_1_input.dev_attr.attr,
++ &sensor_dev_attr_temp_2_input.dev_attr.attr,
++ &sensor_dev_attr_temp_3_input.dev_attr.attr,
++ &sensor_dev_attr_temp_4_input.dev_attr.attr,
++ &sensor_dev_attr_temp_5_input.dev_attr.attr,
++ &sensor_dev_attr_temp_6_input.dev_attr.attr,
++ &sensor_dev_attr_temp_7_input.dev_attr.attr,
++ &sensor_dev_attr_temp_8_input.dev_attr.attr,
++ &sensor_dev_attr_temp_9_input.dev_attr.attr,
++ &sensor_dev_attr_temp_10_input.dev_attr.attr,
++ &sensor_dev_attr_temp_11_input.dev_attr.attr,
++ &sensor_dev_attr_temp_12_input.dev_attr.attr,
++ NULL
+ };
+
++static const struct attribute_group temperature_attributes_group =
++ { .attrs = temperature_attributes };
++
+ /* Module stuff */
+
+ /*
+@@ -734,18 +807,15 @@ static int applesmc_create_accelerometer(void)
+ {
+ int ret;
+
+- ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_position.attr);
+- if (ret)
+- goto out;
+-
+- ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_calibrate.attr);
++ ret = sysfs_create_group(&pdev->dev.kobj,
++ &accelerometer_attributes_group);
+ if (ret)
+ goto out;
+
+ applesmc_idev = input_allocate_device();
+ if (!applesmc_idev) {
+ ret = -ENOMEM;
+- goto out;
++ goto out_sysfs;
+ }
+
+ /* initial calibrate for the input device */
+@@ -777,6 +847,9 @@ static int applesmc_create_accelerometer(void)
+ out_idev:
+ input_free_device(applesmc_idev);
+
++out_sysfs:
++ sysfs_remove_group(&pdev->dev.kobj, &accelerometer_attributes_group);
++
+ out:
+ printk(KERN_WARNING "applesmc: driver init failed (ret=%d)!\n", ret);
+ return ret;
+@@ -787,6 +860,7 @@ static void applesmc_release_accelerometer(void)
+ {
+ del_timer_sync(&applesmc_timer);
+ input_unregister_device(applesmc_idev);
++ sysfs_remove_group(&pdev->dev.kobj, &accelerometer_attributes_group);
+ }
+
+ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
+@@ -867,7 +941,7 @@ static int __init applesmc_init(void)
+ ret = sysfs_create_group(&pdev->dev.kobj,
+ &fan_attribute_groups[0]);
+ if (ret)
+- goto out_device;
++ goto out_fan_1;
+ case 0:
+ ;
+ }
+@@ -876,16 +950,24 @@ static int __init applesmc_init(void)
+ for (i = 0;
+ temperature_sensors_sets[applesmc_temperature_set][i] != NULL;
+ i++) {
++ if (temperature_attributes[i] == NULL) {
++ printk(KERN_ERR "applesmc: More temperature sensors "
++ "in temperature_sensors_sets (at least %i)"
++ "than available sysfs files in "
++ "temperature_attributes (%i), please report "
++ "this bug.\n", i, i-1);
++ goto out_temperature;
++ }
+ ret = sysfs_create_file(&pdev->dev.kobj,
+ temperature_attributes[i]);
+ if (ret)
+- goto out_device;
++ goto out_temperature;
+ }
+
+ if (applesmc_accelerometer) {
+ ret = applesmc_create_accelerometer();
+ if (ret)
+- goto out_device;
++ goto out_temperature;
+ }
+
+ if (applesmc_light) {
+@@ -897,15 +979,33 @@ static int __init applesmc_init(void)
+ /* register as a led device */
+ ret = led_classdev_register(&pdev->dev, &applesmc_backlight);
+ if (ret < 0)
+- goto out_accelerometer;
++ goto out_light_sysfs;
++ }
++
++ hwmon_class_dev = hwmon_device_register(&pdev->dev);
++ if (IS_ERR(hwmon_class_dev)) {
++ ret = PTR_ERR(hwmon_class_dev);
++ goto out_light;
+ }
+
+ printk(KERN_INFO "applesmc: driver successfully loaded.\n");
++
+ return 0;
+
++out_light:
++ if (applesmc_light)
++ led_classdev_unregister(&applesmc_backlight);
++out_light_sysfs:
++ if (applesmc_light)
++ sysfs_remove_file(&pdev->dev.kobj, &dev_attr_light.attr);
+ out_accelerometer:
+ if (applesmc_accelerometer)
+ applesmc_release_accelerometer();
++out_temperature:
++ sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group);
++ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]);
++out_fan_1:
++ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]);
+ out_device:
+ platform_device_unregister(pdev);
+ out_driver:
+@@ -919,10 +1019,14 @@ out:
+
+ static void __exit applesmc_exit(void)
+ {
++ hwmon_device_unregister(hwmon_class_dev);
+ if (applesmc_light)
+ led_classdev_unregister(&applesmc_backlight);
+ if (applesmc_accelerometer)
+ applesmc_release_accelerometer();
++ sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group);
++ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]);
++ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]);
+ platform_device_unregister(pdev);
+ platform_driver_unregister(&applesmc_driver);
+ release_region(APPLESMC_DATA_PORT, APPLESMC_NR_PORTS);
Added: trunk/kernel/mactel-patches-2.6.21/0012-applesmc_enum.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0012-applesmc_enum.patch (rev 0)
+++ trunk/kernel/mactel-patches-2.6.21/0012-applesmc_enum.patch 2007-04-12 16:38:05 UTC (rev 114)
@@ -0,0 +1,340 @@
+Implement key enumeration in applesmc.
+
+From: Nicolas Boichat <ni...@bo...>
+
+
+---
+
+ drivers/hwmon/applesmc.c | 263 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 262 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
+index 531bc9a..4ec38ef 100644
+--- a/drivers/hwmon/applesmc.c
++++ b/drivers/hwmon/applesmc.c
+@@ -51,6 +51,10 @@
+ #define APPLESMC_STATUS_MASK 0x0f
+ #define APPLESMC_READ_CMD 0x10
+ #define APPLESMC_WRITE_CMD 0x11
++#define APPLESMC_GET_KEY_BY_INDEX_CMD 0x12
++#define APPLESMC_GET_KEY_TYPE_CMD 0x13
++
++#define KEY_COUNT_KEY "#KEY" /* r-o ui32 */
+
+ #define LIGHT_SENSOR_LEFT_KEY "ALV0" /* r-o {alv (6 bytes) */
+ #define LIGHT_SENSOR_RIGHT_KEY "ALV1" /* r-o {alv (6 bytes) */
+@@ -131,6 +135,12 @@ static unsigned int applesmc_temperature_set;
+
+ static struct mutex applesmc_lock;
+
++/*
++ * Last index written to key_at_index sysfs file, and value to use for all other
++ * key_at_index_* sysfs files.
++ */
++static unsigned int key_at_index;
++
+ /*
+ * __wait_status - Wait up to 100ms for the status port to get a certain value
+ * (masked with 0x0f), returning zero if the value is obtained. Callers must
+@@ -235,6 +245,73 @@ static int applesmc_write_key(const char* key, u8* buffer, u8 len)
+ }
+
+ /*
++ * applesmc_get_key_at_index - get key at index, and put the result in key
++ * (char[6]). Returns zero on success or a negative error on failure. Callers
++ * must hold applesmc_lock.
++ */
++static int applesmc_get_key_at_index(int index, char* key)
++{
++ int i;
++ u8 readkey[4];
++ readkey[0] = index >> 24;
++ readkey[1] = index >> 16;
++ readkey[2] = index >> 8;
++ readkey[3] = index;
++
++ outb(APPLESMC_GET_KEY_BY_INDEX_CMD, APPLESMC_CMD_PORT);
++ if (__wait_status(0x0c))
++ return -EIO;
++
++ for (i = 0; i < 4; i++) {
++ outb(readkey[i], APPLESMC_DATA_PORT);
++ if (__wait_status(0x04))
++ return -EIO;
++ }
++
++ outb(4, APPLESMC_DATA_PORT);
++
++ for (i = 0; i < 4; i++) {
++ if (__wait_status(0x05))
++ return -EIO;
++ key[i] = inb(APPLESMC_DATA_PORT);
++ }
++ key[4] = 0;
++
++ return 0;
++}
++
++/*
++ * applesmc_get_key_type - get key type, and put the result in type (char[6]).
++ * Returns zero on success or a negative error on failure. Callers must
++ * hold applesmc_lock.
++ */
++static int applesmc_get_key_type(char* key, char* type)
++{
++ int i;
++
++ outb(APPLESMC_GET_KEY_TYPE_CMD, APPLESMC_CMD_PORT);
++ if (__wait_status(0x0c))
++ return -EIO;
++
++ for (i = 0; i < 4; i++) {
++ outb(key[i], APPLESMC_DATA_PORT);
++ if (__wait_status(0x04))
++ return -EIO;
++ }
++
++ outb(5, APPLESMC_DATA_PORT);
++
++ for (i = 0; i < 6; i++) {
++ if (__wait_status(0x05))
++ return -EIO;
++ type[i] = inb(APPLESMC_DATA_PORT);
++ }
++ type[5] = 0;
++
++ return 0;
++}
++
++/*
+ * applesmc_read_motion_sensor - Read motion sensor (X, Y or Z). Callers must
+ * hold applesmc_lock.
+ */
+@@ -656,6 +733,157 @@ static void applesmc_backlight_set(struct led_classdev *led_cdev,
+ mutex_unlock(&applesmc_lock);
+ }
+
++static ssize_t applesmc_key_count_show(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ int ret;
++ u8 buffer[4];
++ u32 count;
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_read_key(KEY_COUNT_KEY, buffer, 4);
++ count = ((u32)buffer[0]<<24) + ((u32)buffer[1]<<16) +
++ ((u32)buffer[2]<<8) + buffer[3];
++
++ mutex_unlock(&applesmc_lock);
++ if (ret)
++ return ret;
++ else
++ return snprintf(sysfsbuf, PAGE_SIZE, "%d\n", count);
++}
++
++static ssize_t applesmc_key_at_index_read_show(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ char key[5];
++ char info[6];
++ int ret;
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_get_key_at_index(key_at_index, key);
++
++ if (ret || !key[0]) {
++ mutex_unlock(&applesmc_lock);
++
++ return -EINVAL;
++ }
++
++ ret = applesmc_get_key_type(key, info);
++
++ if (ret) {
++ mutex_unlock(&applesmc_lock);
++
++ return ret;
++ }
++
++ /*
++ * info[0] maximum value (APPLESMC_MAX_DATA_LENGTH) is much lower than
++ * PAGE_SIZE, so we don't need any checks before writing to sysfsbuf.
++ */
++ ret = applesmc_read_key(key, sysfsbuf, info[0]);
++
++ mutex_unlock(&applesmc_lock);
++
++ if (!ret) {
++ return info[0];
++ }
++ else {
++ return ret;
++ }
++}
++
++static ssize_t applesmc_key_at_index_data_length_show(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ char key[5];
++ char info[6];
++ int ret;
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_get_key_at_index(key_at_index, key);
++
++ if (ret || !key[0]) {
++ mutex_unlock(&applesmc_lock);
++
++ return -EINVAL;
++ }
++
++ ret = applesmc_get_key_type(key, info);
++
++ mutex_unlock(&applesmc_lock);
++
++ if (!ret)
++ return snprintf(sysfsbuf, PAGE_SIZE, "%d\n", info[0]);
++ else
++ return ret;
++}
++
++static ssize_t applesmc_key_at_index_type_show(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ char key[5];
++ char info[6];
++ int ret;
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_get_key_at_index(key_at_index, key);
++
++ if (ret || !key[0]) {
++ mutex_unlock(&applesmc_lock);
++
++ return -EINVAL;
++ }
++
++ ret = applesmc_get_key_type(key, info);
++
++ mutex_unlock(&applesmc_lock);
++
++ if (!ret)
++ return snprintf(sysfsbuf, PAGE_SIZE, "%s\n", info+1);
++ else
++ return ret;
++}
++
++static ssize_t applesmc_key_at_index_name_show(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ char key[5];
++ int ret;
++
++ mutex_lock(&applesmc_lock);
++
++ ret = applesmc_get_key_at_index(key_at_index, key);
++
++ mutex_unlock(&applesmc_lock);
++
++ if (!ret && key[0])
++ return snprintf(sysfsbuf, PAGE_SIZE, "%s\n", key);
++ else
++ return -EINVAL;
++}
++
++static ssize_t applesmc_key_at_index_show(struct device *dev,
++ struct device_attribute *attr, char *sysfsbuf)
++{
++ return snprintf(sysfsbuf, PAGE_SIZE, "%d\n", key_at_index);
++}
++
++static ssize_t applesmc_key_at_index_store(struct device *dev,
++ struct device_attribute *attr, const char *sysfsbuf, size_t count)
++{
++ mutex_lock(&applesmc_lock);
++
++ key_at_index = simple_strtoul(sysfsbuf, NULL, 10);
++
++ mutex_unlock(&applesmc_lock);
++
++ return count;
++}
++
+ static struct led_classdev applesmc_backlight = {
+ .name = "smc:kbd_backlight",
+ .default_trigger = "nand-disk",
+@@ -677,6 +905,31 @@ static const struct attribute_group accelerometer_attributes_group =
+
+ static DEVICE_ATTR(light, 0444, applesmc_light_show, NULL);
+
++static DEVICE_ATTR(key_count, 0444, applesmc_key_count_show, NULL);
++static DEVICE_ATTR(key_at_index, 0644,
++ applesmc_key_at_index_show, applesmc_key_at_index_store);
++static DEVICE_ATTR(key_at_index_name, 0444,
++ applesmc_key_at_index_name_show, NULL);
++static DEVICE_ATTR(key_at_index_type, 0444,
++ applesmc_key_at_index_type_show, NULL);
++static DEVICE_ATTR(key_at_index_data_length, 0444,
++ applesmc_key_at_index_data_length_show, NULL);
++static DEVICE_ATTR(key_at_index_data, 0444,
++ applesmc_key_at_index_read_show, NULL);
++
++static struct attribute *key_enumeration_attributes[] = {
++ &dev_attr_key_count.attr,
++ &dev_attr_key_at_index.attr,
++ &dev_attr_key_at_index_name.attr,
++ &dev_attr_key_at_index_type.attr,
++ &dev_attr_key_at_index_data_length.attr,
++ &dev_attr_key_at_index_data.attr,
++ NULL
++};
++
++static const struct attribute_group key_enumeration_group =
++ { .attrs = key_enumeration_attributes };
++
+ /*
+ * Macro defining SENSOR_DEVICE_ATTR for a fan sysfs entries.
+ * - show actual speed
+@@ -920,6 +1173,11 @@ static int __init applesmc_init(void)
+ goto out_driver;
+ }
+
++ /* Create key enumeration sysfs files */
++ ret = sysfs_create_group(&pdev->dev.kobj, &key_enumeration_group);
++ if (ret)
++ goto out_device;
++
+ /* create fan files */
+ count = applesmc_get_fan_count();
+ if (count < 0) {
+@@ -936,7 +1194,7 @@ static int __init applesmc_init(void)
+ ret = sysfs_create_group(&pdev->dev.kobj,
+ &fan_attribute_groups[1]);
+ if (ret)
+- goto out_device;
++ goto out_key_enumeration;
+ case 1:
+ ret = sysfs_create_group(&pdev->dev.kobj,
+ &fan_attribute_groups[0]);
+@@ -1006,6 +1264,8 @@ out_temperature:
+ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]);
+ out_fan_1:
+ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]);
++out_key_enumeration:
++ sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group);
+ out_device:
+ platform_device_unregister(pdev);
+ out_driver:
+@@ -1027,6 +1287,7 @@ static void __exit applesmc_exit(void)
+ sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group);
+ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]);
+ sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]);
++ sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group);
+ platform_device_unregister(pdev);
+ platform_driver_unregister(&applesmc_driver);
+ release_region(APPLESMC_DATA_PORT, APPLESMC_NR_PORTS);
Added: trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch (rev 0)
+++ trunk/kernel/mactel-patches-2.6.21/0013-applesmc_int.patch 2007-04-12 16:38:05 UTC (rev 114)
@@ -0,0 +1,410 @@
+Interrupt support for the accelerometer.
+
+From: Nicolas Boichat <ni...@bo...>
+
+
+---
+
+ drivers/hwmon/applesmc.c | 316 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 293 insertions(+), 23 deletions(-)
+
+diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
+index 4ec38ef..6ad1c2d 100644
+--- a/drivers/hwmon/applesmc.c
++++ b/drivers/hwmon/applesmc.c
+@@ -38,14 +38,20 @@
+ #include <asm/io.h>
+ #include <linux/leds.h>
+ #include <linux/hwmon.h>
++#include <linux/interrupt.h>
+
+ /* data port used by Apple SMC */
+ #define APPLESMC_DATA_PORT 0x300
+ /* command/status port used by Apple SMC */
+ #define APPLESMC_CMD_PORT 0x304
++/* status port used by Apple SMC to get which interrupt type just happened */
++#define APPLESMC_INT_PORT 0x31f
+
+ #define APPLESMC_NR_PORTS 32 /* 0x300-0x31f */
+
++/* Defined in ACPI DSDT table, should we read it from there? */
++#define APPLESMC_IRQ 6
++
+ #define APPLESMC_MAX_DATA_LENGTH 32
+
+ #define APPLESMC_STATUS_MASK 0x0f
+@@ -56,6 +62,8 @@
+
+ #define KEY_COUNT_KEY "#KEY" /* r-o ui32 */
+
++#define INTERRUPT_OK_KEY "NTOK" /* w-o ui8 */
++
+ #define LIGHT_SENSOR_LEFT_KEY "ALV0" /* r-o {alv (6 bytes) */
+ #define LIGHT_SENSOR_RIGHT_KEY "ALV1" /* r-o {alv (6 bytes) */
+ #define BACKLIGHT_KEY "LKSB" /* w-o {lkb (2 bytes) */
+@@ -67,6 +75,19 @@
+ #define MOTION_SENSOR_Z_KEY "MO_Z" /* r-o sp78 (2 bytes) */
+ #define MOTION_SENSOR_KEY "MOCN" /* r/w ui16 */
+
++/*
++ * Interrupt controls.
++ * If the norm of the position (sqrt(MO_X^2+MO_Y^2+MO_Z^2)) is smaller than
++ * MOLT (free fall), or bigger than MOHT (high acceleration) for longer than the
++ * value of MOLD (or MOHD), SMC will trigger an interrupt.
++ */
++#define MOTION_LOW_NORM "MOLT" /* r/w sp78 (2 bytes) */
++#define MOTION_HIGH_NORM "MOHT" /* r/w sp78 (2 bytes) */
++#define MOTION_LOW_NORM_INTERVAL "MOLD" /* r/w ui8 */
++#define MOTION_HIGH_NORM_INTERVAL "MOHD" /* r/w ui8 */
++
++#define MSDW_KEY "MSDW" /* r/w flag (1 byte) */
++
+ #define FANS_COUNT "FNum" /* r-o ui8 */
+ #define FANS_MANUAL "FS! " /* r-w ui16 */
+ #define FAN_ACTUAL_SPEED "F0Ac" /* r-o fpe2 (2 bytes) */
+@@ -340,12 +361,79 @@ static int applesmc_read_motion_sensor(int index, s16* value)
+ }
+
+ /*
++ * applesmc_init_check_key_value - checks if a given key contains the bytes in
++ * buffer, if not, writes these bytes.
++ * In case of failure retry every INIT_WAIT_MSECS msec, and timeout if it
++ * waited more than INIT_TIMEOUT_MSECS in total.
++ * Returns zero on success or a negative error on failure. Callers must
++ * hold applesmc_lock.
++ */
++static int applesmc_init_check_key_value(const char* key, u8* buffer, u8 len)
++{
++ int total, ret, i, compare;
++ u8 rdbuffer[APPLESMC_MAX_DATA_LENGTH];
++
++ if (len > APPLESMC_MAX_DATA_LENGTH) {
++ printk(KERN_ERR "applesmc_init_check_key_value: cannot "
++ "read/write more than %d bytes",
++ APPLESMC_MAX_DATA_LENGTH);
++ return -EINVAL;
++ }
++
++ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
++ if (!(ret = applesmc_read_key(key, rdbuffer, len))) {
++ compare = 1;
++ for (i = 0; i < len; i++) {
++ if (rdbuffer[i] != buffer[i]) {
++ compare = 0;
++ break;
++ }
++ }
++
++ if (compare) {
++ return 0;
++ }
++ }
++ ret = applesmc_write_key(key, buffer, len);
++ msleep(INIT_WAIT_MSECS);
++ }
++
++ if (ret)
++ return ret;
++ else
++ return -EIO;
++}
++
++irqreturn_t applesmc_irq_handler(int irq, void *dev_id)
++{
++ u8 int_type = inb(APPLESMC_INT_PORT);
++
++ switch (int_type) {
++ case 0x60:
++ printk("applesmc: received a free fall interrupt\n");
++ break;
++ case 0x6f:
++ printk("applesmc: received a high acceleration interrupt\n");
++ break;
++ case 0x80:
++ printk("applesmc: received a shock interrupt\n");
++ break;
++ default:
++ printk("applesmc: received an unknown interrupt %x\n", int_type);
++ }
++
++ return IRQ_NONE;
++}
++
++/*
+ * applesmc_device_init - initialize the accelerometer. Returns zero on success
+ * and negative error code on failure. Can sleep.
+ */
+ static int applesmc_device_init(void)
+ {
+- int total, ret = -ENXIO;
++ int total;
++ int ret = -ENXIO;
++ int ret1, ret2;
+ u8 buffer[2];
+
+ if (!applesmc_accelerometer)
+@@ -353,32 +441,79 @@ static int applesmc_device_init(void)
+
+ mutex_lock(&applesmc_lock);
+
++ /* Accept interrupts */
++ buffer[0] = 0x01;
+ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
+- if (debug)
+- printk(KERN_DEBUG "applesmc try %d\n", total);
+- if (!applesmc_read_key(MOTION_SENSOR_KEY, buffer, 2) &&
+- (buffer[0] != 0x00 || buffer[1] != 0x00)) {
+- if (total == INIT_TIMEOUT_MSECS) {
+- printk(KERN_DEBUG "applesmc: device has"
+- " already been initialized"
+- " (0x%02x, 0x%02x).\n",
+- buffer[0], buffer[1]);
+- } else {
+- printk(KERN_DEBUG "applesmc: device"
+- " successfully initialized"
+- " (0x%02x, 0x%02x).\n",
+- buffer[0], buffer[1]);
+- }
+- ret = 0;
+- goto out;
+- }
+- buffer[0] = 0xe0;
+- buffer[1] = 0x00;
+- applesmc_write_key(MOTION_SENSOR_KEY, buffer, 2);
++ ret1 = applesmc_write_key(INTERRUPT_OK_KEY, buffer, 1);
++ msleep(INIT_WAIT_MSECS);
++
++ if (!ret1)
++ break;
++ }
++ if (ret1)
++ printk(KERN_WARNING "applesmc: Cannot set NTOK key, "
++ "will not receive interrupts.\n");
++
++ /* Setup interrupt controls. */
++ buffer[0] = 20; /* 20 msecs */
++ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM_INTERVAL,
++ buffer, 1);
++
++ buffer[0] = 20; /* 20 msecs */
++ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM_INTERVAL,
++ buffer, 1);
++
++ if (ret1 || ret2) {
++ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
++ "interrupt interval, might not receive "
++ "some interrupts.");
++ }
++
++ buffer[0] = 0x00;
++ buffer[1] = 0x60;
++ ret1 = applesmc_init_check_key_value(MOTION_LOW_NORM, buffer, 2);
++
++ buffer[0] = 0x01;
++ buffer[1] = 0xc0;
++ ret2 = applesmc_init_check_key_value(MOTION_HIGH_NORM, buffer, 2);
++
++ if (ret1 || ret2) {
++ printk(KERN_WARNING "applesmc: Cannot set motion sensor "
++ "min/max norm parameters, "
++ "might not receive some interrupts.");
++ }
++
++ /* Mysterious key. */
++ buffer[0] = 0x01;
++ for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
++ ret1 = applesmc_write_key(MSDW_KEY, buffer, 1);
+ msleep(INIT_WAIT_MSECS);
++
++ if (!ret1)
++ break;
++ }
++ if (ret1)
++ printk(KERN_WARNING "applesmc: Cannot set MSDW key\n");
++
++ /* Initialize the device. */
++ buffer[0] = 0xe0;
++ buffer[1] = 0xf8;
++ if (applesmc_init_check_key_value(MOTION_SENSOR_KEY, buffer, 2)) {
++ printk(KERN_WARNING "applesmc: failed to init "
++ "the accelerometer\n");
++ goto out;
+ }
+
+- printk(KERN_WARNING "applesmc: failed to init the device\n");
++ ret1 = request_irq(APPLESMC_IRQ, applesmc_irq_handler, IRQF_DISABLED,
++ "applesmc_irq_handler", NULL);
++
++ if (ret1) {
++ printk(KERN_WARNING "applesmc: cannot setup irq handler\n");
++ }
++
++ printk(KERN_DEBUG "applesmc: accelerometer "
++ "successfully initialized.\n");
++ ret = 0;
+
+ out:
+ mutex_unl...
[truncated message content] |
|
From: <nbo...@us...> - 2007-04-12 16:36:47
|
Revision: 113
http://svn.sourceforge.net/mactel-linux/?rev=113&view=rev
Author: nboichat
Date: 2007-04-12 09:36:44 -0700 (Thu, 12 Apr 2007)
Log Message:
-----------
Update patch descriptions.
Modified Paths:
--------------
trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch
trunk/kernel/mactel-patches-2.6.21/0003-msr-on-cpu.patch
trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch
trunk/kernel/mactel-patches-2.6.21/0008-msr.patch
trunk/kernel/mactel-patches-2.6.21/0009-applesmc_joydev.patch
Modified: trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch 2007-04-11 09:36:05 UTC (rev 112)
+++ trunk/kernel/mactel-patches-2.6.21/0001-applesmc.patch 2007-04-12 16:36:44 UTC (rev 113)
@@ -1,4 +1,4 @@
-This driver provides support for the Apple System Management Controller, which provides an accelerometer (Apple Sudden Motion Sensor), light sensors, temperature sensors, keyboard backlight control and fan control. Only Intel-based Apple's computers are supported (MacBook Pro, MacBook, MacMini).
+This driver provides support for the Apple System Management Controller, which provides an accelerometer (Apple Sudden Motion Sensor), light sensors, temperature sensors, keyboard backlight control and fan control. Only Intel-based Apple's computers are supported (MacBook Pro, MacBook, MacMini). - SENT UPSTREAM - in mm tree
From: Nicolas Boichat <ni...@bo...>
Modified: trunk/kernel/mactel-patches-2.6.21/0003-msr-on-cpu.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0003-msr-on-cpu.patch 2007-04-11 09:36:05 UTC (rev 112)
+++ trunk/kernel/mactel-patches-2.6.21/0003-msr-on-cpu.patch 2007-04-12 16:36:44 UTC (rev 113)
@@ -1,4 +1,4 @@
-This patch adds support for _safe (exception handled) variants of rdmsr_on_cpu and wrmsr_on_cpu. This is needed for the new coretemp driver, which might step into non-existing MSR (poorly documented).
+This patch adds support for _safe (exception handled) variants of rdmsr_on_cpu and wrmsr_on_cpu. This is needed for the new coretemp driver, which might step into non-existing MSR (poorly documented). -- FROM UPSTREAM - in mm
From: Rudolf Marek <r....@as...>
Modified: trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch 2007-04-11 09:36:05 UTC (rev 112)
+++ trunk/kernel/mactel-patches-2.6.21/0004-coretemp.patch 2007-04-12 16:36:44 UTC (rev 113)
@@ -1,4 +1,4 @@
-Intel Core CPU temperature monitor driver.
+Intel Core CPU temperature monitor driver. -- FROM UPSTREAM - in mm
From: lm-sensors mailing list <?>
Modified: trunk/kernel/mactel-patches-2.6.21/0008-msr.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0008-msr.patch 2007-04-11 09:36:05 UTC (rev 112)
+++ trunk/kernel/mactel-patches-2.6.21/0008-msr.patch 2007-04-12 16:36:44 UTC (rev 113)
@@ -1,4 +1,4 @@
-Use functions provided by arch/*/lib/msr-on-cpu.c in arch/i386/kernel/msr.c.
+Use functions provided by arch/*/lib/msr-on-cpu.c in arch/i386/kernel/msr.c. -- FROM UPSTREAM - in mm
From: Nicolas Boichat <ni...@bo...>
Modified: trunk/kernel/mactel-patches-2.6.21/0009-applesmc_joydev.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0009-applesmc_joydev.patch 2007-04-11 09:36:05 UTC (rev 112)
+++ trunk/kernel/mactel-patches-2.6.21/0009-applesmc_joydev.patch 2007-04-12 16:36:44 UTC (rev 113)
@@ -1,4 +1,4 @@
-- Invert y axis on input device. - Only activate the input device polling timer when the device is open. - Others fixes as asked by Dmitry Torokhov.
+- Invert y axis on input device. - Only activate the input device polling timer when the device is open. - Others fixes as asked by Dmitry Torokhov. - SENT UPSTREAM - in mm tree
From: Nicolas Boichat <ni...@bo...>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Miguel S. F. <mig...@gm...> - 2007-04-12 13:48:54
|
Hi all,
I too only have C1 and C2 states.
On 4/7/07, Ludovic Rousseau <lud...@gm...> wrote:
> On 07/04/07, Sven Anders <an...@an...> wrote:
> > For a start we take a look at the current available c-states:
> >
> > #> cat /proc/acpi/processor/CPU?/power
> >
> > active state: C3
> > max_cstate: C8
> > bus master activity: 00000000
> > maximum allowed latency: 8000 usec
> > states:
> > C1: type[C1] promotion[C2] demotion[--] latency[001]
> > usage[00002590] duration[00000000000000000000]
> > C2: type[C2] promotion[C3] demotion[C1] latency[001]
> > usage[00002086] duration[00000000000006795863]
> > *C3: type[C3] promotion[--] demotion[C2] latency[055]
> > usage[00003633] duration[00000000000009200376]
>
> I don't know if it is of any interest but I have a different result:
>
> $ cat /proc/acpi/processor/CPU0/power
> active state: C2
> max_cstate: C8
> bus master activity: 00000000
> states:
> C1: type[C1] promotion[C2] demotion[--]
> latency[000] usage[00000010] duration[00000000000000000000]
> *C2: type[C2] promotion[--] demotion[C1]
> latency[001] usage[01409563] duration[00000000005313483434]
>
> I have a MacBook Pro with Core1Duo and using the Debian Etch
> 2.6.18-4-686 kernel (no additional patch)
>
> Bye
This is a Macbook Pro 15.4", Dual Core T2500 cpu.
I get low battery uptime. (+/- 2h, not shure)
Kernel is 2.6.18.4-mactel
I'm using ATI drivers: fglrx 8.31.5
The distro is ubuntu 6.10
[CPU-POWERSTATES]
--(cray)-(pts2)-(14:30/12-Abr-07)--
--<~>-- cat /proc/acpi/processor/CPU?/power
active state: C2
max_cstate: C8
bus master activity: 00000000
states:
C1: type[C1] promotion[C2] demotion[--]
latency[000] usage[00000010] duration[00000000000000000000]
*C2: type[C2] promotion[--] demotion[C1]
latency[001] usage[43467481] duration[00000000203957347293]
active state: C2
max_cstate: C8
bus master activity: 00000000
states:
C1: type[C1] promotion[C2] demotion[--]
latency[000] usage[00000010] duration[00000000000000000000]
*C2: type[C2] promotion[--] demotion[C1]
latency[001] usage[43198784] duration[00000000208704738735]
Why doesn't the C3 state appear in here??
-- snippet of dmesg --
ACPI: (supports S0 S3 S4 S5)
...
ACPI (exconfig-0455): Dynamic SSDT Load - OemId [APPLE ] OemTableId [
Cpu0Ist] [20060707]
ACPI (exconfig-0455): Dynamic SSDT Load - OemId [APPLE ] OemTableId [
Cpu0Cst] [20060707]
ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3])
ACPI: Processor [CPU0] (supports 8 throttling states)
ACPI (exconfig-0455): Dynamic SSDT Load - OemId [APPLE ] OemTableId [
Cpu1Ist] [20060707]
ACPI (exconfig-0455): Dynamic SSDT Load - OemId [APPLE ] OemTableId [
Cpu1Cst] [20060707]
ACPI: CPU1 (power states: C1[C1] C2[C2] C3[C3])
ACPI: Processor [CPU1] (supports 8 throttling states)
[FANS]
--(cray)-(pts2)-(14:38/12-Abr-07)--
--</sys/devices/platform/applesmc>-- for i in fan*; do echo -n "$i: "
; cat $i; done
fan0_actual_speed: 998
fan0_manual: 0
fan0_maximum_speed: 6000
fan0_minimum_speed: 1000
fan0_safe_speed: 1200
fan0_target_speed: 1000
fan1_actual_speed: 996
fan1_manual: 0
fan1_maximum_speed: 6000
fan1_minimum_speed: 1000
fan1_safe_speed: 1200
fan1_target_speed: 1000
Any extra info about energy savings in linux ?
Best regards,
--
Miguel Sousa Filipe
|
|
From: Nicolas B. <ni...@bo...> - 2007-04-12 08:23:36
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Scott L. Price wrote: > With the latest mactel patches (svn updated about 20 minutes ago) I can > only get sound on my MacBook Pro 2,2 speakers if I check "Line In as > Output" in the mixer (using gamix on Gentoo). I don't mind having a > switch to turn the speakers on and off, but this seems a strange name to > me. I only found it because I was randomly trying controls to see if I > could make the speakers work. Could you please provide the output of: head -n 10 /proc/asound/card0/codec#0 Thanks, Best regards, Nicolas -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGHexr01ajQnpJXgERAp9BAJ0SBoHi02TB9NKfP+g6cZpeV7f1JwCfdCtT 3AwXJPDYsfkArHGAdmfv4uQ= =typ8 -----END PGP SIGNATURE----- |
|
From: Jurgen K. <gtm...@in...> - 2007-04-11 18:56:24
|
Oops, sorry guys wrong list... Jurgen On Wed, 2007-04-11 at 20:34 +0200, Jurgen Kramer wrote: > Hi, > > I normally use an up to date version of linuxsampler from SVN, > unfortunately the current version crashes on start: > > [root@paragon ~]# linuxsampler > LinuxSampler 0.4.0.2cvs > Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck > Copyright (C) 2005-2007 Christian Schoenebeck > Detected features: disabled at compile time > Creating Sampler...OK > *** glibc detected *** linuxsampler: corrupted double-linked list: > 0x098ef2f8 *** > ======= Backtrace: ========= > /lib/libc.so.6[0x4cc7e48b] > /lib/libc.so.6[0x4cc80645] > /lib/libc.so.6(__libc_malloc+0x7e)[0x4cc81ece] > /usr/lib/libstdc++.so.6(_Znwj+0x27)[0x4d0f23a7] > /usr/lib/linuxsampler/liblinuxsampler.so.0(_ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs+0xec)[0x4ac6055c] > /usr/lib/linuxsampler/liblinuxsampler.so.0(_ZN12LinuxSampler13EngineFactory20AvailableEngineTypesEv+0x98)[0x4ac5fc18] > /usr/lib/linuxsampler/liblinuxsampler.so.0(_ZN12LinuxSampler13EngineFactory28AvailableEngineTypesAsStringEv+0x1f)[0x4ac5fd2f] > linuxsampler[0x8049dc9] > /lib/libc.so.6(__libc_start_main+0xdc)[0x4cc2ff2c] > linuxsampler(__gxx_personality_v0+0xbd)[0x8049711] > ======= Memory map: ======== > 00232000-00233000 r-xp 00232000 00:00 0 [vdso] > 08048000-0804c000 r-xp 00000000 08:06 > 16867872 /usr/local/bin/linuxsampler > 0804c000-0804d000 rwxp 00003000 08:06 > 16867872 /usr/local/bin/linuxsampler > 098ee000-0990f000 rwxp 098ee000 00:00 0 > 443fd000-444d6000 r-xp 00000000 08:06 25722881 /lib/libasound.so.2.0.0 > 444d6000-444db000 rwxp 000d8000 08:06 25722881 /lib/libasound.so.2.0.0 > 45514000-45519000 r-xp 00000000 08:06 > 16864143 /usr/lib/libartsc.so.0.0.0 > 45519000-4551a000 rwxp 00004000 08:06 > 16864143 /usr/lib/libartsc.so.0.0.0 > 476bd000-4775a000 r-xp 00000000 08:06 > 48726018 /lib/libglib-2.0.so.0.1200.9 > 4775a000-4775b000 rwxp 0009d000 08:06 > 48726018 /lib/libglib-2.0.so.0.1200.9 > 4779e000-477a0000 r-xp 00000000 08:06 > 48726040 /lib/libgmodule-2.0.so.0.1200.9 > 477a0000-477a1000 rwxp 00002000 08:06 > 48726040 /lib/libgmodule-2.0.so.0.1200.9 > 47c84000-47c88000 r-xp 00000000 08:06 > 48726045 /lib/libgthread-2.0.so.0.1200.9 > 47c88000-47c89000 rwxp 00003000 08:06 > 48726045 /lib/libgthread-2.0.so.0.1200.9 > 4abb9000-4acd7000 r-xp 00000000 08:06 > 17499857 /usr/lib/linuxsampler/liblinuxsampler.so.0.0.0 > 4acd7000-4acdb000 rwxp 0011e000 08:06 > 17499857 /usr/lib/linuxsampler/liblinuxsampler.so.0.0.0 > 4acdb000-4ace5000 rwxp 4acdb000 00:00 0 > 4acf8000-4ad26000 r-xp 00000000 08:06 > 16873359 /usr/lib/libgig.so.6.1.0 > 4ad26000-4ad27000 rwxp 0002e000 08:06 > 16873359 /usr/lib/libgig.so.6.1.0 > 4cbfd000-4cc16000 r-xp 00000000 08:06 48726205 /lib/ld-2.5.so > 4cc16000-4cc17000 r-xp 00018000 08:06 48726205 /lib/ld-2.5.so > 4cc17000-4cc18000 rwxp 00019000 08:06 48726205 /lib/ld-2.5.so > 4cc1a000-4cd51000 r-xp 00000000 08:06 48726222 /lib/libc-2.5.so > 4cd51000-4cd53000 r-xp 00137000 08:06 48726222 /lib/libc-2.5.so > 4cd53000-4cd54000 rwxp 00139000 08:06 48726222 /lib/libc-2.5.so > 4cd54000-4cd57000 rwxp 4cd54000 00:00 0 > 4cd59000-4cd7e000 r-xp 00000000 08:06 48726940 /lib/libm-2.5.so > 4cd7e000-4cd7f000 r-xp 00024000 08:06 48726940 /lib/libm-2.5.so > 4cd7f000-4cd80000 rwxp 00025000 08:06 48726940 /lib/libm-2.5.so > 4cd82000-4cd84000 r-xp 00000000 08:06 48726941 /lib/libdl-2.5.so > 4cd84000-4cd85000 r-xp 00001000 08:06 48726941 /lib/libdl-2.5.so > 4cd85000-4cd86000 rwxp 00002000 08:06 48726941 /lib/libdl-2.5.so > 4cd88000-4cd9b000 r-xp 00000000 08:06 48726936 /lib/libpthread-2.5.so > 4cd9b000-4cd9c000 r-xp 00012000 08:06 48726936 /lib/libpthread-2.5.so > 4cd9c000-4cd9d000 rwxp 00013000 08:06 48726936 /lib/libpthread-2.5.so > 4cd9d000-4cd9f000 rwxp 4cd9d000 00:00 0 > 4cdcd000-4ce2a000 r-xp 00000000 08:06 > 16873834 /usr/lib/libsqlite3.so.0.8.6 > 4ce2a000-4ce2c000 rwxp 0005c000 08:06 > 16873834 /usr/lib/libsqlite3.so.0.8.6 > 4d000000-4d007000 r-xp 00000000 08:06 48726937 /lib/librt-2.5.so > 4d007000-4d008000 r-xp 00006000 08:06 48726937 /lib/librt-2.5.so > 4d008000-4d009000 rwxp 00007000 08:06 48726937 /lib/librt-2.5.so > 4d00b000-4d016000 r-xp 00000000 08:06 > 48726945 /lib/libgcc_s-4.1.1-20070105.so.1 > 4d016000-4d017000 rwxp 0000a000 08:06 > 48726945 /lib/libgcc_s-4.1.1-20070105.so.1 > 4d03d000-4d11d000 r-xp 00000000 08:06 16873709 /usr/lib/libstdc > ++.so.6.0.8 > 4d11d000-4d120000 r-xp 000e0000 08:06 16873709 /usr/lib/libstdc > ++.so.6.0.8 > 4d120000-4d122000 rwxp 000e3000 08:06 16873709 /usr/lib/libstdc > ++.so.6.0.8 > 4d122000-4d128000 rwxp 4d122000 00:00 0 > 4e8c1000-4e8d1000 r-xp 00000000 08:06 > 16872883 /usr/lib/libjack.so.0.0.23 > 4e8d1000-4e8d3000 rwxp 00010000 08:06 > 16872883 /usr/lib/libjack.so.0.0.23 > 4e8d3000-4e8db000 rwxp 4e8d3000 00:00 0 > b7e00000-b7e21000 rw-p b7e00000 00:00 0 > b7e21000-b7f00000 ---p b7e21000 00:00 0 > b7f3f000-b7f44000 rw-p b7f3f000 00:00 0 > b7f5e000-b7f60000 rw-p b7f5e0Aborted > > Is the current version supposed to work? > > Jurgen > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Mactel-linux-devel mailing list > Mac...@li... > https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel > |
|
From: Jurgen K. <gtm...@in...> - 2007-04-11 18:35:05
|
Hi, I normally use an up to date version of linuxsampler from SVN, unfortunately the current version crashes on start: [root@paragon ~]# linuxsampler LinuxSampler 0.4.0.2cvs Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck Copyright (C) 2005-2007 Christian Schoenebeck Detected features: disabled at compile time Creating Sampler...OK *** glibc detected *** linuxsampler: corrupted double-linked list: 0x098ef2f8 *** ======= Backtrace: ========= /lib/libc.so.6[0x4cc7e48b] /lib/libc.so.6[0x4cc80645] /lib/libc.so.6(__libc_malloc+0x7e)[0x4cc81ece] /usr/lib/libstdc++.so.6(_Znwj+0x27)[0x4d0f23a7] /usr/lib/linuxsampler/liblinuxsampler.so.0(_ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs+0xec)[0x4ac6055c] /usr/lib/linuxsampler/liblinuxsampler.so.0(_ZN12LinuxSampler13EngineFactory20AvailableEngineTypesEv+0x98)[0x4ac5fc18] /usr/lib/linuxsampler/liblinuxsampler.so.0(_ZN12LinuxSampler13EngineFactory28AvailableEngineTypesAsStringEv+0x1f)[0x4ac5fd2f] linuxsampler[0x8049dc9] /lib/libc.so.6(__libc_start_main+0xdc)[0x4cc2ff2c] linuxsampler(__gxx_personality_v0+0xbd)[0x8049711] ======= Memory map: ======== 00232000-00233000 r-xp 00232000 00:00 0 [vdso] 08048000-0804c000 r-xp 00000000 08:06 16867872 /usr/local/bin/linuxsampler 0804c000-0804d000 rwxp 00003000 08:06 16867872 /usr/local/bin/linuxsampler 098ee000-0990f000 rwxp 098ee000 00:00 0 443fd000-444d6000 r-xp 00000000 08:06 25722881 /lib/libasound.so.2.0.0 444d6000-444db000 rwxp 000d8000 08:06 25722881 /lib/libasound.so.2.0.0 45514000-45519000 r-xp 00000000 08:06 16864143 /usr/lib/libartsc.so.0.0.0 45519000-4551a000 rwxp 00004000 08:06 16864143 /usr/lib/libartsc.so.0.0.0 476bd000-4775a000 r-xp 00000000 08:06 48726018 /lib/libglib-2.0.so.0.1200.9 4775a000-4775b000 rwxp 0009d000 08:06 48726018 /lib/libglib-2.0.so.0.1200.9 4779e000-477a0000 r-xp 00000000 08:06 48726040 /lib/libgmodule-2.0.so.0.1200.9 477a0000-477a1000 rwxp 00002000 08:06 48726040 /lib/libgmodule-2.0.so.0.1200.9 47c84000-47c88000 r-xp 00000000 08:06 48726045 /lib/libgthread-2.0.so.0.1200.9 47c88000-47c89000 rwxp 00003000 08:06 48726045 /lib/libgthread-2.0.so.0.1200.9 4abb9000-4acd7000 r-xp 00000000 08:06 17499857 /usr/lib/linuxsampler/liblinuxsampler.so.0.0.0 4acd7000-4acdb000 rwxp 0011e000 08:06 17499857 /usr/lib/linuxsampler/liblinuxsampler.so.0.0.0 4acdb000-4ace5000 rwxp 4acdb000 00:00 0 4acf8000-4ad26000 r-xp 00000000 08:06 16873359 /usr/lib/libgig.so.6.1.0 4ad26000-4ad27000 rwxp 0002e000 08:06 16873359 /usr/lib/libgig.so.6.1.0 4cbfd000-4cc16000 r-xp 00000000 08:06 48726205 /lib/ld-2.5.so 4cc16000-4cc17000 r-xp 00018000 08:06 48726205 /lib/ld-2.5.so 4cc17000-4cc18000 rwxp 00019000 08:06 48726205 /lib/ld-2.5.so 4cc1a000-4cd51000 r-xp 00000000 08:06 48726222 /lib/libc-2.5.so 4cd51000-4cd53000 r-xp 00137000 08:06 48726222 /lib/libc-2.5.so 4cd53000-4cd54000 rwxp 00139000 08:06 48726222 /lib/libc-2.5.so 4cd54000-4cd57000 rwxp 4cd54000 00:00 0 4cd59000-4cd7e000 r-xp 00000000 08:06 48726940 /lib/libm-2.5.so 4cd7e000-4cd7f000 r-xp 00024000 08:06 48726940 /lib/libm-2.5.so 4cd7f000-4cd80000 rwxp 00025000 08:06 48726940 /lib/libm-2.5.so 4cd82000-4cd84000 r-xp 00000000 08:06 48726941 /lib/libdl-2.5.so 4cd84000-4cd85000 r-xp 00001000 08:06 48726941 /lib/libdl-2.5.so 4cd85000-4cd86000 rwxp 00002000 08:06 48726941 /lib/libdl-2.5.so 4cd88000-4cd9b000 r-xp 00000000 08:06 48726936 /lib/libpthread-2.5.so 4cd9b000-4cd9c000 r-xp 00012000 08:06 48726936 /lib/libpthread-2.5.so 4cd9c000-4cd9d000 rwxp 00013000 08:06 48726936 /lib/libpthread-2.5.so 4cd9d000-4cd9f000 rwxp 4cd9d000 00:00 0 4cdcd000-4ce2a000 r-xp 00000000 08:06 16873834 /usr/lib/libsqlite3.so.0.8.6 4ce2a000-4ce2c000 rwxp 0005c000 08:06 16873834 /usr/lib/libsqlite3.so.0.8.6 4d000000-4d007000 r-xp 00000000 08:06 48726937 /lib/librt-2.5.so 4d007000-4d008000 r-xp 00006000 08:06 48726937 /lib/librt-2.5.so 4d008000-4d009000 rwxp 00007000 08:06 48726937 /lib/librt-2.5.so 4d00b000-4d016000 r-xp 00000000 08:06 48726945 /lib/libgcc_s-4.1.1-20070105.so.1 4d016000-4d017000 rwxp 0000a000 08:06 48726945 /lib/libgcc_s-4.1.1-20070105.so.1 4d03d000-4d11d000 r-xp 00000000 08:06 16873709 /usr/lib/libstdc ++.so.6.0.8 4d11d000-4d120000 r-xp 000e0000 08:06 16873709 /usr/lib/libstdc ++.so.6.0.8 4d120000-4d122000 rwxp 000e3000 08:06 16873709 /usr/lib/libstdc ++.so.6.0.8 4d122000-4d128000 rwxp 4d122000 00:00 0 4e8c1000-4e8d1000 r-xp 00000000 08:06 16872883 /usr/lib/libjack.so.0.0.23 4e8d1000-4e8d3000 rwxp 00010000 08:06 16872883 /usr/lib/libjack.so.0.0.23 4e8d3000-4e8db000 rwxp 4e8d3000 00:00 0 b7e00000-b7e21000 rw-p b7e00000 00:00 0 b7e21000-b7f00000 ---p b7e21000 00:00 0 b7f3f000-b7f44000 rw-p b7f3f000 00:00 0 b7f5e000-b7f60000 rw-p b7f5e0Aborted Is the current version supposed to work? Jurgen |
|
From: Scott L. P. <pr...@df...> - 2007-04-11 15:13:50
|
With the latest mactel patches (svn updated about 20 minutes ago) I can only get sound on my MacBook Pro 2,2 speakers if I check "Line In as Output" in the mixer (using gamix on Gentoo). I don't mind having a switch to turn the speakers on and off, but this seems a strange name to me. I only found it because I was randomly trying controls to see if I could make the speakers work. Have a good day. Scott =) -- Electrical Engineering/Web Development Hunt Utilities Group LLC http://www.hugllc.com Pine River, MN (218) 587-5001 Hopkins, MN (952) 935-2418 |
|
From: <nbo...@us...> - 2007-04-11 09:36:14
|
Revision: 112
http://svn.sourceforge.net/mactel-linux/?rev=112&view=rev
Author: nboichat
Date: 2007-04-11 02:36:05 -0700 (Wed, 11 Apr 2007)
Log Message:
-----------
Fix missing ;.
Modified Paths:
--------------
trunk/kernel/mactel-patches-2.6.21/0007-sigmatel_audio2.patch
trunk/kernel/mactel-patches-2.6.21/0010-sigmatel_audio3.patch
Modified: trunk/kernel/mactel-patches-2.6.21/0007-sigmatel_audio2.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0007-sigmatel_audio2.patch 2007-04-11 07:48:53 UTC (rev 111)
+++ trunk/kernel/mactel-patches-2.6.21/0007-sigmatel_audio2.patch 2007-04-11 09:36:05 UTC (rev 112)
@@ -9,10 +9,10 @@
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
-index c94291b..af46702 100644
+index c94291b..b1df711 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
-@@ -524,16 +524,22 @@ static unsigned int d945gtp5_pin_configs[10] = {
+@@ -524,18 +524,24 @@ static unsigned int d945gtp5_pin_configs[10] = {
0x02a19320, 0x40000100,
};
@@ -31,15 +31,17 @@
0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
0x02a19320, 0x400000fb
-+}
-+
+ };
+
+static unsigned int macbook_pro_v1_pin_configs[10] = {
+ 0x0321e230, 0x02a7e020, 0x9017e110, 0x01014010,
+ 0x400000fd, 0x0381e021, 0x1345e240, 0x13c5e22e,
+ 0x400000fc, 0x400000fb
- };
-
++};
++
static unsigned int macbook_pro_v2_pin_configs[10] = {
+ 0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
+ 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e,
@@ -546,7 +552,7 @@ static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
[STAC_D945_REF] = ref922x_pin_configs,
[STAC_D945GTP3] = d945gtp3_pin_configs,
Modified: trunk/kernel/mactel-patches-2.6.21/0010-sigmatel_audio3.patch
===================================================================
--- trunk/kernel/mactel-patches-2.6.21/0010-sigmatel_audio3.patch 2007-04-11 07:48:53 UTC (rev 111)
+++ trunk/kernel/mactel-patches-2.6.21/0010-sigmatel_audio3.patch 2007-04-11 09:36:05 UTC (rev 112)
@@ -9,7 +9,7 @@
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
-index af46702..89a7e19 100644
+index b1df711..4fa6049 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1914,6 +1914,7 @@ static int patch_stac922x(struct hda_codec *codec)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|