Lines Matching +full:platform +full:- +full:name

1 .. SPDX-License-Identifier: GPL-2.0
13 that are accessed through memory-mapped registers.
15 In order to support this and re-use the existing drivers as much as
18 - Devices that have no bus connector resource are represented as
19 platform devices.
21 - Devices behind real busses where there is a connector resource
30 The ACPI implementation enumerates devices behind busses (platform, SPI,
34 This means that when ACPI_HANDLE(dev) returns non-NULL the device was
36 device-specific configuration. There is an example of this below.
38 Platform bus support
41 Since we are using platform devices to represent devices that are not
42 connected to any physical bus we only need to implement a platform driver
43 for the device and add supported ACPI IDs. If this same IP-block is used on
44 some other non-ACPI platform, the driver might work out of the box or needs
71 ACPI is used as an interface between the platform firmware and the OS: Devices
74 without the platform firmware assistance, and devices that need to be described
75 by the platform firmware so that they can be discovered. Still, for any device
76 known to the platform firmware, regardless of which category it falls into,
88 help of the platform firmware and those platform device objects can be bound to
89 by platform drivers in direct analogy with the natively enumerable devices
92 discovered with the help of the platform firmware.
95 were implemented for some devices enumerated with the help of the platform
97 platform device objects are created for those devices as a rule (with a few
98 exceptions that are not relevant here) and so platform drivers should be used
172 Name (DBUF, ResourceTemplate ()
194 The interrupt name can be listed in _DSD as 'interrupt-names'. The names
202 Name (_CRS, ResourceTemplate() {
210 Name (_DSD, Package () {
211 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
213 Package () { "interrupt-names", Package () { "default", "alert" } },
219 The interrupt name 'default' will correspond to 0x20 in Interrupt()
223 The driver can call the function - fwnode_irq_get_byname() with the fwnode
224 and interrupt name as arguments to get the corresponding IRQ number.
237 Name (_ADR, 1)
238 Name (_CID, Package () {
252 the platform device drivers. Below is an example where we add ACPI support
274 Name (_DSD, Package ()
276 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
281 Package () { "address-width", 16 },
287 APIs during ->probe() phase like::
297 err = device_property_read_u32(dev, "address-width", &addr_width);
305 with the platform and SPI drivers. The I2C core automatically enumerates
320 .name = "mpu3050",
340 Name (_DSD, Package ()
342 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
344 Package () { "compatible", Package () { "pwm-leds" } },
345 Package () { "label", "alarm-led" },
359 In the above example the PWM-based LED driver references to the PWM channel 0
369 Specific Data) which made it possible to name the GPIOs among other things.
377 Name (SBUF, ResourceTemplate()
392 Name (_DSD, Package ()
394 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
397 Package () { "power-gpios", Package () { ^DEV, 0, 0, 0 } },
398 Package () { "irq-gpios", Package () { ^DEV, 1, 0, 0 } },
409 Documentation/admin-guide/gpio/.
432 See Documentation/firmware-guide/acpi/gpio-properties.rst for more information
435 RS-485 support
438 ACPI _DSD (Device Specific Data) can be used to describe RS-485 capability
447 // ACPI 5.1 _DSD used for RS-485 capabilities
448 Name (_DSD, Package ()
450 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
453 Package () {"rs485-rts-active-low", Zero},
454 Package () {"rs485-rx-active-high", Zero},
455 Package () {"rs485-rx-during-tx", Zero},
463 The MFD devices register their children as platform devices. For the child
468 - The children share the parent ACPI handle.
469 - The MFD cell can specify the ACPI id of the device.
472 resulting child platform device will have its ACPI_COMPANION() set to point
484 .name = "my_subdevice",
491 resulting child platform device.
512 6.0). For non-enumerable bus types that object must be _HID and its value must
516 existing DT-compatible device identification in ACPI and to satisfy the above
523 subsystem. Otherwise, it will be enumerated automatically as a platform device
539 For example, the following ACPI sample might be used to enumerate an lm75-type
545 Name (_HID, "PRP0001")
546 Name (_DSD, Package () {
547 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
554 Name (SBUF, ResourceTemplate ()
578 Refer to Documentation/firmware-guide/acpi/DSD-properties-rules.rst for more
588 in a fixed position (ethernet, Wi-Fi, serial ports, etc.). In this conditions it
598 16 GPIOs and we want to add the property ``gpio-line-names`` [1]_ to these pins.
617 07:00.0 Serial controller: Exar Corp. XR17V3521 Dual PCIe UART (rev 03) <-- Exar
622 -[0000:00]-+-00.0
624 +-13.0-[01]----00.0
625 +-13.1-[02]----00.0
626 +-13.2-[03]--
627 +-14.0-[04]----00.0
628 +-14.1-[05-09]----00.0-[06-09]--+-01.0-[07]----00.0 <-- Exar
629 | +-02.0-[08]----00.0
630 | \-03.0-[09]--
632 \-1f.1
634 To describe this Exar device on the PCI bus, we must start from the ACPI name
637 Bus: 0 - Device: 14 - Function: 1
645 acpixtract -a acpidump
646 iasl -e ssdt?.* -d dsdt.dat
680 Name (_ADR, 0x0000)
684 Name (_ADR, 0x00010000)
688 Name (_ADR, 0x0000)
690 Name (_DSD, Package ()
692 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
697 "gpio-line-names",
727 .. [1] Documentation/firmware-guide/acpi/gpio-properties.rst
729 .. [2] Documentation/admin-guide/acpi/initrd_table_override.rst
731 .. [3] ACPI Specifications, Version 6.3 - Paragraph 6.1.1 _ADR Address)
733 referenced 2020-11-18