Lines Matching +full:8 +full:dev
50 static int vendor_command(struct usb_device *dev, unsigned char request, in vendor_command() argument
54 return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), in vendor_command()
67 static ssize_t brightness_show(struct device *dev, struct device_attribute *attr, char *buf) in brightness_show() argument
69 struct usb_interface *intf = to_usb_interface(dev); in brightness_show()
75 static ssize_t brightness_store(struct device *dev, struct device_attribute *attr, const char *buf, in brightness_store() argument
78 struct usb_interface *intf = to_usb_interface(dev); in brightness_store()
84 buffer = kmalloc(8, GFP_KERNEL); in brightness_store()
97 cytherm->brightness, buffer, 8); in brightness_store()
99 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in brightness_store()
102 0x01, buffer, 8); in brightness_store()
104 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in brightness_store()
116 static ssize_t temp_show(struct device *dev, struct device_attribute *attr, char *buf) in temp_show() argument
119 struct usb_interface *intf = to_usb_interface(dev); in temp_show()
127 buffer = kmalloc(8, GFP_KERNEL); in temp_show()
132 retval = vendor_command(cytherm->udev, READ_RAM, TEMP, 0, buffer, 8); in temp_show()
134 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in temp_show()
138 retval = vendor_command(cytherm->udev, READ_RAM, SIGN, 0, buffer, 8); in temp_show()
140 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in temp_show()
153 static ssize_t button_show(struct device *dev, struct device_attribute *attr, char *buf) in button_show() argument
156 struct usb_interface *intf = to_usb_interface(dev); in button_show()
162 buffer = kmalloc(8, GFP_KERNEL); in button_show()
167 retval = vendor_command(cytherm->udev, READ_RAM, BUTTON, 0, buffer, 8); in button_show()
169 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in button_show()
183 static ssize_t port0_show(struct device *dev, struct device_attribute *attr, char *buf) in port0_show() argument
185 struct usb_interface *intf = to_usb_interface(dev); in port0_show()
191 buffer = kmalloc(8, GFP_KERNEL); in port0_show()
195 retval = vendor_command(cytherm->udev, READ_PORT, 0, 0, buffer, 8); in port0_show()
197 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in port0_show()
207 static ssize_t port0_store(struct device *dev, struct device_attribute *attr, const char *buf, size… in port0_store() argument
209 struct usb_interface *intf = to_usb_interface(dev); in port0_store()
216 buffer = kmalloc(8, GFP_KERNEL); in port0_store()
228 tmp, buffer, 8); in port0_store()
230 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in port0_store()
238 static ssize_t port1_show(struct device *dev, struct device_attribute *attr, char *buf) in port1_show() argument
240 struct usb_interface *intf = to_usb_interface(dev); in port1_show()
246 buffer = kmalloc(8, GFP_KERNEL); in port1_show()
250 retval = vendor_command(cytherm->udev, READ_PORT, 1, 0, buffer, 8); in port1_show()
252 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in port1_show()
262 static ssize_t port1_store(struct device *dev, struct device_attribute *attr, const char *buf, size… in port1_store() argument
264 struct usb_interface *intf = to_usb_interface(dev); in port1_store()
271 buffer = kmalloc(8, GFP_KERNEL); in port1_store()
283 tmp, buffer, 8); in port1_store()
285 dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); in port1_store()
307 struct usb_cytherm *dev; in cytherm_probe() local
310 dev = kzalloc(sizeof(struct usb_cytherm), GFP_KERNEL); in cytherm_probe()
311 if (!dev) in cytherm_probe()
314 dev->udev = usb_get_dev(udev); in cytherm_probe()
316 usb_set_intfdata(interface, dev); in cytherm_probe()
318 dev->brightness = 0xFF; in cytherm_probe()
320 dev_info(&interface->dev, in cytherm_probe()
330 struct usb_cytherm *dev; in cytherm_disconnect() local
332 dev = usb_get_intfdata(interface); in cytherm_disconnect()
337 usb_put_dev(dev->udev); in cytherm_disconnect()
339 kfree(dev); in cytherm_disconnect()
341 dev_info(&interface->dev, "Cypress thermometer now disconnected\n"); in cytherm_disconnect()