LWN.net Logo

Writing an ACPI driver - an introduction

Writing an ACPI driver - an introduction

Posted Feb 10, 2012 10:10 UTC (Fri) by kinbo (guest, #82843)
Parent article: Writing an ACPI driver - an introduction

Thanks, Matthew, for your good tutorial.

I have read it several times, and got more and more,but there are still some questions bothering me.
1. When will the toshiba_bt_rfkill_notify function be called? and can userspace call it? If so, how?
2. How can userspace know the BT status?
3. How can userspace application change the BT status without flicking the switch.
4. How to call a userspace application by flicking a switch?

Thanks, your response would be great appreciated.


(Log in to post comments)

Writing an ACPI driver - an introduction

Posted Feb 10, 2012 13:54 UTC (Fri) by mjg59 (subscriber, #23239) [Link]

It'll be called when the firmware generates a notification, which is up to the firmware. Since all the driver does is then attach the device, you can only detect that in userspace by looking for the uevent generated when the USB device reattaches. There's no way (with this driver) for userspace to forcibly change the BT status. Doing that would require it to hook into the rfkill layer.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds