Bluetooth: Option to enable power management from host
Subsystems (2)
PATCH v2 1/2 Bluetooth: Option to enable power management from host
This provides a new option for hciattach to enable hardware specific power management from host.
This option by default will be disabled for existing devices
--- tools/hciattach.8 | 13 ++++++++ tools/hciattach.c | 88 ++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 76 insertions(+), 25 deletions(-)
tools/hciattach.8 +13 -0
@@ -122,7 +122,20 @@ the serial link ( set by default. To force no flow control use .B noflow instead. +.TP +.I sleep +Enables hardware specific power management feature. If +.I sleep +is appended to the list of options then this feature is enabled. To disable +this feature use +.B nosleep +instead. +All above mentioned device types have +.B nosleep +set by default. +Note: This option will only be valid for hardware which support +hardware specific power management enable option from host. .TP .I bdaddr The
tools/hciattach.c +63 -25
153 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v2 2/2 Bluetooth: host level Support for Atheros AR300x device
Implements support for Atheros AR300x Bluetooth chip in hciattach application. Supports configuration download and power management configure feature.
--- Makefile.tools | 7 +- tools/hciattach.8 | 3 + tools/hciattach.c | 105 ++++++ tools/hciattach.h | 3 + tools/hciattach_ar3k.c | 859 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 974 insertions(+), 3 deletions(-) create mode 100644 tools/hciattach_ar3k.c
Makefile.tools +4 -3
@@ -21,9 +21,10 @@ tools_rfcomm_LDADD = lib/libbluetooth.la tools_l2ping_LDADD = lib/libbluetooth.la tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \ - tools/hciattach_st.c \ - tools/hciattach_ti.c \ - tools/hciattach_tialt.c + tools/hciattach_st.c \ + tools/hciattach_ti.c \ + tools/hciattach_tialt.c \ + tools/hciattach_ar3k.c tools_hciattach_LDADD = lib/libbluetooth.la tools_hciconfig_SOURCES = tools/hciconfig.c tools/csr.h tools/csr.c \
tools/hciattach.8 +3 -0
@@ -86,6 +86,9 @@ Silicon Wave kits .TP .B bcsp Serial adapters using CSR chips with BCSP serial protocol +.TP +.B ath3k +Atheros AR300x based serial Bluetooth device .RE Supported IDs are (manufacturer id, product id)
tools/hciattach.c +105 -0
117 lines not on this page · raw message
tools/hciattach.h +3 -0
@@ -38,6 +38,7 @@#define HCI_UART_3WIRE 2#define HCI_UART_H4DS 3#define HCI_UART_LL 4 +#define HCI_UART_ATH3K 5#define HCI_UART_RAW_DEVICE 0
@@ -49,3 +50,5 @@ int texas_post(int fd, struct termios *ti);int texasalt_init (int fd,int speed,struct termios *ti);int stlc2500_init (int fd,bdaddr_t *bdaddr);int bgb2xx_init (int dd,bdaddr_t *bdaddr); +int ath_configure_sleep (int fd,int sleep_stat); +int ath_ps_download (int fd);
tools/hciattach_ar3k.c new file +859 -0
859 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Hi,
Quoted 7 lines · Suraj Sumangala
This provides a new option for hciattach to enable hardware specific power management from host.
This option by default will be disabled for existing devices--- tools/hciattach.8 | 13 ++++++++ tools/hciattach.c | 88 ++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 76 insertions(+), 25 deletions(-)
This patch has been pushed upstream. Thanks.
Johan
Re: [PATCH v2 2/2] Bluetooth: host level Support for Atheros AR300x device
In reply to Suraj SumangalaHi,
Quoted 11 lines · Suraj Sumangala
Implements support for Atheros AR300x Bluetooth chip in hciattach application. Supports configuration download and power management configure feature.
--- Makefile.tools | 7 +- tools/hciattach.8 | 3 + tools/hciattach.c | 105 ++++++ tools/hciattach.h | 3 + tools/hciattach_ar3k.c | 859 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 974 insertions(+), 3 deletions(-) create mode 100644 tools/hciattach_ar3k.c
This patch produces several errors:
tools/hciattach_ar3k.c: In function ‘write_ps_cmd’:tools/hciattach_ar3k.c:196: error: comparison between signed and unsigned integer expressions tools/hciattach_ar3k.c: In function ‘get_ps_file_name’:tools/hciattach_ar3k.c:536: error: comparison between signed and unsigned integer expressions tools/hciattach_ar3k.c: In function ‘get_patch_file_name’:tools/hciattach_ar3k.c:552: error: comparison between signed and unsigned integer expressions tools/hciattach_ar3k.c:552: error: comparison between signed and unsigned integer expressions make[1]: *** [tools/hciattach_ar3k.o] Error 1
Please fix those and always check that your patches compile cleanly with ./bootstrap-configure before sending them upstream. Thanks.
Johan
Re: [PATCH v2 2/2] Bluetooth: host level Support for Atheros AR300x device
Hi Johan,
Quoted 26 lines · Johan Hedberg
Hi,
Quoted 11 lines · Suraj Sumangala
Implements support for Atheros AR300x Bluetooth chip in hciattach application. Supports configuration download and power management configure feature.
--- Makefile.tools | 7 +- tools/hciattach.8 | 3 + tools/hciattach.c | 105 ++++++ tools/hciattach.h | 3 + tools/hciattach_ar3k.c | 859 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 974 insertions(+), 3 deletions(-)create mode 100644
tools/hciattach_ar3k.cThis patch produces several errors:
tools/hciattach_ar3k.c: In function ‘write_ps_cmd’:tools/hciattach_ar3k.c:196: error: comparison between signed and unsigned integer expressionstools/hciattach_ar3k.c: In function ‘get_ps_file_name’:tools/hciattach_ar3k.c:536: error: comparison between signed and unsigned integer expressionstools/hciattach_ar3k.c: In function ‘get_patch_file_name’:tools/hciattach_ar3k.c:552: error: comparison between signed and unsigned integer expressionstools/hciattach_ar3k.c:552: error: comparison between signed and unsigned integer expressions make[1]: *** [tools/hciattach_ar3k.o] Error 1
Quoted 4 lines
Please fix those and always check that your patches compile cleanly with ./bootstrap-configure before sending them upstream. Thanks.
Johan
Sorry about that,
I did do a fresh
./bootstrap-configure
./configure
make
and strangely my compiler did not catch anyone of these and it compiled without any warning.
Is there any flag I have to enable for this?
My gcc version says,
gcc 4.4.3
Regards
Suraj
Re: [PATCH v2 2/2] Bluetooth: host level Support for Atheros AR300x device
Hi Suraj,
Quoted 8 lines · Suraj
Sorry about that,
I did do a fresh
./bootstrap-configure
./configure
make
Quoted 8 lines
and strangely my compiler did not catch anyone of these and it compiled without any warning.
Is there any flag I have to enable for this?
My gcc version says,
gcc 4.4.3
bootstrap-configure already runs configure for you (hence the name) with the appropriate parameters (such as --enable-maintainer-mode). When you run configure a second time it will overwrite these. So running "./bootstrap-configure && make" should be enough.
Johan