Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758585AbZAHJjR (ORCPT ); Thu, 8 Jan 2009 04:39:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754432AbZAHJjA (ORCPT ); Thu, 8 Jan 2009 04:39:00 -0500 Received: from mail-ew0-f17.google.com ([209.85.219.17]:34168 "EHLO mail-ew0-f17.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752949AbZAHJi6 (ORCPT ); Thu, 8 Jan 2009 04:38:58 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=gfTtPScckYoCeAuBMVKS00kdsDIHL0uKWTqFHsC8JhiKXkKBfUpaEaXr8dZskzTgaW 92ryCnAJHsUkbHEjxwPaKDD4IXQG3hKfNEaCarapdEIPN5X/nR9lvnOLXFWpyqKJ/l/M Am9Iv+19wqG4LzmKVgydoQqPQq8bqonnYOzSU= Message-ID: <8447d6730901080138nfef6fc4yae3d10c5626a9014@mail.gmail.com> Date: Thu, 8 Jan 2009 10:38:52 +0100 From: "Davide Rizzo" To: linux-kernel@vger.kernel.org, hjk@linutronix.de, gregkh@suse.de, ben-linux@fluff.org Subject: Driver for user access to internal clocks MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_24673_5010911.1231407532713" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 19232 Lines: 269 ------=_Part_24673_5010911.1231407532713 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hallo, ------=_Part_24673_5010911.1231407532713 Content-Type: application/octet-stream; name=uio-clock.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fpp84sk80 Content-Disposition: attachment; filename=uio-clock.patch VGhpcyBkcml2ZXIgaXMgZm9yIHVzZXIgbGV2ZWwgcHJvZ3JhbXMgdG8gaW50ZXJhY3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gtMi42LjI4LmVscGEvZHJpdmVycy91aW8vTWFrZWZpbGUKLS0tIGxpbnV4LTIu Ni4yOC9kcml2ZXJzL3Vpby9NYWtlZmlsZQkyMDA4LTEyLTI1IDAwOjI2OjM3LjAwMDAwMDAwMCAr MDEwMAorKysgbGludXgtMi42LjI4LmVscGEvZHJpdmVycy91aW8vTWFrZWZpbGUJMjAwOS0wMS0w NiAxODoyMDoxNy4wMDAwMDAwMDAgKzAxMDAKQEAgLTEsNCArMSw1IEBACiBvYmotJChDT05GSUdf VUlPKQkrPSB1aW8ubworb2JqLSQoQ09ORklHX1VJT19DTE9DSykgKz0gY2xvY2subwogb2JqLSQo Q09ORklHX1VJT19DSUYpCSs9IHVpb19jaWYubwogb2JqLSQoQ09ORklHX1VJT19QRFJWKQkrPSB1 aW9fcGRydi5vCiBvYmotJChDT05GSUdfVUlPX1BEUlZfR0VOSVJRKQkrPSB1aW9fcGRydl9nZW5p cnEubwo= ------=_Part_24673_5010911.1231407532713 Content-Type: application/octet-stream; name=s3c2410-clk_get.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fpp85q281 Content-Disposition: attachment; filename=s3c2410-clk_get.patch U3BlY2lmaWMgZm9yIFNhbXN1bmcgUzNDMjR4eCBwbGF0Zm9ybXMKQWxsb3dzIGFueSBkcml2ZXIg dG8gZ2V0IGEgZGV2aWNlIHNwZWNpZmljIGNsb2NrLgpJdCByZWNvZ25pemVzIGFsc28gdGhlIGZv cm0gY2xrbmFtZS5YCgpTaWduZWQtb2ZmLWJ5OiBEYXZpZGUgUml6em8gPGVscGEtcml6em9AZ21h aWwuY29tPgotLS0KZGlmZiAtdXJOcCBsaW51eC0yLjYuMjgvYXJjaC9hcm0vcGxhdC1zM2MyNHh4 L2Nsb2NrLmMgbGludXgtMi42LjI4LmVscGEvYXJjaC9hcm0vcGxhdC1zM2MyNHh4L2Nsb2NrLmMK LS0tIGxpbnV4LTIuNi4yOC9hcmNoL2FybS9wbGF0LXMzYzI0eHgvY2x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2VudHJ5KHAsICZjbG9ja3MsIGxpc3QpIHsKIAkJaWYgKHAtPmlkID09IGlkbm8gJiYKLQkJICAg IHN0cmNtcChpZCwgcC0+bmFtZSkgPT0gMCAmJgorCQkgICAgc3RyY21wKG5hbWUsIHAtPm5hbWUp ID09IDAgJiYKIAkJICAgIHRyeV9tb2R1bGVfZ2V0KHAtPm93bmVyKSkgewogCQkJY2xrID0gcDsK IAkJCWJyZWFrOwpAQCAtOTIsNyArMTAwLDcgQEAgc3RydWN0IGNsayAqY2xrX2dldChzdHJ1Y3Qg ZGV2aWNlICpkZXYsIAogCiAJaWYgKElTX0VSUihjbGspKSB7CiAJCWxpc3RfZm9yX2VhY2hfZW50 cnkocCwgJmNsb2NrcywgbGlzdCkgewotCQkJaWYgKHAtPmlkID09IC0xICYmIHN0cmNtcChpZCwg cC0+bmFtZSkgPT0gMCAmJgorCQkJaWYgKHAtPmlkID09IC0xICYmIHN0cmNtcChuYW1lLCBwLT5u YW1lKSA9PSAwICYmCiAJCQkgICAgdHJ5X21vZHVsZV9nZXQocC0+b3duZXIpKSB7CiAJCQkJY2xr ID0gcDsKIAkJCQlicmVhazsKQEAgLTEwMSw2ICsxMDksOSBAQCBzdHJ1Y3QgY2xrICpjbGtfZ2V0 KHN0cnVjdCBkZXZpY2UgKmRldiwgCiAJfQogCiAJbXV0ZXhfdW5sb2NrKCZjbG9ja3NfbXV0ZXgp OworCisJaWYgKGRvdHBvcykKKwkJa2ZyZWUobmFtZSk7CiAJcmV0dXJuIGNsazsKIH0KIA== ------=_Part_24673_5010911.1231407532713 Content-Type: application/octet-stream; name=s3c2410-clk_for_each-clk_name.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fpp86ngj2 Content-Disposition: attachment; filename=s3c2410-clk_for_each-clk_name.patch VGhpcyBpcyBhIHByb3Bvc2FsIGZvciBhZGRpbmcgMiBmdW5jdGlvbnMgdG8gY2xrIGludGVyZmFj ZSB0byBhbGxvdyBoaWdoZXIKIGxldmVsIGR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og Y2xrX2Zvcl9lYWNoIC0gY2FsbHMgZm4sIGl0ZXJhdGluZyBiZXR3ZWVuIHJlZ2lzdGVyZWQgY2xv Y2tzCisgKiBAZm46IGZ1bmN0aW9uIHRvIGJlIGNhbGxlZCwgcGFzc2luZyBlYWNoIGNsayBzdHJ1 Y3R1cmUgaW4gMXN0IGFyZ3VtZW50CisgKiBAZGF0YTogMm5kIGFyZ3VtZW50IHRvIHBhc3MgdG8g Zm4gZnVuY3Rpb24KKyAqCisgKiBSZXR1cm5zIDAgb3IgdGhlIGNhbGxlZCBmbiByZXR1cm4gY29k ZSBpZiAhPSAwCisgKi8KK2ludCBjbGtfZm9yX2VhY2goaW50KCpmbikoc3RydWN0IGNsayAqLCB2 b2lkICopLCB2b2lkICpkYXRhKTsKKworLyoqCisgKiBjbGtfbmFtZSAtIGdldCBjbG9jayBuYW1l CisgKiBAY2xrOiBjbG9jayBzb3VyY2UKKyAqCisgKiBSZXR1cm5zIGNsb2NrJ3MgbmFtZSB0aGF0 IG11c3QgYmUgZGVhbGxvY2F0ZWQgd2l0aCBrZnJlZSgpLCBvciB2YWxpZAorICogSVNfRVJSKCkg Y29uZGl0aW9uIGNvbnRhaW5pbmcgZXJybm8uCisgKi8KK2NvbnN0IGNoYXIgKmNsa19nZXRfbmFt ZShzdHJ1Y3QgY2xrICpjbGspOworCiAjZW5kaWYKIA== ------=_Part_24673_5010911.1231407532713-- -- 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/