All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Chen-Yu Tsai <wens@csie.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	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
Date: Mon, 15 Jan 2018 11:36:15 +0200	[thread overview]
Message-ID: <20180115093615.GA27654@lahna.fi.intel.com> (raw)
In-Reply-To: <20180114200148.11771-1-hdegoede@redhat.com>

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 <hdegoede@redhat.com>

Seems like a good way to fix it IMHO,

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

  parent reply	other threads:[~2018-01-15  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-14 20:01 [PATCH] ACPI / LPSS: Do not instiate a platform_dev for devs without a mmio resource Hans de Goede
2018-01-14 23:36 ` Rafael J. Wysocki
2018-01-15  8:42   ` Hans de Goede
2018-01-15  9:36 ` Mika Westerberg [this message]
2018-01-15 11:33   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180115093615.GA27654@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=cw00.choi@samsung.com \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rjw@rjwysocki.net \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.