From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Date: Tue, 10 Mar 2020 16:50:34 +0200 Subject: [PATCH v2 13/39] acpi: Add a binding for ACPI settings in the device tree In-Reply-To: <20200308214442.v2.13.I7842b2dd0d6b475301fc044c6640d8089873053f@changeid> References: <20200309034504.149659-1-sjg@chromium.org> <20200308214442.v2.13.I7842b2dd0d6b475301fc044c6640d8089873053f@changeid> Message-ID: <20200310145034.GO1922688@smile.fi.intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, Mar 08, 2020 at 09:44:37PM -0600, Simon Glass wrote: > Devices need to report various identifiers in the ACPI tables. Rather than > hard-coding these in drivers it is typically better to put them in the > device tree. > > Add a binding file to describe this. ... > +Device bindings are described by their own individual binding files. > + > +U-Boot provides for some optional properties which are documented here. See > +also hid-over-i2c.txt which describes HID devices. > + > + - acpi,has-power-resource : (boolean) true if this device has a power resource. > + This causes a PRIC (ACPI PowerResource) to be written containing the What is PRIC? > + properties provided by this binding, to describe how to handle powering the > + device up and down using GPIOs > + - acpi,compatible : compatible string to report Hmm... I didn't get this. Is it ACPI _CID? > + - acpi,desc : Contains the string to use as the _DDN (DOS (Disk Operating > + System) Device Name) > + - acpi,hid : Contains the string to use as the HID (Hardware ID) > + identifier _HID HID can be dropped to avoid confusion with below. > + - hid-descr-addr : HID register offset (for Human Interface Devices) > + - acpi,probed : Tells U-Boot to add 'linux,probed' to the ACPI tables so that > + Linux will not re-init the device Why? How do we know that Linux will work correctly? Again, we must not depend on the OS behaviour. > + - acpi,uid : _UID value for device > + > + > +Example > +------- > + > +synaptics_touchpad: synaptics-touchpad at 2c { > + compatible = "hid-over-i2c"; > + reg = <0x2c>; > + acpi,hid = "PNP0C50"; > + acpi,desc = "Synaptics Touchpad"; > + interrupts-extended = <&acpi_gpe GPIO_18_IRQ > + IRQ_TYPE_EDGE_FALLING>; > + acpi,probed; > + hid-descr-addr = <0x20>; > +}; -- With Best Regards, Andy Shevchenko