From: Crestez Dan Leonard <leonard.crestez@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-acpi@vger.kernel.org,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Jarkko Nikula <jarkko.nikula@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Len Brown <lenb@kernel.org>,
linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Octavian Purdila <octavian.purdila@intel.com>
Subject: Re: [PATCH v2 3/3] acpi spi: Initialize modalias from of_compatible
Date: Wed, 20 Jul 2016 14:21:55 +0300 [thread overview]
Message-ID: <a9507dd1-93cf-547a-3bf1-1d7a18fcc761@intel.com> (raw)
In-Reply-To: <20160719102213.GZ30372@sirena.org.uk>
On 07/19/2016 01:22 PM, Mark Brown wrote:
> On Wed, Jul 13, 2016 at 02:53:42PM +0300, Crestez Dan Leonard wrote:
>> When using devicetree spi_device.modalias is set to the compatible
>> string with the vendor prefix removed. For SPI devices described via
>> ACPI the i2c_board_info.type string is initialized by acpi_device_hid.
>> When using ACPI and DT ids this string ends up something like "PRP0001".
>
> Please submit patches using subject lines reflecting the style for the
> subsystem. This makes it easier for people to identify relevant
> patches. Look at what existing commits in the area you're changing are
> doing and make sure your subject lines visually resemble what they're
> doing.
So the prefix should be something like "spi: acpi: "?
>> Change acpi_register_spi_device to use the of_compatible property if
>> present. This makes it easier to instantiate spi drivers through ACPI
>> with DT ids.
>
> This is basically fine but...
>
>> + if (adev->data.of_compatible) {
>> + ret = acpi_of_modalias(adev, spi->modalias, sizeof(spi->modalias));
>> + if (ret) {
>> + spi_dev_put(spi);
>> + return AE_NOT_FOUND;
>> + }
>
> The only reason this could fail currently is that there wasn't a
> compatible in the first place so why don't we just handle it like the no
> compatible case? It's probably not realistic but it seems like there's
> a small chance this could regress some platform if we do add more error
> detection in acpi_of_modalias().
If acpi_of_modalias fails for some new reason wouldn't it be better to
fail explicitly rather than ignore it?
--
Regards,
Leonard
next prev parent reply other threads:[~2016-07-20 11:22 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 11:53 [PATCH v2 0/3] Init device ids from ACPI of_compatible Crestez Dan Leonard
2016-07-13 11:53 ` [PATCH v2 1/3] acpi: Export acpi_of_modalias equiv of of_modalias_node Crestez Dan Leonard
2016-07-13 12:19 ` Rafael J. Wysocki
2016-07-19 7:14 ` Mika Westerberg
2016-07-13 11:53 ` [PATCH v2 2/3] acpi i2c: Initialize info.type from of_compatible Crestez Dan Leonard
2016-07-13 12:20 ` Rafael J. Wysocki
2016-07-19 7:07 ` Mika Westerberg
2016-07-13 11:53 ` [PATCH v2 3/3] acpi spi: Initialize modalias " Crestez Dan Leonard
2016-07-13 12:22 ` Rafael J. Wysocki
2016-07-19 7:08 ` Mika Westerberg
2016-07-19 10:22 ` Mark Brown
2016-07-20 11:21 ` Crestez Dan Leonard [this message]
2016-07-20 11:37 ` Mark Brown
2016-07-13 12:09 ` [PATCH v2 0/3] Init device ids from ACPI of_compatible Rafael J. Wysocki
2016-07-13 14:15 ` Dan O'Donovan
2017-01-23 16:08 ` [PATCH v3 " Dan O'Donovan
2017-01-23 16:08 ` [PATCH v3 1/3] ACPI / bus: Export acpi_of_modalias equiv of of_modalias_node Dan O'Donovan
2017-01-23 16:08 ` [PATCH v3 2/3] i2c: acpi: Initialize info.type from of_compatible Dan O'Donovan
2017-01-23 17:10 ` Andy Shevchenko
2017-01-23 16:08 ` [PATCH v3 3/3] spi: acpi: Initialize modalias " Dan O'Donovan
2017-01-23 17:11 ` Andy Shevchenko
2017-01-27 10:35 ` Dan O'Donovan
2017-01-27 13:43 ` Andy Shevchenko
2017-01-30 9:41 ` Rafael J. Wysocki
2017-01-31 20:17 ` Mark Brown
2017-01-31 21:18 ` Rafael J. Wysocki
2017-01-23 17:13 ` [PATCH v3 0/3] Init device ids from ACPI of_compatible Andy Shevchenko
2017-01-24 15:11 ` Jarkko Nikula
2017-01-24 15:19 ` Andy Shevchenko
2017-01-27 13:30 ` [PATCH v4 " Dan O'Donovan
2017-01-27 13:30 ` [PATCH v4 1/3] ACPI / bus: Export acpi_of_modalias equiv of of_modalias_node Dan O'Donovan
2017-02-02 11:41 ` Rafael J. Wysocki
2017-02-02 13:30 ` Dan O'Donovan
2017-01-27 13:30 ` [PATCH v4 2/3] i2c: acpi: Initialize info.type from of_compatible Dan O'Donovan
2017-01-28 21:38 ` Wolfram Sang
2017-01-27 13:30 ` [PATCH v4 3/3] spi: acpi: Initialize modalias " Dan O'Donovan
2017-02-01 18:34 ` Mark Brown
2017-02-04 8:00 ` [PATCH v5 0/3] Init device ids from ACPI of_compatible Dan O'Donovan
2017-02-04 8:00 ` [PATCH v5 1/3] ACPI / bus: Export acpi_of_modalias equiv of of_modalias_node Dan O'Donovan
2017-02-04 8:00 ` [PATCH v5 2/3] i2c: acpi: Initialize info.type from of_compatible Dan O'Donovan
2017-02-04 8:00 ` [PATCH v5 3/3] spi: acpi: Initialize modalias " Dan O'Donovan
2017-02-04 10:16 ` Mark Brown
2017-02-05 16:30 ` [PATCH v6 0/3] Init device ids from ACPI of_compatible Dan O'Donovan
2017-02-05 16:30 ` [PATCH v6 1/3] ACPI / bus: Export acpi_of_modalias equiv of of_modalias_node Dan O'Donovan
2017-02-05 16:30 ` [PATCH v6 2/3] i2c: acpi: Initialize info.type from of_compatible Dan O'Donovan
2017-02-05 16:30 ` [PATCH v6 3/3] spi: acpi: Initialize modalias " Dan O'Donovan
2017-02-06 16:31 ` Mark Brown
2017-02-09 13:53 ` [PATCH v6 0/3] Init device ids from ACPI of_compatible Rafael J. Wysocki
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=a9507dd1-93cf-547a-3bf1-1d7a18fcc761@intel.com \
--to=leonard.crestez@intel.com \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--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=octavian.purdila@intel.com \
--cc=rjw@rjwysocki.net \
--cc=wsa@the-dreams.de \
/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