DescriptionA script to create ACPI based GPIO mapping.
See the doc string for theory of operation.
Testing
=======
On an ST8 system with the Insyde BIOS implementing a mock ACPI device:
localhost tmp # ./gpio_setup.py
gpio_setup.py: could not find GPIO PCI device 0000:00:1f.0
localhost tmp # modprobe nm10_gpio.ko
localhost tmp # ./gpio_setup.py
gpio_setup.py: no gpio mapping found. Is ACPI driver installed?
localhost tmp # modprobe chromeos_acpi
localhost tmp # ./gpio_setup.py
gpio_setup.py: /home/gpio does not exist
localhost tmp # mkdir /home/gpio
localhost tmp # ./gpio_setup.py
localhost tmp # ls /home/gpio
debug_header_0 debug_header_1 debug_header_2 debug_header_3 developer_switch recovery_button write_protect
localhost tmp # cat /home/gpio/developer_switch
1
# At this point press and hold the developer button
localhost tmp # cat /home/gpio/developer_switch
0
# At this point release the developer button
localhost tmp # cat /home/gpio/developer_switch
1
localhost tmp # ./gpio_setup.py --help
Usage: gpio_setup.py [options]
Options:
-h, --help show this help message and exit
--symlink_root=SYMLINK_ROOT
--pci_address=PCI_ADDRESS
--acpi_root=ACPI_ROOT
localhost tmp # ./gpio_setup.py --acpi_root=/tmp/xuz
gpio_setup.py: no gpio mapping found. Is ACPI driver installed?
localhost tmp # ./gpio_setup.py --pci_address=0.1.2.3
gpio_setup.py: could not find GPIO PCI device 0.1.2.3
localhost tmp # ./gpio_setup.py --symlink_root=/tmp/xyz
gpio_setup.py: /tmp/xyz does not exist
Patch Set 1 : Prepared for review. #
Total comments: 4
Patch Set 2 : Addressed review comments. #Messages
Total messages: 5 (0 generated)
|