Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1442497
| From | Dan O'Donovan <dan@emutex.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 0/3] Init device ids from ACPI of_compatible |
| Date | 2016-07-13 16:20 +0200 |
| Message-ID | <rUtb3-4bE-21@gated-at.bofh.it> (permalink) |
| References | <rUqZz-2Ax-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/13/2016 12:53 PM, Crestez Dan Leonard wrote:
> When using devicetree stuff like i2c_client.name or spi_device.modalias
> is initialized to the first DT compatible id with the vendor prefix
> stripped. Since some drivers rely on this in order to differentiate between
> hardware variants try to replicate it when using ACPI with DT ids.
>
> This also makes it so that the i2c_device_id parameter passed to probe is
> non-NULL when matching with ACPI and DT ids.
This solves a problem for me, thanks Leonard! For the series (in case
it helps):
Tested-by: Dan O'Donovan <dan@emutex.com>
>
> These patches are on top of linux-pm/linux-next. I delayed v2 until ACPI
> overlays got in in order to avoid conflicts. I tested using ACPI overlays but
> there is no actual dependency. This series just extends the PRP0001 feature to
> be more useful for I2C/SPI.
>
> The patches only touches the ACPI-specific parts of the i2c and spi core.
>
> Here is an example .dsl for an SPI accelerometer connected to minnowboard max:
>
> Device (ACCL)
> {
> Name (_ADR, Zero)
> Name (_HID, "PRP0001")
> Name (_CID, "PRP0001")
> Name (_UID, One)
>
> Method (_CRS, 0, Serialized)
> {
> Name (RBUF, ResourceTemplate ()
> {
> SPISerialBus(1, PolarityLow, FourWireMode, 16,
> ControllerInitiated, 1000000, ClockPolarityLow,
> ClockPhaseFirst, "\\_SB.SPI1",)
> GpioInt (Edge, ActiveHigh, Exclusive, PullDown, 0x0000,
> "\\_SB.GPO2", 0x00, ResourceConsumer, , )
> { // Pin list
> 1
> }
> })
> Return (RBUF)
> }
> Name (_DSD, Package ()
> {
> ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> Package ()
> {
> Package () {"compatible", "st,lis3dh"},
> }
> })
> }
>
> Link to v1: https://www.spinics.net/lists/linux-acpi/msg66469.html
> Changes:
> * Rebase on after acpi overlays got it.
> * Change acpi_of_modalias outlen param to size_t
> * Use {} after else
>
> Crestez Dan Leonard (3):
> acpi: Export acpi_of_modalias equiv of of_modalias_node
> acpi i2c: Initialize info.type from of_compatible
> acpi spi: Initialize modalias from of_compatible
>
> drivers/acpi/bus.c | 36 ++++++++++++++++++++++++++++++++++++
> drivers/i2c/i2c-core.c | 8 +++++++-
> drivers/spi/spi.c | 11 ++++++++++-
> include/acpi/acpi_bus.h | 1 +
> 4 files changed, 54 insertions(+), 2 deletions(-)
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 0/3] Init device ids from ACPI of_compatible Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-07-13 14:00 +0200
[PATCH v2 2/3] acpi i2c: Initialize info.type from of_compatible Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-07-13 14:00 +0200
Re: [PATCH v2 2/3] acpi i2c: Initialize info.type from of_compatible "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-13 14:30 +0200
Re: [PATCH v2 2/3] acpi i2c: Initialize info.type from of_compatible Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-07-19 09:10 +0200
[PATCH v2 3/3] acpi spi: Initialize modalias from of_compatible Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-07-13 14:00 +0200
Re: [PATCH v2 3/3] acpi spi: Initialize modalias from of_compatible "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-13 14:30 +0200
Re: [PATCH v2 3/3] acpi spi: Initialize modalias from of_compatible Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-07-19 09:10 +0200
Re: [PATCH v2 3/3] acpi spi: Initialize modalias from of_compatible Mark Brown <broonie@kernel.org> - 2016-07-19 12:30 +0200
Re: [PATCH v2 3/3] acpi spi: Initialize modalias from of_compatible Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-07-20 13:30 +0200
Re: [PATCH v2 3/3] acpi spi: Initialize modalias from of_compatible Mark Brown <broonie@kernel.org> - 2016-07-20 13:40 +0200
[PATCH v2 1/3] acpi: Export acpi_of_modalias equiv of of_modalias_node Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-07-13 14:00 +0200
Re: [PATCH v2 1/3] acpi: Export acpi_of_modalias equiv of of_modalias_node "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-13 14:30 +0200
Re: [PATCH v2 1/3] acpi: Export acpi_of_modalias equiv of of_modalias_node Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-07-19 09:20 +0200
Re: [PATCH v2 0/3] Init device ids from ACPI of_compatible "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-13 14:20 +0200
Re: [PATCH v2 0/3] Init device ids from ACPI of_compatible Dan O'Donovan <dan@emutex.com> - 2016-07-13 16:20 +0200
csiph-web