2 * Load Analog Devices SigmaStudio firmware files
4 * Copyright 2009-2011 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
9 #include <linux/regmap.h>
10 #include <linux/export.h>
11 #include <linux/module.h>
15 static int sigma_action_write_regmap(void *control_data
,
16 const struct sigma_action
*sa
, size_t len
)
18 return regmap_raw_write(control_data
, be16_to_cpu(sa
->addr
),
19 sa
->payload
, len
- 2);
22 int process_sigma_firmware_regmap(struct device
*dev
, struct regmap
*regmap
,
25 struct sigma_firmware ssfw
;
27 ssfw
.control_data
= regmap
;
28 ssfw
.write
= sigma_action_write_regmap
;
30 return _process_sigma_firmware(dev
, &ssfw
, name
);
32 EXPORT_SYMBOL(process_sigma_firmware_regmap
);
34 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
35 MODULE_DESCRIPTION("SigmaDSP regmap firmware loader");
36 MODULE_LICENSE("GPL");