hwbus.h 920 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Common hwbus abstraction layer interface for cw1200 wireless driver
  4. *
  5. * Copyright (c) 2010, ST-Ericsson
  6. * Author: Dmitry Tarnyagin <[email protected]>
  7. */
  8. #ifndef CW1200_HWBUS_H
  9. #define CW1200_HWBUS_H
  10. struct hwbus_priv;
  11. void cw1200_irq_handler(struct cw1200_common *priv);
  12. /* This MUST be wrapped with hwbus_ops->lock/unlock! */
  13. int __cw1200_irq_enable(struct cw1200_common *priv, int enable);
  14. struct hwbus_ops {
  15. int (*hwbus_memcpy_fromio)(struct hwbus_priv *self, unsigned int addr,
  16. void *dst, int count);
  17. int (*hwbus_memcpy_toio)(struct hwbus_priv *self, unsigned int addr,
  18. const void *src, int count);
  19. void (*lock)(struct hwbus_priv *self);
  20. void (*unlock)(struct hwbus_priv *self);
  21. size_t (*align_size)(struct hwbus_priv *self, size_t size);
  22. int (*power_mgmt)(struct hwbus_priv *self, bool suspend);
  23. };
  24. #endif /* CW1200_HWBUS_H */