12 #include <linux/module.h>
14 #include <linux/device.h>
18 #include <linux/input.h>
23 #define UCB1X00_ATTR(name,input)\
24 static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
27 struct ucb1x00 *ucb = classdev_to_ucb1x00(dev); \
29 ucb1x00_adc_enable(ucb); \
30 val = ucb1x00_adc_read(ucb, input, UCB_NOSYNC); \
31 ucb1x00_adc_disable(ucb); \
32 return sprintf(buf, "%d\n", val); \
34 static DEVICE_ATTR(name,0444,name##_show,NULL)
49 memset(&keys, 0,
sizeof(keys));
60 keys.poll_interval = 50;
61 keys.name =
"ucb1x00";
63 pdev = platform_device_register_data(&ucb->
dev,
"gpio-keys", -1,
74 static void ucb1x00_assabet_remove(
struct ucb1x00_dev *dev)
87 .add = ucb1x00_assabet_add,
88 .remove = ucb1x00_assabet_remove,
91 static int __init ucb1x00_assabet_init(
void)
96 static void __exit ucb1x00_assabet_exit(
void)