blob: 246081aae8cae4df5fbf25ccbafd8302d9411133 [file] [log] [blame]
Lars-Peter Clausen6b109982014-06-06 14:09:17 +02001/*
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");