From patchwork Fri Oct 5 15:31:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12023 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C092F24156 for ; Fri, 5 Oct 2012 15:32:07 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 76DC7A18882 for ; Fri, 5 Oct 2012 15:32:07 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3999235iej.11 for ; Fri, 05 Oct 2012 08:32:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=imwRT656O8lnRhpr23pSsq/dTWUFNZi4vRDS2WqQqv8=; b=j/MEWqKwM1qhd51JUoIZbb8+kJ1I2/ghz7V2Qq6ccEuNJzZpReBVp8ZpGN/w9B2FbT yd6Is+B/ad/KGa0Qhg3SIXLtYtnU4/bKigy4CBKYJFDaySinw7+9QhnYcFkBWFFBZPLU kYKKrjJXJ2oi/M9D1S1KicxoPbaFn6+b7LOSxJLjiqwmf2w1ctcmyhxKCRSmmK6ygvzs 85/2i8tKxCFGKf74KOleSqRD1tMFKGRMSo+epUALWuo6Qyh+JuxuEK6Q2d7lIDpko3id xwFtm75Z02C5VRrNCwuNZqmLUebuUDbMxIFdbAOlXAI9UCjzfs0zouwJN4n1a6+J9ct5 gw1w== Received: by 10.50.7.212 with SMTP id l20mr1494727iga.43.1349451127257; Fri, 05 Oct 2012 08:32:07 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp132546igc; Fri, 5 Oct 2012 08:32:05 -0700 (PDT) Received: by 10.216.218.105 with SMTP id j83mr1052658wep.164.1349451125455; Fri, 05 Oct 2012 08:32:05 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id y49si12177936wen.33.2012.10.05.08.32.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 08:32:05 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f178.google.com with SMTP id r6so1331115wey.37 for ; Fri, 05 Oct 2012 08:32:05 -0700 (PDT) Received: by 10.180.108.45 with SMTP id hh13mr4082006wib.15.1349451124975; Fri, 05 Oct 2012 08:32:04 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id w8sm2906148wif.4.2012.10.05.08.32.03 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 08:32:04 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones , Rob Herring , devicetree-discuss@lists.ozlabs.org Subject: [PATCH 04/10] of/i2c: Add support for I2C_CLIENT_WAKE when booting with Device Tree Date: Fri, 5 Oct 2012 16:31:40 +0100 Message-Id: <1349451107-8009-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349451107-8009-1-git-send-email-lee.jones@linaro.org> References: <1349451107-8009-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnozZneCmU3ANU4xnLnY3pOzFPfl1CJQlSmDELGHe7le5UPAQS5UR0DcRplAtu21Bqdhs/h It's important for wakeup sources such as keyboards, power buttons and the like to identify themselves as wakeup devices. Until now this has not been possible when platforms are booting via Device Tree. Cc: Rob Herring Cc: devicetree-discuss@lists.ozlabs.org Acked-by: Linus Walleij Signed-off-by: Lee Jones --- drivers/of/of_i2c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c index 1e173f3..2f20019 100644 --- a/drivers/of/of_i2c.c +++ b/drivers/of/of_i2c.c @@ -61,6 +61,9 @@ void of_i2c_register_devices(struct i2c_adapter *adap) info.of_node = of_node_get(node); info.archdata = &dev_ad; + if (of_get_property(node, "i2c-client-wake", NULL)) + info.flags |= I2C_CLIENT_WAKE; + request_module("%s%s", I2C_MODULE_PREFIX, info.type); result = i2c_new_device(adap, &info);