aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sigmadsp-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/sigmadsp-i2c.c')
-rw-r--r--sound/soc/codecs/sigmadsp-i2c.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/sound/soc/codecs/sigmadsp-i2c.c b/sound/soc/codecs/sigmadsp-i2c.c
new file mode 100644
index 000000000000..246081aae8ca
--- /dev/null
+++ b/sound/soc/codecs/sigmadsp-i2c.c
@@ -0,0 +1,35 @@
1/*
2 * Load Analog Devices SigmaStudio firmware files
3 *
4 * Copyright 2009-2011 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <linux/i2c.h>
10#include <linux/export.h>
11#include <linux/module.h>
12
13#include "sigmadsp.h"
14
15static int sigma_action_write_i2c(void *control_data,
16 const struct sigma_action *sa, size_t len)
17{
18 return i2c_master_send(control_data, (const unsigned char *)&sa->addr,
19 len);
20}
21
22int process_sigma_firmware(struct i2c_client *client, const char *name)
23{
24 struct sigma_firmware ssfw;
25
26 ssfw.control_data = client;
27 ssfw.write = sigma_action_write_i2c;
28
29 return _process_sigma_firmware(&client->dev, &ssfw, name);
30}
31EXPORT_SYMBOL(process_sigma_firmware);
32
33MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
34MODULE_DESCRIPTION("SigmaDSP I2C firmware loader");
35MODULE_LICENSE("GPL");