From patchwork Wed Apr 1 01:47:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 6137101 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 82B489F2EC for ; Wed, 1 Apr 2015 01:50:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A024120172 for ; Wed, 1 Apr 2015 01:50:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0AA1F2017E for ; Wed, 1 Apr 2015 01:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752400AbbDABux (ORCPT ); Tue, 31 Mar 2015 21:50:53 -0400 Received: from mga03.intel.com ([134.134.136.65]:4417 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbbDABux (ORCPT ); Tue, 31 Mar 2015 21:50:53 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 31 Mar 2015 18:50:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,503,1422950400"; d="scan'208";a="707048452" Received: from lantianyu-ws.sh.intel.com (HELO localhost) ([10.239.159.40]) by orsmga002.jf.intel.com with ESMTP; 31 Mar 2015 18:50:50 -0700 From: Lan Tianyu To: rjw@rjwysocki.net, lenb@kernel.org Cc: Lan Tianyu , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, valentin.lab_bugzilla.kernel.org@kalysto.org, lompik@voila.fr Subject: [PATCH] ACPI/EC: Call acpi_walk_dep_device_list() after installing EC opregion handler Date: Wed, 1 Apr 2015 09:47:18 +0800 Message-Id: <1427852838-6443-1-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 On some machines(E,G Mircosoft surface 3), ACPI battery depends on the EC operation region and it has _DEP method which contains EC. Current code doesn't support such devices whose dep_unmet will be not be decreased after EC opregion handler being installed. This blocks battery device to be attached with its driver. This patch is to fix the issue. Link: https://bugzilla.kernel.org/show_bug.cgi?id=90161 Tested-and-reported-by: Lompik Tested-by: Valentin Lab Signed-off-by: Lan Tianyu --- drivers/acpi/ec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index a362f20..220d640 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1147,6 +1147,9 @@ static int acpi_ec_add(struct acpi_device *device) ret = ec_install_handlers(ec); + /* Reprobe devices depending on the EC */ + acpi_walk_dep_device_list(ec->handle); + /* EC is fully operational, allow queries */ clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);