sigmadsp.h 856 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Load firmware files from Analog Devices SigmaStudio
  3. *
  4. * Copyright 2009-2011 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #ifndef __SIGMA_FIRMWARE_H__
  9. #define __SIGMA_FIRMWARE_H__
  10. #include <linux/device.h>
  11. #include <linux/regmap.h>
  12. struct sigma_action {
  13. u8 instr;
  14. u8 len_hi;
  15. __le16 len;
  16. __be16 addr;
  17. unsigned char payload[];
  18. } __packed;
  19. struct sigma_firmware {
  20. const struct firmware *fw;
  21. size_t pos;
  22. void *control_data;
  23. int (*write)(void *control_data, const struct sigma_action *sa,
  24. size_t len);
  25. };
  26. int _process_sigma_firmware(struct device *dev,
  27. struct sigma_firmware *ssfw, const char *name);
  28. struct i2c_client;
  29. extern int process_sigma_firmware(struct i2c_client *client, const char *name);
  30. extern int process_sigma_firmware_regmap(struct device *dev,
  31. struct regmap *regmap, const char *name);
  32. #endif