13 #include <linux/module.h>
15 #include <linux/slab.h>
25 char name[
sizeof(
"dac124s085-3")];
36 #define REG_WRITE (0 << 12)
37 #define REG_WRITE_UPDATE (1 << 12)
38 #define ALL_WRITE_UPDATE (2 << 12)
39 #define POWER_DOWN_OUTPUT (3 << 12)
50 spi_write(led->
spi, (
const u8 *)&word,
sizeof(word));
60 spin_lock(&led->
lock);
63 spin_unlock(&led->
lock);
89 led->
ldev.max_brightness = 0xfff;
90 led->
ldev.brightness_set = dac124s085_set_brightness;
96 spi_set_drvdata(spi, dac);
104 spi_set_drvdata(spi,
NULL);
108 static int dac124s085_remove(
struct spi_device *spi)
110 struct dac124s085 *dac = spi_get_drvdata(spi);
118 spi_set_drvdata(spi,
NULL);
123 static struct spi_driver dac124s085_driver = {
124 .probe = dac124s085_probe,
125 .remove = dac124s085_remove,
127 .name =
"dac124s085",