Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6209859ybh; Wed, 7 Aug 2019 19:34:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqySBSB1ld6+be0vUTTnK4YP6k966IWsu8XhJ/mGh0NWzsqPgFOp0g3swnvr9eQbgnySXJJN X-Received: by 2002:a62:e308:: with SMTP id g8mr13332859pfh.162.1565231656185; Wed, 07 Aug 2019 19:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565231656; cv=none; d=google.com; s=arc-20160816; b=0N7v5+2Y80w3YkHhkJbf9rD5MiY9tsIfapo4qxr0fQ7w7G1nvLqyeeLFnGnEjPhO8T 0Rs3CkAHleUawo8Qwn8AjCWOW3deOzneck9vyvGEALB4kEoIUG3yvcA93W8bFmSFMS9x 6e8J8j2jy9BDb2xTAxMIYJ0BsmaC+OXGRMV9ieeMEKBvCw2HohLihHT93AENQ0SB9Tv4 rT1BfPq+dZl1tAPmaFIcQfeQCbl9slA/yBNPY5VyefRJM2bab73KGA/KaJ1OMe1SaDU5 g/T5tRcZzqwRC9BZFYAxg4HGbRQNoO/zI6r8zpLGKtjbFNrUBqk0jcq03LmKUw9Pdqb2 nKXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=3wD/U2f7NUmCpzw8MfUUzheRaSBW23+8w9xI1iiASDc=; b=zRJqVCzWwvq8z/E1RiuF0yw1wKd3A5cDgL7HY4CxKQFtN6+g7+0Y8BuifkBtxz9YPc s0hn/95H/37dIvhAj2x52HbfBOGFpeO8A6DDGFnA0qudQsvD3/5efTgelsQzY8t4Yv6L 23I+7/x9yfSJNTs3Ikqe1+jDF0lpbwxnaD7reflCQ8zfUZzFSsNC9lrLq30B1KO51cc4 73K8GXmNYeR085xaqME/LYXFRKiCfewOutgfdIU+DZDCmDUURC7RX68b7s7sL1LYrK/u WlOhQUDuZOUEbwj7Xl4UGFUaQYFnVEy04LTGuRAAPvAQQ5adf9oMPmhxiJPaNlQaAoc2 9PVA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si48972183pgg.200.2019.08.07.19.34.00; Wed, 07 Aug 2019 19:34:16 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728132AbfHHCW1 (ORCPT + 99 others); Wed, 7 Aug 2019 22:22:27 -0400 Received: from mga03.intel.com ([134.134.136.65]:53450 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727999AbfHHCW1 (ORCPT ); Wed, 7 Aug 2019 22:22:27 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2019 19:21:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,358,1559545200"; d="scan'208";a="168832617" Received: from ipsg-l-lixuzha.sh.intel.com ([10.239.153.20]) by orsmga008.jf.intel.com with ESMTP; 07 Aug 2019 19:21:50 -0700 From: Zhang Lixu To: linux-input@vger.kernel.org, jikos@kernel.org, benjamin.tissoires@redhat.com Cc: srinivas.pandruvada@linux.intel.com, linux-kernel@vger.kernel.org, lixu.zhang@intel.com Subject: [PATCH v2 0/3] HID: intel-ish-hid: support s2idle and s3 in ish_suspend() Date: Thu, 8 Aug 2019 18:21:10 +0800 Message-Id: <20190808102113.27802-1-lixu.zhang@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, the NO_D3 flag is set in ish_probe(), the intel-ish-ipc driver puts the ISH into D0i3 when system enter both suspend-to-idle(S0ix) and suspend-to-mem(S3). These patches are to put the ISH into D3 when system enter S3 and put the ISH into D0i3 when system enter S0ix. I tested these patches on the following platforms: ISH 5.2: ICL ISH 5.0: CNL CFL WHL CML ISH 4.0: GLK ISH 3.0: KBL Test steps: * Run the IIO Sensor tool to read the accel_3d sensor data * Run cmd "echo mem > /sys/power/state" to suspend-to-mem * Press the keyboard to wake up OS. * Check if the tool can get the sensor data after OS resume. * Run cmd "echo freeze > /sys/power/state" to suspend-to-idle * Press the keyboard to wake up OS. * Check if the tool can get the sensor data after OS resume. Test results: The tool can get the accel_3d sensor data after resuming from both suspend-to-mem and suspend-to-idle. Changes from v1: * Fix the indentation issue * Elaborate the reason to remove the NO_D3 flag * Split the PATCH v1 to three changes, and try to minimize the lines change Zhang Lixu (3): HID: intel-ish-hid: ipc: set NO_D3 flag only when needed HID: intel-ish-hid: ipc: make ish suspend paths clear HID: intel-ish-hid: ipc: check the NO_D3 flag to distinguish resume paths drivers/hid/intel-ish-hid/ipc/hw-ish.h | 1 + drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 95 +++++++++++++++---------- 3 files changed, 61 insertions(+), 37 deletions(-) -- 2.17.1