acpi

Linux: device tree to acpi driver

孤者浪人 提交于 2021-02-11 15:28:56
问题 I need help on this, my driver already work on device tree mode, and I want support acpi mode for it, I'm stuck on create partitions: Device Tree: &spi0 { status = "ok"; flash: n25q256a@0 { status = "ok"; cell-index = <0>; #address-cells = <1>; #size-cells = <1>; compatible = "n25q256a"; reg = <0>; spi-max-frequency = <15000000>; spi-cpha; spi-cpol; partition@0x00000000 { label = "Boot loader"; reg = <0x00000000 0x01000000>; }; partition@0x01000000 { label = "n25q256a-test"; reg = <0x01000000

Diolan DLN-2 SPI controller on x86_64 platform

*爱你&永不变心* 提交于 2020-04-18 04:41:38
问题 I am attempting to utilize the DLN-2 in an x86_64 Linux environment (kernel version 4.18) to provide SPI and I2C bus controllers to the userspace, in a similar manner you would using an ARM platform with DTS/DTB file modifications. I am having trouble identifying the proper method to attach a SPI slave device or mount the device to userspace with the spidev driver. The kernel modules are loading successfully and the SPI bus is mounted as a spi_master. I am certain the chip itself is working

How to register acpi event notify?(AcpiInterfaces.RegisterForDeviceNotifications)

我怕爱的太早我们不能终老 提交于 2020-02-04 05:42:27
问题 now I want to add the function in my acpi driver . the function is:get the BIOS Notify . I search some doc, And Write code NTSTATUS XxxAddDevice( __in struct _DRIVER_OBJECT *DriverObject, __in struct _DEVICE_OBJECT *PhysicalDeviceObject ) { . . . status = STATUS_SUCCESS; DebugPrint(("AddDevice: %p to %p->%p \n",fdo,fdoData->NextLowerDO,PhysicalDeviceObject)); DebugPrint(("DeviceObject Flag = 0x%08x\n",fdo->Flags)); DebugPrint(("DevicePnPState = %d\n", fdoData->DevicePnPState)); { //PACPI

Difference between dts and ACPI

时光毁灭记忆、已成空白 提交于 2020-01-12 05:17:45
问题 We can declare platform device information in dts file, rather than hard coding every data into operating system. Taking "arm" architecture as example. it supports dts and we will take dts from arch/arm/boot/dts/xx.dts. Convert this xx.dts into xx.dtb and loaded with kernel Image. I recently came across ACPI, when i came across x86 architecture, from the documents, what i understood is ACPI is similar to device tree. We can declare platform device information information in ACPI tables, my

Is there a way to get battery info (status, plugged in, etc) without reading a proc/sys file on linux?

核能气质少年 提交于 2020-01-03 15:21:28
问题 I want to get information about the battery in C on linux. I don't want to read or parse any file! Is there any low-level interface to acpi/the kernel or any other module to get the information I want to have? I already searched the web, but every question results in the answer "parse /proc/foo/bar". I really don't want to do this because I think, low-level interfaces won't change as fast as Files do. best regards. 回答1: You might be looking for UPower: http://upower.freedesktop.org/ This is a

Shutdown computer in MS-DOS using ACPI

本小妞迷上赌 提交于 2020-01-01 09:37:11
问题 I have MS-DOS 6.22 running on a Pentium based computer (motherboard supports ACPI), and would like to know if there was an assembly language routine I could use to shut down the computer, or is it a little harder than that (i.e. motherboard specific)? Basically, I want to create a small program to shut down the computer from the command line. 回答1: Here is an example of a tool written specifically for this: http://www.plop.at/en/dostoolsdl.html The source code can be found here: http:/

control FAN speed

不羁岁月 提交于 2019-12-23 12:28:58
问题 I wanna control fan speed by C#. I tried WMI but it does not work for me :/ I have HP ProBook with Intel Core i5, Windows 7 HomePremium 64-bit. Is there any other way how to control fan speed (get temperature, set fan speed to higher or lower value or disable/enable it)? 回答1: Im trying to accomplish the same for a Dell Optiplex 740. Speed Fan also doesnt work for me. The funny part is that when i looked for a way to overclock my Graphic Card i found out under evga.com a way to change my CPU

Setting an ACPI field in Linux

不羁的心 提交于 2019-12-23 04:12:03
问题 I've a netbook that is running the fan a bit to early for my liking. I've found a Windows-only solution to reducing the fan noise but I'm using Ubuntu on this computer. In the Windows solution the guy is using a program called Notebook Hardware Control (NHC) which, from what I can make out, is reading and setting ACPI values. (http://hpmini110c.siteboard.eu/f3t31-lueftersteuerung-fuer-den-mini.html, relevant source in the 7z-file, the .cs-file in there is a C#-file with the logic for setting