Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753567AbdFWHfM (ORCPT ); Fri, 23 Jun 2017 03:35:12 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48068 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbdFWHfK (ORCPT ); Fri, 23 Jun 2017 03:35:10 -0400 Subject: Re: [PATCH RESEND 09/13] platform/chrome: cros_ec_lpc: Add MKBP events support over ACPI To: Benson Leung , Enric Balletbo i Serra Cc: olof@lixom.net, bleung@chromium.org, linux-kernel@vger.kernel.org, lee.jones@linaro.org, Gwendal Grignou References: <20170516161319.13257-1-enric.balletbo@collabora.com> <20170516161319.13257-10-enric.balletbo@collabora.com> <20170622193524.GA85041@decatoncale.mtv.corp.google.com> From: Thierry Escande Message-ID: <10885390-8fc4-f21b-4f54-ef66572fc8d2@collabora.com> Date: Fri, 23 Jun 2017 09:35:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170622193524.GA85041@decatoncale.mtv.corp.google.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1252 Lines: 49 Hi Benson, On 22/06/2017 21:35, Benson Leung wrote: >> + adev = ACPI_COMPANION(dev); >> + if (adev) { >> + status = acpi_install_notify_handler(adev->handle, >> + ACPI_ALL_NOTIFY, > > Is there a reason you're using ACPI_ALL_NOTIFY here instead of > ACPI_SYSTEM_NOTIFY that is done in the CHROMIUM version of this? > In the original patch (https://chromium-review.googlesource.com/c/358155/) ACPI_ALL_NOTIFY is passed to acpi_install_notify_handler() and ACPI_SYSTEM_NOTIFY to acpi_remove_notify_handler. I changed it for remove_notify call to unsure all handler references were removed. Regards, Thierry >> + cros_ec_lpc_acpi_notify, >> + ec_dev); >> + if (ACPI_FAILURE(status)) >> + dev_warn(dev, "Failed to register notifier %08x\n", >> + status); >> + } >> + >> return 0; >> } >> >> static int cros_ec_lpc_remove(struct platform_device *pdev) >> { >> struct cros_ec_device *ec_dev; >> + struct acpi_device *adev; >> + >> + adev = ACPI_COMPANION(&pdev->dev); >> + if (adev) >> + acpi_remove_notify_handler(adev->handle, ACPI_ALL_NOTIFY, >> + cros_ec_lpc_acpi_notify); >> >> ec_dev = platform_get_drvdata(pdev); >> cros_ec_remove(ec_dev); >> -- >> 2.9.3 >> >