From patchwork Thu Jul 27 13:17:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yegor Yefremov X-Patchwork-Id: 9866907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E57086038C for ; Thu, 27 Jul 2017 13:18:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D75AC28822 for ; Thu, 27 Jul 2017 13:18:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC0242882E; Thu, 27 Jul 2017 13:18:08 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FCE128822 for ; Thu, 27 Jul 2017 13:18:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751446AbdG0NSG (ORCPT ); Thu, 27 Jul 2017 09:18:06 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34035 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751122AbdG0NSF (ORCPT ); Thu, 27 Jul 2017 09:18:05 -0400 Received: by mail-wm0-f68.google.com with SMTP id c184so11178353wmd.1; Thu, 27 Jul 2017 06:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xVJP/FkEvua3dJQAJUMrUFmLQYYJvYHqqEwjDzZx2GA=; b=N8VUbO1B4UUQDrPFaSdIVhYgDhBA+sbzNv1zzx5m5DWOKw9UZALVlWkgl8CgTu76aG JnDhAeimH8t4qEbhb+8373rT2S+NDaBkktXrbdJDkBHan2sJvFg5aAWwgMgmbpCn9IGJ z0jwhRaYAtMMP7d7c06mW+5WHBRhYyS9cQ7AsfeFdDTPu6Ix4Dtp2Tv5YR07pc4KZcr7 pX76iUJs8++uQc9J/YILdK6YvMO3+PUuotHQ5C5c8B10qgxH3uwbonLGIH09A4IqWlXX K4ZE48mtJB1QnDKKz7J46qlevleN5zqS8TG8MJpbjTsx5j2bnfI9Y3cTPuf6qxWnVDBB pq1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xVJP/FkEvua3dJQAJUMrUFmLQYYJvYHqqEwjDzZx2GA=; b=Ownzy7B1nkSdHQhXHUZTnoCm3Y2zKRTmp9sLB9qTZK8PV99Os0Bz2VKDTxfm1B/QxU 0tCborvTaKB036rf1k/xJrm60UgN9UX51fW3yHaUFEYLDds4xDuaD2BSjh/ockNjYCk6 hOhFauEenJtiw6nj+Qq3bQngTT4aUYJgGKb8ha4U3NfI9FOH+rYCfS019irppeVtcYvV 0/rawRyLlA5gyXBJNx5UmBZaufn1tV5kWo4ptBuJQsEjXusF48GkBLyQJT9AvUESe7mK 1ujlTc91Tj8YZn6N0e9x7L0dNYoXqJbCqdtvNHgm/aPOaZYxVdWQT87+o4dElfrVj/5M kdxw== X-Gm-Message-State: AIVw112Du7zDtfViKzcu0zBhA7onFce9E1VfKqC5F62Loj8DxIbVL6oV YGAslD+DviQ2iNLGWFQ= X-Received: by 10.80.182.90 with SMTP id c26mr3665654ede.55.1501161484047; Thu, 27 Jul 2017 06:18:04 -0700 (PDT) Received: from development1.visionsystems.de (mail.visionsystems.de. [213.209.99.202]) by smtp.gmail.com with ESMTPSA id l4sm11310036edb.35.2017.07.27.06.18.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Jul 2017 06:18:03 -0700 (PDT) From: yegorslists@googlemail.com To: linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, jslaby@suse.com, tony@atomide.com, robh@kernel.org, mika.westerberg@linux.intel.com, uwe@kleine-koenig.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, Yegor Yefremov Subject: [PATCH 1/3] serial: mctrl_gpio: restrict MCTRL initialization Date: Thu, 27 Jul 2017 15:17:34 +0200 Message-Id: <1501161456-13367-2-git-send-email-yegorslists@googlemail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1501161456-13367-1-git-send-email-yegorslists@googlemail.com> References: <1501161456-13367-1-git-send-email-yegorslists@googlemail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yegor Yefremov GPIOs specified for serial port can be used either as GPIO driven MCTRL or as a wakeup-source. Use the latter property to abort the MCTRL initialization. Cc: Andy Shevchenko Signed-off-by: Yegor Yefremov --- drivers/tty/serial/serial_mctrl_gpio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/serial_mctrl_gpio.c b/drivers/tty/serial/serial_mctrl_gpio.c index d2da6aa..dce661c 100644 --- a/drivers/tty/serial/serial_mctrl_gpio.c +++ b/drivers/tty/serial/serial_mctrl_gpio.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -118,6 +119,9 @@ struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev, unsigned int idx) struct mctrl_gpios *gpios; enum mctrl_gpio_idx i; + if (device_property_present(dev, "wakeup-source")) + return ERR_PTR(-ENOSYS); + gpios = devm_kzalloc(dev, sizeof(*gpios), GFP_KERNEL); if (!gpios) return ERR_PTR(-ENOMEM);