From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 07:33:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBD28FFA; Fri, 31 Oct 2014 07:33:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D9026EB; Fri, 31 Oct 2014 07:33:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9V7Xx6N053099; Fri, 31 Oct 2014 07:33:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9V7XvO3053087; Fri, 31 Oct 2014 07:33:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410310733.s9V7XvO3053087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 31 Oct 2014 07:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273882 - in stable/10: share/man/man4 sys/conf sys/dev/usb sys/dev/usb/misc sys/dev/usb/quirk sys/modules/usb sys/modules/usb/uled X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2014 07:33:59 -0000 Author: hselasky Date: Fri Oct 31 07:33:56 2014 New Revision: 273882 URL: https://svnweb.freebsd.org/changeset/base/273882 Log: MFC r271159, r271168 and r271680: Add USB LED driver for the Dream Cheeky WebMail Notifier. Added: stable/10/share/man/man4/uled.4 - copied unchanged from r271159, head/share/man/man4/uled.4 stable/10/sys/dev/usb/misc/uled.c - copied, changed from r271159, head/sys/dev/usb/misc/uled.c stable/10/sys/dev/usb/uled_ioctl.h - copied unchanged from r271159, head/sys/dev/usb/uled_ioctl.h stable/10/sys/modules/usb/uled/ - copied from r271159, head/sys/modules/usb/uled/ Modified: stable/10/share/man/man4/Makefile stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs stable/10/sys/modules/usb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Fri Oct 31 07:18:27 2014 (r273881) +++ stable/10/share/man/man4/Makefile Fri Oct 31 07:33:56 2014 (r273882) @@ -528,6 +528,7 @@ MAN= aac.4 \ uhso.4 \ uipaq.4 \ ukbd.4 \ + uled.4 \ ulpt.4 \ umass.4 \ umcs.4 \ Copied: stable/10/share/man/man4/uled.4 (from r271159, head/share/man/man4/uled.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/uled.4 Fri Oct 31 07:33:56 2014 (r273882, copy of r271159, head/share/man/man4/uled.4) @@ -0,0 +1,95 @@ +.\" +.\" Copyright (c) 2014 Kevin Lo +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 5, 2014 +.Dt ULED 4 +.Os +.Sh NAME +.Nm uled +.Nd USB LED driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device uled" +.Cd "device usb" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +uled_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Dream Cheeky WebMail Notifier device. +.Pp +Subsequently, the +.Pa /dev/uled0 +device can be used by userland applications. +.Sh IOCTLS +The following +.Xr ioctl 2 +commands can be performed on +.Pa /dev/uled0 , +which are defined in +.In dev/usb/uled_ioctl.h : +.Bl -tag -width indent +.It Dv ULED_GET_COLOR +The command returns LED colors with values for RGB. +This +.Xr ioctl 2 +takes the following structure: +.Bd -literal +struct uled_color { + uint8_t red; + uint8_t green; + uint8_t blue; +}; +.Ed +.Pp +.It Dv ULED_SET_COLOR +The command sets LED colors with values for RGB. +It uses the same structure as above. +.El +.Sh FILES +.Bl -tag -width ".Pa /dev/uled0" -compact +.It Pa /dev/uled0 +blocking device node +.El +.Sh SEE ALSO +.Xr ohci 4 , +.Xr uhci 4 , +.Xr usb 4 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Kevin Lo Aq Mt kevlo@FreeBSD.org . Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Fri Oct 31 07:18:27 2014 (r273881) +++ stable/10/sys/conf/NOTES Fri Oct 31 07:33:56 2014 (r273882) @@ -2644,6 +2644,8 @@ device usb device udbp # USB Fm Radio device ufm +# USB LED +device uled # Human Interface Device (anything with buttons and dials) device uhid # USB keyboard Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri Oct 31 07:18:27 2014 (r273881) +++ stable/10/sys/conf/files Fri Oct 31 07:33:56 2014 (r273882) @@ -2489,6 +2489,7 @@ dev/usb/serial/usb_serial.c optional uc # dev/usb/misc/ufm.c optional ufm dev/usb/misc/udbp.c optional udbp +dev/usb/misc/uled.c optional uled # # USB input drivers # Copied and modified: stable/10/sys/dev/usb/misc/uled.c (from r271159, head/sys/dev/usb/misc/uled.c) ============================================================================== --- head/sys/dev/usb/misc/uled.c Fri Sep 5 11:25:58 2014 (r271159, copy source) +++ stable/10/sys/dev/usb/misc/uled.c Fri Oct 31 07:33:56 2014 (r273882) @@ -231,7 +231,7 @@ uled_close(struct usb_fifo *fifo, int ff sc->sc_state &= ~ULED_ENABLED; } } - + static int uled_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, int fflags) { Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Fri Oct 31 07:18:27 2014 (r273881) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Fri Oct 31 07:33:56 2014 (r273882) @@ -110,6 +110,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(DREAMLINK, DL100B, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), Copied: stable/10/sys/dev/usb/uled_ioctl.h (from r271159, head/sys/dev/usb/uled_ioctl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/usb/uled_ioctl.h Fri Oct 31 07:33:56 2014 (r273882, copy of r271159, head/sys/dev/usb/uled_ioctl.h) @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2014 Kevin Lo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _ULED_IOCTL_H_ +#define _ULED_IOCTL_H_ + +#include + +struct uled_color { + uint8_t red; + uint8_t green; + uint8_t blue; +}; + +#define ULED_GET_COLOR _IOR('U', 205, struct uled_color) +#define ULED_SET_COLOR _IOW('U', 206, struct uled_color) + +#endif /* _ULED_IOCTL_H_ */ Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Fri Oct 31 07:18:27 2014 (r273881) +++ stable/10/sys/dev/usb/usbdevs Fri Oct 31 07:33:56 2014 (r273882) @@ -713,6 +713,7 @@ vendor LONGCHEER 0x1c9e Longcheer Holdin vendor MPMAN 0x1cae MpMan vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik vendor NEOTEL 0x1d09 Neotel +vendor DREAMLINK 0x1d34 Dream Link vendor PEGATRON 0x1d4d Pegatron vendor QISDA 0x1da5 Qisda vendor METAGEEK2 0x1dd5 MetaGeek @@ -1657,6 +1658,9 @@ product DMI DISK 0x2bcf Generic Disk /* DrayTek products */ product DRAYTEK VIGOR550 0x0550 Vigor550 +/* Dream Link products */ +product DREAMLINK DL100B 0x0004 USB Webmail Notifier + /* dresden elektronik products */ product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Terminal Modified: stable/10/sys/modules/usb/Makefile ============================================================================== --- stable/10/sys/modules/usb/Makefile Fri Oct 31 07:18:27 2014 (r273881) +++ stable/10/sys/modules/usb/Makefile Fri Oct 31 07:33:56 2014 (r273882) @@ -35,7 +35,7 @@ SUBDIR += ${_dwc_otg} ehci ${_musb} ohci ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += ${_urtwn} ${_urtwnfw} -SUBDIR += atp uhid ukbd ums udbp ufm uep wsp +SUBDIR += atp uhid ukbd ums udbp ufm uep wsp uled SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth