Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933107Ab0BEEyX (ORCPT ); Thu, 4 Feb 2010 23:54:23 -0500 Received: from p01c12o145.mxlogic.net ([208.65.145.68]:56590 "EHLO p01c12o145.mxlogic.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932780Ab0BEEyW (ORCPT ); Thu, 4 Feb 2010 23:54:22 -0500 X-Greylist: delayed 416 seconds by postgrey-1.27 at vger.kernel.org; Thu, 04 Feb 2010 23:54:21 EST X-MXL-Hash: 4b6ba47d46e982bf-d0d2e6ed519b2ecd6f2abb270400ef6eaf300d5a X-MXL-Hash: 4b6ba2de09d7ed1c-99e1b92bcbb49ee36739742a6b270a4ca46aaacf X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CAA61E.447B7191" Subject: [PATCH] linux-2.6.32-directemp Date: Thu, 4 Feb 2010 20:47:05 -0800 Message-ID: <68FBE0F3CE97264395875AC1C468F22C24A5BD@mail03.cyberswitching.local> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: [PATCH] linux-2.6.32-directemp thread-index: AcqmHkQgTZkxOMG7SGaPcfVLtidHUw== From: "Chris Verges" To: "Greg Kroah-Hartman" , , Cc: "Rob Owings" X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2010011101)] X-MAIL-FROM: X-SOURCE-IP: [64.81.28.110] X-AnalysisOut: [v=1.0 c=1 a=4zsJQXJisSY22NXBO5KRuA==:17 a=CU1jpVUMdG0L-Tj2] X-AnalysisOut: [j34A:9 a=SIK9lRVA8j-EzeoFAHEA:7 a=5irgV_pyB4ME-dEgma1eRdPB] X-AnalysisOut: [5ksA:4 a=wzgqfsuUAAAA:8 a=1MA4gY1UAAAA:8 a=pPpTWblbI5632_J] X-AnalysisOut: [EdzUA:9 a=RbRxuBUKmwJuuu4aPb8A:7 a=RqeJeLZQ67ZhcRoBmHjKh1_] X-AnalysisOut: [v-woA:4 a=yvfu_RGVus0A:10 a=A41Hnd-80XwA:10 a=RuyJMZ2cEBnS] X-AnalysisOut: [QFRN:21 a=YNV2SK7ZepFzvsF8:21] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 15500 Lines: 231 This is a multi-part message in MIME format. ------_=_NextPart_001_01CAA61E.447B7191 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Linux gurus, Attached is a patch for the QTI DirecTEMP USB thermometer & thermometer/hygrometer sensors. This patch is based on linux-2.6.32. Functionality has been verified against both hardware variants listed in the driver (0x0002 and 0x0006), as both monolithic and modular. When the QTI DirecTEMP sensor is connected to a system, the directemp driver adds appropriate sysfs entries for the sensor type(s) supported. Examples: # PID 0x0002 (temp only) /sys/bus/usb/devices/.../temp # PID 0x0006 (temp + relative humidity) /sys/bus/usb/devices/.../temp /sys/bus/usb/devices/.../rh Using a standard "cat" will display the value. An additional "raw" sysfs entry has been added to aid in debugging. If used, an "echo" will send the data specified in the string to the USB device, and print back the results. It is not recommended for customer use except by expert users. And with that description out of the way, I look forward to your review of the driver. Please provide any feedback that you may have. Thanks in advance, Chris ------_=_NextPart_001_01CAA61E.447B7191 Content-Type: application/octet-stream; name="linux-2.6.32-directemp.patch" Content-Transfer-Encoding: base64 Content-Description: linux-2.6.32-directemp.patch Content-Disposition: attachment; filename="linux-2.6.32-directemp.patch" U2lnbmVkLW9mZi1ieTogQ2hyaXMgVmVyZ2VzIDxjaHJpc3ZAY3liZXJzd2l0Y2hpbmcuY29tPgoK SW5kZXg6IGRyaXZlcnMvdXNiL21pc2MvS2NvbmZpZwo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBhL2RyaXZlcnMv dXNiL21pc2MvS2NvbmZpZworKysgYi9kcml2ZXJzL3VzYi9taXNjL0t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Q1RFTVBf TVNHX1NJWkUpOworCQlpZiAoZXJyIDwgMCkKKwkJCWNvbnRpbnVlOworCQlpZiAoZGF0YVswXSA9 PSBkaXJlY3RlbXAtPnJlYWRfdGVtcCkKKwkJCWJyZWFrOworCX0KKworCWlmIChpID49IERJUkVD VEVNUF9NQVhfUkVUUklFUykgeworCQlkZXZfZXJyKGRldiwgImV4Y2VlZGVkIG1heGltdW0gcmV0 cnkgY291bnRcbiIpOworCQlyZXR1cm4gc3ByaW50ZihidWYsICItLS4tIENcbiIpOworCX0KKwor CS8qIFNhbml0aXplIHRoZSBvdXRwdXQgKi8KKwlmb3IgKGkgPSAxOyBpIDwgRElSRUNURU1QX01T R19TSVpFOyBpKyspCisJCWlmICghaXNkaWdpdChkYXRhW2ldKSAmJiBkYXRhW2ldICE9ICcuJykg eworCQkJZGF0YVtpXSA9ICdcMCc7CisJCQlicmVhazsKKwkJfQorCisJLyogQ29udmVydCBmb3Ig dGhlIHVzZXIgKi8KKwllcnIgPSBzbnByaW50ZihidWYsIERJUkVDVEVNUF9NU0dfU0laRSwgIiVz IENcbiIsICZkYXRhWzFdKTsKKwlpZiAoZXJyIDwgMCkgeworCQlkZXZfZXJyKGRldiwgInVuYWJs ZSB0byBjb252ZXJ0IHJlY2VpdmVkIG91dHB1dCIpOworCQllcnIgPSAwOworCX0KKworCXJldHVy biBlcnI7Cit9CisKK3N0YXRpYyBERVZJQ0VfQVRUUih0ZW1wLCBTX0lSVUdPLCBzaG93X3RlbXAs IE5VTEwpOworCitzdGF0aWMgc3NpemVfdCBzaG93X3JoKHN0cnVjdCBkZXZpY2UgKmRldiwKKwkJ CQlzdHJ1Y3QgZGV2aWNlX2F0dHJpYnV0ZSAqYXR0ciwgY2hhciAqYnVmKQoreworCWNoYXIgZGF0 YVtESVJFQ1RFTVBfTVNHX1NJWkUgKyAxXTsKKwlpbnQgZXJyOworCWludCBpOworCisJLyogUmVh ZCB0d2ljZSBkdWUgdG8gYSBidWZmZXIgaXNzdWUg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pcmVjdGVtcC5vCiBvYmotJChDT05G SUdfVVNCX0VNSTI2KQkJKz0gZW1pMjYubwogb2JqLSQoQ09ORklHX1VTQl9FTUk2MikJCSs9IGVt aTYyLm8KIG9iai0kKENPTkZJR19VU0JfRlRESV9FTEFOKQkrPSBmdGRpLWVsYW4ubwo= ------_=_NextPart_001_01CAA61E.447B7191-- -- 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/