From patchwork Mon Jun 16 21:12:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 4362721 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 645369F26E for ; Mon, 16 Jun 2014 21:12:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A92E20256 for ; Mon, 16 Jun 2014 21:12:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B1BB20279 for ; Mon, 16 Jun 2014 21:12:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755961AbaFPVMa (ORCPT ); Mon, 16 Jun 2014 17:12:30 -0400 Received: from mail-pa0-f73.google.com ([209.85.220.73]:64931 "EHLO mail-pa0-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755903AbaFPVMa (ORCPT ); Mon, 16 Jun 2014 17:12:30 -0400 Received: by mail-pa0-f73.google.com with SMTP id kq14so212653pab.0 for ; Mon, 16 Jun 2014 14:12:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IQ7bA7gds2Vxe6q3xGWnMswNxgCtD+F5wgwWD0aKRZo=; b=bb2JLgPCHWtudj1xLLNq1C0h17u+bMOi3370JrykNISQ2BLmA8PjS5gScAJN82GQmF ZwMmLlr3HxsanQJG3Hiv0td/R7Jqt1sKjLNQPHD9HTzCSKsLPVycaBWTe92mYpuhGc7w OujLlm7UjbPgOUcdqEydGT2hiMvsmBh7Lt0EczjUOzMsOGbfx1XklmVKfhL1bEhWxEvT NHwZQJSz3ODVdae6XlQlAXwx7EZaApsB53OObaPIYenhd4a3vQ4oQD9jJXLVO16e5gjB d+yor3Q+ut19U3Fwgtz92nmWFeyBrR72bQeIlvaqVWCsgbl6LYvonrnO9Qcdr/815r64 X9mQ== X-Gm-Message-State: ALoCoQlOgF289QZr9kHkT/gGwXTjntDpM59YSiDmTr1rvj7vQ0lpYe39KcjWA+YpUJ7ljOl1jn7V X-Received: by 10.66.164.167 with SMTP id yr7mr695331pab.15.1402953149561; Mon, 16 Jun 2014 14:12:29 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id c22si1033477yhe.1.2014.06.16.14.12.29 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jun 2014 14:12:29 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.72.141]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 5B8A75A466F; Mon, 16 Jun 2014 14:12:29 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id EEA5280A72; Mon, 16 Jun 2014 14:12:28 -0700 (PDT) From: Doug Anderson To: Lee Jones Cc: broonie@kernel.org, Andrew Bresticker , swarren@wwwdotorg.org, olof@lixom.net, Sonny Rao , linux-samsung-soc@vger.kernel.org, Prathyush K , Doug Anderson , sameo@linux.intel.com, linux-kernel@vger.kernel.org Subject: [PATCH] mfd: cros_ec_spi: set wakeup capability Date: Mon, 16 Jun 2014 14:12:23 -0700 Message-Id: <1402953143-24681-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.0.0.526.g5318336 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Prathyush K Set the device as wakeup capable and register the wakeup source. Note: Though it makes more sense to have the SPI framework do this, (either via device tree or by board_info) this change is as per an existing mail chain: https://lkml.org/lkml/2009/8/27/291 Signed-off-by: Prathyush K Signed-off-by: Doug Anderson --- Note that I don't have suspend/resume actually working upstream, but I see that /sys/bus/spi/drivers/cros-ec-spi/spi2.0/power/wakeup exists with this patch and doesn't exist without it. drivers/mfd/cros_ec_spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c index 0b8d328..ef22dd5 100644 --- a/drivers/mfd/cros_ec_spi.c +++ b/drivers/mfd/cros_ec_spi.c @@ -385,6 +385,8 @@ static int cros_ec_spi_probe(struct spi_device *spi) return err; } + device_init_wakeup(&spi->dev, true); + return 0; }