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: 1554101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id A6C65DF24C for ; Fri, 5 Oct 2012 15:36:59 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TK9vF-0003Q8-3P; Fri, 05 Oct 2012 15:34:41 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TK9tm-0002tw-V3 for linux-arm-kernel@lists.infradead.org; Fri, 05 Oct 2012 15:33:12 +0000 Received: by mail-wi0-f171.google.com with SMTP id hj13so649583wib.0 for ; Fri, 05 Oct 2012 08:32:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=imwRT656O8lnRhpr23pSsq/dTWUFNZi4vRDS2WqQqv8=; b=OwYdVDC0jwMVexFbKpLjw949T/Txfwzax833+MKVZ/SvyLJLtOSKaUonKeOVx1TfUr sKs/GG0PgL6i6NSCMfIPrBYnVlLNQZXyO/4YTjt4Qgj6QzERInhxEumZoSw1CYRE2lCb szU3c8c3iHO1Y01M8EvX5+jQbbuFrjW0EKdk1l1ei49/Dc2nXYuFufsIzIMO5xqJWqKQ EEAqz35wdk7z8HBu2p9siZlHz5uYkWVBDdUA6AQeLyLoAk+ilt/0Ps6+O5/bKh9l+ekp M/eueAYqgt9XkU0hQ6sOiGwY4g9Q3Qo74MF1WZ8hXo1gUcAO/tgzvCrwawGm8ejynKMN kVIg== 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 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: ALoCoQmRex0kU4hT2WU25ghEc7w2vY4g/3hnGuxbX66qn+7tOagqyWkTUfSdOCjY2z/LvhuPP1hM X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.171 listed in list.dnswl.org] Cc: Rob Herring , devicetree-discuss@lists.ozlabs.org, Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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);