Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969409AbXFHOXY (ORCPT ); Fri, 8 Jun 2007 10:23:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S968864AbXFHOXK (ORCPT ); Fri, 8 Jun 2007 10:23:10 -0400 Received: from wa-out-1112.google.com ([209.85.146.176]:41735 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967844AbXFHOXE (ORCPT ); Fri, 8 Jun 2007 10:23:04 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=sBfBJCx1yYxD8tOdwnNlz0jy+DxnGJN5MuTPHhO0XIgVBkYNPSsRb0J4kjTZdyjvYbwLftaMVCgslk4MHJMKTFQOsv5PA1+JHiXefClOe9lorgi6zHz5z+Ys69XD0YFnJcUSrvvocUKEAXwVJwTRXjJQ7v2Um4/QqEeAwwmrWqo= Message-ID: Date: Fri, 8 Jun 2007 10:23:01 -0400 From: "Dmitry Torokhov" To: "Richard Hughes" Subject: Re: Add INPUT support to toshiba_acpi Cc: "Matthew Garrett" , "Bastien Nocera" , "John Belmonte" , linux-kernel , linux-acpi In-Reply-To: <1181235539.2610.72.camel@work> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_35048_8068597.1181312581793" References: <1180614979.2693.26.camel@localhost.localdomain> <1180788652.2355.27.camel@localhost.localdomain> <20070602142333.GA3452@srcf.ucam.org> <200706030048.40393.dtor@insightbb.com> <1181235539.2610.72.camel@work> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 26206 Lines: 371 ------=_Part_35048_8068597.1181312581793 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/7/07, Richard Hughes wrote: > On Sun, 2007-06-03 at 00:48 -0400, Dmitry Torokhov wrote: > > > > > > It looks like KEY_COFFE comes from 0x0c/0x19e - AL Terminal > > Lock/Screensaver > > so your interpretation is indeed correct. I guess I better add an > > alias to > > input.h > > What's the status of this patch? Good for merging? Not my call - John is the official maintainer of the driver. However from input layer POV it looks good. > Do you want me to > redo the current patch using input-polldev The patch I send to you earlier already does this. I am attaching a refreshed version that used KEY_COFFEE instead of KEY_BREAK. > and the new setkeycode stuff? And I have the patch doing this as well (attached). If you could please give it a try I'd appreciate it. -- Dmitry ------=_Part_35048_8068597.1181312581793 Content-Type: text/plain; name="toshiba_acpi_add_buttons.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="toshiba_acpi_add_buttons.patch" X-Attachment-Id: f_f2or00uq RnJvbTogUmljaGFyZCBIdWdoZXMgPGh1Z2hzaWVudEBnbWFpbC5jb20+ClN1YmplY3Q6IHRvc2hp YmFfYWNwaTogaW50ZWdyYXRlIHdpdGggSU5QVVQgbGF5ZXIKClRvc2hpYmEgaGFyZHdhcmUgaXMg YSBsaXR0bGUgb2RkYmFsbCwgYW5kIGRvZXMgbm90IHByb3ZpZGUgQUNQSSBldmVudHMKb24gc29t ZSBrZXkgcHJlc3NlcywgdHlwaWNhbGx5IEZuIGhvdGtleSBidXR0b25zLiBUaGUga2V5IGludGVy ZmFjZSBpcwpub3cgcG9sbGVkLCBhbmQgZXZlbnRzIG5vdyBtYXRjaGVkIHRvIGEgbGlzdCBvZiB0 b3NoaWJhIHNwZWNpZmljCnNjYW5jb2RlcywgYW5kIGFyZSBzcXVpcnRlZCB0byB1c2Vyc3BhY2Ug dXNpbmcgdGhlIElOUFVUIHN1YnN5c3RlbS4KClRoaXMgbWVhbnMgdGhhdCB0b3NoaWJhIGxhcHRv cHMgYnV0dG9ucyAianVzdCB3b3JrIiB3aXRob3V0IGFueQp1c2Vyc3BhY2UgZGFlbW9uICh1c2lu ZyB1aW5wdXQpIHN1Y2ggYXMgZm5meCBvciBib2RnZXMgc3VjaCBhcyB1c2luZyBhCnVzZXJz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OiBsaW51eC9Eb2N1bWVu dGF0aW9uL2tlcm5lbC1wYXJhbWV0ZXJzLnR4dAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaW51eC5vcmlnL0Rv Y3VtZW50YXRpb24va2VybmVsLXBhcmFtZXRlcnMudHh0CisrKyBsaW51eC9Eb2N1bWVudGF0aW9u L2tlcm5lbC1wYXJhbWV0ZXJzLnR4dApAQCAtMTg3NSw2ICsxODc1LDE3IEBAIGFuZCBpcyBiZXR3 ZWVuIDI1NiBhbmQgNDA5NiBjaGFyYWN0ZXJzLiAKIAkJCVNlZSBjb21tZW50IGJlZm9yZSBmdW5j dGlvbiBkYzM5MF9zZXR1cCgpIGluCiAJCQlkcml2ZXJzL3Njc2kvdG1zY3NpbS5jLgogCisJdG9z aGliYV9hY3BpLmhvdGtleXNfb3Zlcl9pbnB1dAorCQkJW0hXLEFDUEldCisJCQlJbnN0cnVjdHMg dGhlIGRyaXZlciB0byBkZWxpdmVyIGhvdGtleSBldmVudHMKKwkJCXZpYSBpbnB1dCBsYXllciBh cyBvcHBvc2VkIHRvIC9wcm9jLiBFbmFibGVkCisJCQlieSBkZWZhdWx0LgorCXRvc2hpYmFfYWNw aS5ob3RrZXlzX3BvbGxfaW50ZXJ2YWwgPQorCQkJW0hXLEFDUEldCisJCQlEZXRlcm1pbmVzIGhv dyBvZnRlbiB0aGUgZHJpdmVyIHBvbGxzIGhvdGtleQorCQkJc3RhdGUgd2hlbiBob3RrZXlzIGFy ZSBkZWxpdmVyZWQgdmlhIGlucHV0CisJCQlsYXllci4gRGVmYXVsdCBpcyA1MDAgbXNlY3MuCisK IAl0cDcyMD0JCVtIVyxQUzJdCiAKIAl0cml4PQkJW0hXLE9TU10gTWVkaWFUcml4IEF1ZGlvVHJp eCBQcm8K ------=_Part_35048_8068597.1181312581793 Content-Type: text/plain; name="toshiba-acpi-setkeycodes.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="toshiba-acpi-setkeycodes.patch" X-Attachment-Id: f_f2or057t U3ViamVjdDogdG9zaGliYV9hY3BpOiBhZGQgc3VwcG9ydCBmb3IgYWx0ZXJpbmcga2V5bWFwCgpJ bXBsZW1lbnQgZ2V0a2V5Y29kZSBhbmQgc2V0a2V5Y29kZSBtZXRob2RzIG9mIGlucHV0IGRldmlj ZSBzbyB0aGF0CnVzZXJzIGNhbiBhZGp1c3QgZHJpdmVyJ3Mga2V5bWFwIGlmIHRoZXkgd2lzaCB0 byBkbyBzby4KClNpZ25lZC1vZmYtYnk6IERtaXRyeSBUb3Jva2hvdiA8ZHRvckBtYWlsLnJ1Pgot LS0KIGRyaXZlcnMvYWNwaS90b3NoaWJhX2FjcGkuYyB8ICAxMTQgKysrKysrKysrKysrKysrKysr KysrKysrKysrKystLS0tLS0tLS0tLS0tLS0KIDEgZmlsZSBjaGFuZ2VkLCA3NyBpbnNlcnRpb25z KCspLCAzNyBkZWxldGlvbnMoLSkKCkluZGV4OiBsaW51eC9kcml2ZXJzL2FjcGkvdG9zaGliYV9h Y3BpLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PQotLS0gbGludXgub3JpZy9kcml2ZXJzL2FjcGkvdG9zaGliYV9hY3Bp LmMKKysrIGxpbnV4L2RyaXZlcnMvYWNwaS90b3NoaWJhX2FjcGkuYwpAQCAtNjAzLDUxICs2MDMs ODggQEAgc3RhdGljIHN0cnVjdCBiYWNrbGlnaHRfb3BzIHRvc2hpYmFfYmFjawogCS51cGRhdGVf c3RhdHVzICA9IHNldF9sY2Rfc3RhdHVzLAogfTsKIAorc3RhdGljIHN0cnVjdCB0b3NoaWJhX2tl eSB7CisJaW50IGNvZGU7CisJaW50IGtleWNvZGU7Cit9IHRvc2hpYmFfa2V5bWFwW10gPSB7CisJ eyAgSENJX0hLRVlfRk4sCQkJS0VZX1JFU0VSVkVEIH0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1bHQ6Ci0JCWtleWNvZGUgPSBLRVlfVU5LTk9XTjsKLQkJYnJlYWs7Ci0J fQotCi0JaWYgKGtleWNvZGUgIT0gS0VZX1JFU0VSVkVEKSB7Ci0JCWlucHV0X3JlcG9ydF9rZXko aW5wdXQsIGtleWNvZGUsIGtleV9kb3duKTsKKwlrZXkgPSB0b3NoaWJhX2dldF9rZXlfYnlfc2Nh bmNvZGUodmFsdWUpOworCWlmIChrZXkgJiYga2V5LT5rZXljb2RlICE9IEtFWV9SRVNFUlZFRCkg eworCQlpbnB1dF9yZXBvcnRfa2V5KGlucHV0LCBrZXktPmtleWNvZGUsIGtleV9kb3duKTsKIAkJ aW5wdXRfZXZlbnQoaW5wdXQsIEVWX01TQywgTVNDX1NDQU4sIHZhbHVlKTsKIAkJaW5wdXRfc3lu YyhpbnB1dCk7CiAJfQpAQCAtNzIwLDYgKzc1Nyw5IEBAIHN0YXRpYyBpbnQgX19pbml0IHRvc2hp YmFfaW5wdXRfcG9sbGRldl8KIAlzZXRfYml0KEtFWV9CUklHSFRORVNTVVAsIGlucHV0LT5rZXli aXQpOwogCXNldF9iaXQoS0VZX1dMQU4sIGlucHV0LT5rZXliaXQpOwogCisJaW5wdXQtPmdldGtl eWNvZGUgPSB0b3NoaWJhX2dldGtleWNvZGU7CisJaW5wdXQtPnNldGtleWNvZGUgPSB0b3NoaWJh X3NldGtleWNvZGU7CisKIAllcnJvciA9IGlucHV0X3JlZ2lzdGVyX3BvbGxlZF9kZXZpY2UodG9z aGliYV9wb2xsX2Rldik7CiAJaWYgKGVycm9yKSB7CiAJCXByaW50ayhNWV9FUlIgImNvdWxkIG5v dCByZWdpc3RlciBpbnB1dCBkZXZpY2VcbiIpOwo= ------=_Part_35048_8068597.1181312581793-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/