From patchwork Tue Dec 18 12:18:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 10735595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B763513B5 for ; Tue, 18 Dec 2018 12:19:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7D862A0CA for ; Tue, 18 Dec 2018 12:19:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5B292A0D4; Tue, 18 Dec 2018 12:19:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 49A702A104 for ; Tue, 18 Dec 2018 12:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z0kApGs1K171oY8kRET4tet4gQ69LSJ+5INaWEyMOpY=; b=pbEXLKgJDEQm1w ht+PmBCF+iI49mxot1aTqiQ4ODXJy6ym0PTorlmtLyWcyuxdem86Na+AylwjG3BoQprGgki9BoOKD hB9+UZw/p/14cUug9fCV6E7qezKZAJP9gzmn+5MxeOjJST/MGgJBTu8q5h9O1cQ91mYhQ+/dvS2wz gLFW6C/TDMSzUxRRUP8MsTploY0ZEboHiYVBBK4lqgtAa5sQjgrNjxZngwJJOWLsoHb2PqHtH2o71 OUKfvkfInHJ1BwK04lRsSqw26EeVFEEXQyoCkm9kFjR/u14r+Ac2lldqQ7EqXq7StN9rHpZWnzbTf wYLQkbTet7ljv2oO1D9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZELE-0005Hx-9Z; Tue, 18 Dec 2018 12:19:16 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZEKz-00053L-2G for linux-arm-kernel@lists.infradead.org; Tue, 18 Dec 2018 12:19:03 +0000 Received: by mail-wm1-x343.google.com with SMTP id f81so2560307wmd.4 for ; Tue, 18 Dec 2018 04:18:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references:mime-version:content-transfer-encoding; bh=SkscCEtDXpliSXHUz/cuWzh5NuHyq42x9x7Eg9phJA0=; b=Sx4TZAPnVYELEi/GgiW2vm6HLxP6N3CesPKNUruVEtOrQdV3j+sJUglwhjkcqZlcLt FM3CCZsB4QyVZ8LX+cpq/z+1XCkXMNEbX6yGwR2HeBOMote03LYZtCRB1i/0AvSwQhcS HvM/qslHbK26aBNdqbHvbzKK5fbJSlX4Q90VHlnKpj6fc9T6TfsQKQtPYk/+TeU/WrK3 5DICy+eqFo2fqf8a5JUIlCJcoTENy6ff747mQ2VNZOnIMd+Xi7ErwXXatX/Fy6pe7M8V yhHEd36TYjFL6Okln5g99tFj9Q9JzXVRw6bjxe6XOp0eVEiXvZw0GB74vuPE7BcFp02M pCFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references:mime-version :content-transfer-encoding; bh=SkscCEtDXpliSXHUz/cuWzh5NuHyq42x9x7Eg9phJA0=; b=eRDKP4HYShQI2sWz65fTMvS2qz1yvDyRRV172sa327sECf5RQsoM/gWjPixXfAFr7P L9BGNLHoKOVWNYHQTeCYzGpGCMTHw7ExBrgS29ML7+uUUa6+QjH41+RTdnFMp6k4D3Bq K3gkZO64z6kle59akW8nv0aFGqPN/WMcQqlfkgCcI8Si8dxj3wLvgunzriVMGtile9XA FGc33g8/zF1rMp9jAO+UhvkOKs7giPV9BGg0Sukws5l7qU7lk6K2gWKNiga1ePILmacb XJ5EqLiG//NQKYao5mEtXtmI3m9FxJZshdBOufcGwqGqT5LMrftyM/l+xvzoQgNbf27i Y6LA== X-Gm-Message-State: AA+aEWbktov13pjSRyOAtlknE5P1lEtQwXB6inp/enZfCgKBO1qSMeBa xb7Ctiip3Fxf3qpPc/hGJRLj50D2De4qOQ== X-Google-Smtp-Source: AFSGD/WQEIrEbaUo7eI1G29c2X+n1KtgyLsk4tqicmOf5dgboH1XY/qgCxqhmzmGHXqNTPd5hn7WcA== X-Received: by 2002:a1c:8851:: with SMTP id k78mr3047275wmd.51.1545135528993; Tue, 18 Dec 2018 04:18:48 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id s66sm2092390wmf.34.2018.12.18.04.18.48 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 18 Dec 2018 04:18:48 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, Greg Kroah-Hartman , Shubhrajyoti Datta Subject: [PATCH v2 1/4] serial: uartps: Add the device_init_wakeup Date: Tue, 18 Dec 2018 13:18:39 +0100 Message-Id: <439951b77da9a1d4cc0551af41c158ae5908b840.1545135519.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181218_041901_155793_B0F3E0E8 X-CRM114-Status: GOOD ( 11.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Jiri Slaby Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shubhrajyoti Datta Initialise the device wakeup. The device_init_wakeup is needed for the wakeup to work by default. Uart can be configured as the primary wakeup source so it is good to enable wakeup by default. The same functionality is enabled also by 8250_omap, atmel_serial, omap-serial and stm32-usart. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- Changes in v2: - Change description based on request from Greg drivers/tty/serial/xilinx_uartps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 379242b96790..0140644391df 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1624,6 +1624,7 @@ static int cdns_uart_probe(struct platform_device *pdev) pm_runtime_set_autosuspend_delay(&pdev->dev, UART_AUTOSUSPEND_TIMEOUT); pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); + device_init_wakeup(port->dev, true); #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE /* @@ -1702,6 +1703,7 @@ static int cdns_uart_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev); pm_runtime_dont_use_autosuspend(&pdev->dev); + device_init_wakeup(&pdev->dev, false); #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE if (console_port == port)