aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/input/yealink.txt34
-rw-r--r--drivers/usb/input/yealink.c6
2 files changed, 28 insertions, 12 deletions
diff --git a/Documentation/input/yealink.txt b/Documentation/input/yealink.txt
index 5665c32e2a..85f095a7ad 100644
--- a/Documentation/input/yealink.txt
+++ b/Documentation/input/yealink.txt
@@ -1,16 +1,18 @@
1yealink - Linux driver for usb-p1k phones 1Driver documentation for yealink usb-p1k phones
2 2
30. Status 30. Status
4~~~~~~~~~ 4~~~~~~~~~
5 5
6The p1k is a relatively cheap usb 1.1 phone with: 6The p1k is a relatively cheap usb 1.1 phone with:
7 - keyboard full support 7 - keyboard full support, yealink.ko / input event API
8 - LCD full support 8 - LCD full support, yealink.ko / sysfs API
9 - LED full support 9 - LED full support, yealink.ko / sysfs API
10 - dialtone full support 10 - dialtone full support, yealink.ko / sysfs API
11 - ringtone full support 11 - ringtone full support, yealink.ko / sysfs API
12 - audio playback via generic usb audio diver 12 - audio playback full support, snd_usb_audio.ko / alsa API
13 - audio record via generic usb audio diver 13 - audio record full support, snd_usb_audio.ko / alsa API
14
15For vendor documentation see http://www.yealink.com
14 16
15 17
161. Compilation (stand alone version) 181. Compilation (stand alone version)
@@ -178,7 +180,21 @@ updated with the first letter of the icon.
178 echo -n RINGTONE > /sys/..../hide_icon 180 #define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 #define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2 #define LINUX_REBOOT_CMD_KEXEC 0x45584543 #ifdef __KERNEL__ #include <linux/notifier.h> extern int register_reboot_notifier(struct notifier_block *); extern int unregister_reboot_notifier(struct notifier_block *); /* * Architecture-specific implementations of sys_reboot commands. */ extern void machine_restart(char *cmd); extern void machine_halt(void); extern void machine_power_off(void); extern void machine_shutdown(void); struct pt_regs; extern void machine_crash_shutdown(struct pt_regs *); /* * Architecture independent implemenations of sys_reboot commands. */ extern void kernel_restart_prepare(char *cmd); extern void kernel_restart(char *cmd); extern void kernel_halt(void); extern void kernel_power_off(void); void ctrl_alt_del(void); #define POWEROFF_CMD_PATH_LEN 256 extern char poweroff_cmd[POWEROFF_CMD_PATH_LEN]; extern int orderly_poweroff(bool force); /* * Emergency restart, callable from an interrupt handler. */ extern void emergency_restart(void); #include <asm/emergency-restart.h> #endif #endif /* _LINUX_REBOOT_H */
mus2008.git/tree/Documentation/input/yealink.txt?id=b71e318cdb1dc301d734fdd4983dfc6dc167235a#n196'>196 1976. Credits & Acknowledgments 182~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 198~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 183 - Olivier Vandorpe, for starting the usbb2k-api project doing much of 199 - Olivier Vandorpe, for starting the usbb2k-api project doing much of 184 the reverse engineering. 200 the reverse engineering.
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index e2dd274c61..58a176ef96 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -318,7 +318,7 @@ static int yealink_set_ringtone(struct yealink_dev *yld, u8 *buf, size_t size) 318 if (len > sizeof(p->data)) 318 if (len > sizeof(p->data)) 319 len = sizeof(p->data); 319 len = sizeof(p->data); 320 p->size = len; 320 p->size = len; 321 p->offset = htons(ix); 321 p->offset = cpu_to_be16(ix); 322 memcpy(p->data, &buf[ix], len); 322 memcpy(p->data, &buf[ix], len); 323 yealink_cmd(yld, p); 323 yealink_cmd(yld, p); 324 ix += len; 324 ix += len;@@ -383,7 +383,7 @@ send_update: 383 val--; 383 val--; 384 val &= 0x1f; 384 val &= 0x1f; 385 yld-