Received: by 10.223.176.5 with SMTP id f5csp2206879wra; Wed, 31 Jan 2018 19:13:45 -0800 (PST) X-Google-Smtp-Source: AH8x2266Ez21Ia2Y6Elr1ljazih3qOBIYe/Gq/PSOTApB6ev+j+lJWOZHPA4/hLd64rgTrVsZHhY X-Received: by 10.98.201.69 with SMTP id k66mr35571946pfg.105.1517454825364; Wed, 31 Jan 2018 19:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517454825; cv=none; d=google.com; s=arc-20160816; b=sgvXgIdxNLSPrlZNgB9mw96wrqW8Zs7AtFw35/IAd7sZdPHDSIbrG/sqCMtJfx1xNs JwAzuk2KI4ij0Z13dncofR0/oFuCtnuP5xbCPkad3W8UkrbmPDHhgnTDH90itwJ97SAQ 35Kkgh6ryrIsu4CscWkzsAjTUvJV5qS05q/z6Y2+930BS8rYUo/OGWuj6UyWe/ABX+a9 oh/yCF5OsRRSf9wNm7rSFKFDkyILTqd2hSfozda6w29Gfl8uc1gOUQcOkc3ch9anpPJ/ pbVGhK43uGwb1z7AI+FxMLdZ4axPZpbXr6SMYNMCRk4k82zHR2iULKqfnu/rDaditZjE OfwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=JRbikf9qwRi7aXZhqVkmPvalG6PBJSNg+1RTK1y2yQk=; b=bWko5TzqBRmMH+AiQ1i+4GuRcJQTCX9XEWTBclgkmEOeTEpCbvacqgLSSZnk2O3+yI 8PzrDVBkPv45ctZWEjhl859Ui9blsSRa02bYKyU2Bag09UbvB23f2Wt+Uwqzf6dJbOFK GDi8Dl9thFtX4oW3VGOxUjk+Q+QdeRpZo0TWxgrgKNP+uzfRRahrSECOwBw9/EREXT8D 6sTg0UAFydTpSTchRd0zfb7gV5HPu0rnBMioMlv75FYohdYp3now71dwpYnCMWQtlSWt QqQsyMF/4gK3RSBjqOo3cnRKsPw1/Wv/fHM+/CPeKI71NRFoong2j8acjTWNj/6pPBCC Rr6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q0Dh7CPb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6-v6si143210pll.554.2018.01.31.19.13.29; Wed, 31 Jan 2018 19:13:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q0Dh7CPb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751435AbeBADNG (ORCPT + 99 others); Wed, 31 Jan 2018 22:13:06 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:42623 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbeBADNE (ORCPT ); Wed, 31 Jan 2018 22:13:04 -0500 Received: by mail-pl0-f67.google.com with SMTP id 11so2420598plc.9; Wed, 31 Jan 2018 19:13:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JRbikf9qwRi7aXZhqVkmPvalG6PBJSNg+1RTK1y2yQk=; b=Q0Dh7CPbVqsODQ1kAKLKRgrMze5WEWFEQ/DRaQU1H6QKmpjcEsl2Dyki6yN6f8M9Dw d/F+MLWBWmvtbBbudBpw/My33JD2meWTSNVY2rWeq1gXaMA21G0ECysAE3cpTe4RD/N7 V181JtiGo7gWay32XBAr7kEIZPz9FKJ9DlBlz3HC7+XgPTH04Xw+iVq0DUDc88K8ZRs4 K1a0kc6TDBzNlhIR2iUvJVoPdPkuFJXNEHa7/zakzQ/aYU9+jG8bD/MPRrFant3nmilM e7cGucMCUEa7+W8oKyr/NFiR4+Sw6nA49MFOOjUimDBSkHVJ4S/pNqy7TgSrDViToNqe 2jqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JRbikf9qwRi7aXZhqVkmPvalG6PBJSNg+1RTK1y2yQk=; b=g7v+3u1ch3WNO9mRRTArxXTcwiTMNqj4kn87g4ogyHbSB/ElTynUN9sLz14ZPMdVaS eKNrTBgn6l1SvFLN12sZqlOAoiA8F/mS4qLxQUI5vXPUpC2gxxbUcq4p/seES6SAu8l/ QSscopzTmvE5phN+8ub4lLVVm9KYOWO6cHnNXuj2Ymfw0OcOIhA5Slhh6s+KQa/ZMP5a Vjt6uqaicbBA+1vCz3M37yduh+vymhBhOU4WdCJOMa7EZVTHJzJ38cAyOnZJwT9stdS7 6YhrxiyG7xznDByN8KuUGBqZG1DuvEBZdCmrTaUZbchkTuXJ9DfseEo34FfPQk8HBy9T UdJw== X-Gm-Message-State: AKwxytc4pADBrS7TQziIGCg1P+JJKajzeAXqH+DeIVvfysh2pURXtXx2 NOF7EcaN2VdVLCVaKHUM8xufzR1X X-Received: by 2002:a17:902:6bc3:: with SMTP id m3-v6mr30266973plt.442.1517454784063; Wed, 31 Jan 2018 19:13:04 -0800 (PST) Received: from [192.168.1.42] (59-120-186-245.HINET-IP.hinet.net. [59.120.186.245]) by smtp.gmail.com with ESMTPSA id k1sm28486192pfa.8.2018.01.31.19.13.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jan 2018 19:13:03 -0800 (PST) Subject: Re: [PATCH 3/5] USB: serial: f81232: enable remote wakeup via RX/RI pin To: Johan Hovold Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, peter_hong@fintek.com.tw, "Ji-Ze Hong (Peter Hong)" References: <1516607927-8887-1-git-send-email-hpeter+linux_kernel@gmail.com> <1516607927-8887-3-git-send-email-hpeter+linux_kernel@gmail.com> <20180130035747.GB3434@localhost> From: "Ji-Ze Hong (Peter Hong)" Message-ID: Date: Thu, 1 Feb 2018 11:13:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180130035747.GB3434@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, Johan Hovold 於 2018/1/30 上午 11:57 寫道: > On Mon, Jan 22, 2018 at 03:58:45PM +0800, Ji-Ze Hong (Peter Hong) wrote: >> The F81232 can do remote wakeup via RX/RI pin with pulse. >> This patch will use device_set_wakeup_enable to enable this >> feature. > > This is a policy decision that should be made by user space by setting > the power/wakeup attribute, and not something that something that > drivers should enable directly themselves. > > Perhaps you really wanted to use device_set_wakeup_capable()? But then > you also need to honour the current setting in suspend() as well. > > How have you tested this feature? > Our USB-To-Serial support RI/ RX remote wakeup by Modem, Fax or other peripherals and we had tested it by following procedure with device_set_wakeup_enable() enabled: 1. Using pm-suspend to S3 2. Trigger a pulse to RI/RX to wake up system. In our test, we can do remote wakeup only with device_set_wakeup_enable() enabled. Should we add device_set_wakeup_capable() & device_set_wakeup_enable() like following link?? https://elixir.free-electrons.com/linux/latest/source/drivers/media/rc/mceusb.c#L1476 Thanks -- With Best Regards, Peter Hong