From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755201AbeAOJgW (ORCPT + 1 other); Mon, 15 Jan 2018 04:36:22 -0500 Received: from mga14.intel.com ([192.55.52.115]:14072 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753726AbeAOJgU (ORCPT ); Mon, 15 Jan 2018 04:36:20 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,363,1511856000"; d="scan'208";a="22206966" Date: Mon, 15 Jan 2018 11:36:15 +0200 From: Mika Westerberg To: Hans de Goede Cc: "Rafael J . Wysocki" , Len Brown , Andy Shevchenko , MyungJoo Ham , Chanwoo Choi , Chen-Yu Tsai , Thierry Reding , linux-pwm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ACPI / LPSS: Do not instiate a platform_dev for devs without a mmio resource Message-ID: <20180115093615.GA27654@lahna.fi.intel.com> References: <20180114200148.11771-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180114200148.11771-1-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sun, Jan 14, 2018 at 09:01:48PM +0100, Hans de Goede wrote: > acpi_lpss_create_device() skips handling LPSS devices which do not have > a mmio resources in their resource list (typically these devices are > disabled by the firmware). But since the LPSS code does not bind to the > device, acpi_bus_attach() ends up still creating a platform device for > it and the regular platform_driver for the ACPI HID still tries to bind > to it. > > This happens e.g. on some boards which do not use the pwm-controller > and have an empty or invalid resource-table for it. Currently this causes > these error messages to get logged: > [ 3.281966] pwm-lpss 80862288:00: invalid resource > [ 3.287098] pwm-lpss: probe of 80862288:00 failed with error -22 > > This commit stops the undesirable creation of a platform_device for > disabled LPSS devices by setting pnp.type.platform_id to 0. Note that > acpi_scan_attach_handler() also sets pnp.type.platform_id to 0 when there > is a matching handler for the device and that handler has no attach > callback, so we simply behave as a handler without an attach function > in this case. > > Signed-off-by: Hans de Goede Seems like a good way to fix it IMHO, Acked-by: Mika Westerberg