sbus.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Common sbus abstraction layer interface for cw1200 wireless driver
  3. *
  4. * Copyright (c) 2010, ST-Ericsson
  5. * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef CW1200_SBUS_H
  12. #define CW1200_SBUS_H
  13. /*
  14. * sbus priv forward definition.
  15. * Implemented and instantiated in particular modules.
  16. */
  17. struct sbus_priv;
  18. void cw1200_irq_handler(struct cw1200_common *priv);
  19. /* This MUST be wrapped with sbus_ops->lock/unlock! */
  20. int __cw1200_irq_enable(struct cw1200_common *priv, int enable);
  21. struct sbus_ops {
  22. int (*sbus_memcpy_fromio)(struct sbus_priv *self, unsigned int addr,
  23. void *dst, int count);
  24. int (*sbus_memcpy_toio)(struct sbus_priv *self, unsigned int addr,
  25. const void *src, int count);
  26. void (*lock)(struct sbus_priv *self);
  27. void (*unlock)(struct sbus_priv *self);
  28. size_t (*align_size)(struct sbus_priv *self, size_t size);
  29. int (*power_mgmt)(struct sbus_priv *self, bool suspend);
  30. };
  31. #endif /* CW1200_SBUS_H */