hwbus.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Common hwbus 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_HWBUS_H
  12. #define CW1200_HWBUS_H
  13. struct hwbus_priv;
  14. void cw1200_irq_handler(struct cw1200_common *priv);
  15. /* This MUST be wrapped with hwbus_ops->lock/unlock! */
  16. int __cw1200_irq_enable(struct cw1200_common *priv, int enable);
  17. struct hwbus_ops {
  18. int (*hwbus_memcpy_fromio)(struct hwbus_priv *self, unsigned int addr,
  19. void *dst, int count);
  20. int (*hwbus_memcpy_toio)(struct hwbus_priv *self, unsigned int addr,
  21. const void *src, int count);
  22. void (*lock)(struct hwbus_priv *self);
  23. void (*unlock)(struct hwbus_priv *self);
  24. size_t (*align_size)(struct hwbus_priv *self, size_t size);
  25. int (*power_mgmt)(struct hwbus_priv *self, bool suspend);
  26. };
  27. #endif /* CW1200_HWBUS_H */