linux/drivers/usb/misc/cytherm.c

// SPDX-License-Identifier: GPL-2.0
/* -*- linux-c -*-
 * Cypress USB Thermometer driver 
 * 
 * Copyright (c) 2004 Erik Rigtorp <[email protected]> <[email protected]>
 * 
 * This driver works with Elektor magazine USB Interface as published in 
 * issue #291. It should also work with the original starter kit/demo board
 * from Cypress.
 */


#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/usb.h>

#define DRIVER_AUTHOR
#define DRIVER_DESC

#define USB_SKEL_VENDOR_ID
#define USB_SKEL_PRODUCT_ID

static const struct usb_device_id id_table[] =;
MODULE_DEVICE_TABLE (usb, id_table);

/* Structure to hold all of our device specific stuff */
struct usb_cytherm {};


/* Vendor requests */
/* They all operate on one byte at a time */
#define PING
#define READ_ROM
#define READ_RAM
#define WRITE_RAM
#define READ_PORT
#define WRITE_PORT 


/* Send a vendor command to device */
static int vendor_command(struct usb_device *dev, unsigned char request, 
			  unsigned char value, unsigned char index,
			  void *buf, int size)
{}



#define BRIGHTNESS
#define BRIGHTNESS_SEM

static ssize_t brightness_show(struct device *dev, struct device_attribute *attr, char *buf)
{}

static ssize_t brightness_store(struct device *dev, struct device_attribute *attr, const char *buf,
			      size_t count)
{}
static DEVICE_ATTR_RW(brightness);


#define TEMP
#define SIGN

static ssize_t temp_show(struct device *dev, struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(temp);


#define BUTTON

static ssize_t button_show(struct device *dev, struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(button);


static ssize_t port0_show(struct device *dev, struct device_attribute *attr, char *buf)
{}


static ssize_t port0_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{}
static DEVICE_ATTR_RW(port0);

static ssize_t port1_show(struct device *dev, struct device_attribute *attr, char *buf)
{}


static ssize_t port1_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{}
static DEVICE_ATTR_RW(port1);

static struct attribute *cytherm_attrs[] =;
ATTRIBUTE_GROUPS();

static int cytherm_probe(struct usb_interface *interface, 
			 const struct usb_device_id *id)
{}

static void cytherm_disconnect(struct usb_interface *interface)
{}

/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver cytherm_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();