mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-spi@vger.kernel.org, rjw@rjwysocki.net,
	grant.likely@secretlab.ca, jarkko.nikula@linux.intel.com,
	mika.westerberg@linux.intel.com
Subject: Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices
Date: Mon, 13 Jan 2014 17:35:25 +0000	[thread overview]
Message-ID: <20140113173525.GF29039@sirena.org.uk> (raw)
In-Reply-To: <1389620911-3890-1-git-send-email-rui.zhang@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

On Mon, Jan 13, 2014 at 09:48:31PM +0800, Zhang Rui wrote:
> ACPI enumerated devices has ACPI style _HID and _CID strings,
> all of these strings can be used for both driver loading and matching.

> But currently, in Platform, I2C and SPI bus, only the ACPI style
> driver matching is supported by invoking acpi_driver_match_device()
> in bus .match() callback.

I don't understand what this means, sorry.  As far as I can tell "ACPI
style _HID and _CID strings" are something different to "ACPI style
driver matching" but what that actually means is not at all clear to me
so I don't know what problem this is intended to fix.

Please also always remember to CC maintainers on patches.

> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 349ebba..ab70eda 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -58,6 +58,11 @@ static ssize_t
>  modalias_show(struct device *dev, struct device_attribute *a, char *buf)
>  {
>  	const struct spi_device	*spi = to_spi_device(dev);
> +	int len;
> +
> +	len = acpi_device_modalias(dev, buf, PAGE_SIZE);
> +	if (len != -ENODEV)
> +		return len;
>  
>  	return sprintf(buf, "%s%s\n", SPI_MODULE_PREFIX, spi->modalias);
>  }

What does this do and why can't acpi_driver_match_device() handle this
like it does for other ACPI devices?  We don't need to add such code for
other firmware interfaces...

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-01-13 17:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 13:48 Zhang Rui
2014-01-13 17:35 ` Mark Brown [this message]
2014-01-14  8:00   ` Zhang Rui
2014-01-14 14:41     ` Mark Brown
2014-01-15  1:16       ` Zhang Rui
2014-01-14  8:46 [PATCH 0/4] module autoloading fixes Zhang Rui
2014-01-14  8:46 ` [PATCH 3/4] fix module autoloading for ACPI enumerated devices Zhang Rui
2014-01-15 15:08   ` Mika Westerberg
2014-01-16  8:04     ` Zhang Rui
2014-01-17  1:28       ` Rafael J. Wysocki
2014-01-17  1:56         ` Zhang Rui
2014-01-16 12:27   ` Wolfram Sang
2014-01-16 13:05     ` Zhang Rui
2014-01-16 19:46       ` Mark Brown
2014-01-17  7:37         ` Jarkko Nikula
2014-01-17 15:57           ` Mark Brown
2014-01-20  7:10             ` Jarkko Nikula
2014-01-16 12:28   ` Mark Brown
2014-01-16 12:51     ` Zhang Rui
2014-01-16 19:24     ` Wolfram Sang

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=20140113173525.GF29039@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome