rfkill support for bluetooth

Werner Almesberger werner at openmoko.org
Fri Nov 28 01:02:24 CET 2008

Sean McNeil wrote:
> Android has moved to expecting what is now a standard interface to RF  
> devices for switching them on and off. Attached is a patch to  
> stable-tracking to add support of turning on/off bluetooth via. rfkill.

Hmm, with gta02-moredrivers-defconfig the kernel cheerfully announces

[21474539.295000] ------------[ cut here ]------------
[21474539.300000] WARNING: at net/rfkill/rfkill.c:752 rfkill_register+0x60/0x218()
[21474539.305000] rfkill: attempt to register a badly initialized rfkill struct
[21474539.340000] [<c035b1a4>] (rfkill_register+0x0/0x218) from [<c0012bf8>] (gta01_bt_probe+0x94/0xc0)
[21474539.350000]  r7:00000000 r6:c046a138 r5:c046a130 r4:c799a800
[21474539.355000] [<c0012b64>] (gta01_bt_probe+0x0/0xc0) from [<c01c81b0>] (platform_drv_probe+0x20/0x24)
[21474539.365000]  r6:c0470078 r5:c046a138 r4:00000000

I guess it doesn't like the
	rfkill->state = -1;


By the way, while you're at it, the initialization logic in
gta01_bt_probe is almost the same as what would happen if you
bt_rfkill_toggle_radio(pdev->dev, RFKILL_STATE_OFF);

- Werner

More information about the openmoko-kernel mailing list