driver-hashfast.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright 2013 Con Kolivas <kernel@kolivas.org>
  3. * Copyright 2013 Hashfast Inc.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the Free
  7. * Software Foundation; either version 3 of the License, or (at your option)
  8. * any later version. See COPYING for more details.
  9. */
  10. #include "config.h"
  11. #include <stdbool.h>
  12. #include "usbutils.h"
  13. #include "fpgautils.h"
  14. #include "driver-hashfast.h"
  15. static hf_info_t **hashfast_infos;
  16. struct device_drv hashfast_drv;
  17. static void hashfast_detect(void)
  18. {
  19. }
  20. static bool hashfast_prepare(struct thr_info __maybe_unused *thr)
  21. {
  22. return true;
  23. }
  24. static bool hashfast_fill(struct cgpu_info __maybe_unused *hashfast)
  25. {
  26. return true;
  27. }
  28. static int64_t hashfast_scanhash(struct thr_info __maybe_unused *thr)
  29. {
  30. return 0;
  31. }
  32. static struct api_data *hashfast_api_stats(struct cgpu_info __maybe_unused *cgpu)
  33. {
  34. return NULL;
  35. }
  36. static void hashfast_init(struct cgpu_info __maybe_unused *hashfast)
  37. {
  38. }
  39. static void hashfast_shutdown(struct thr_info __maybe_unused *thr)
  40. {
  41. }
  42. struct device_drv hashfast_drv = {
  43. .drv_id = DRIVER_HASHFAST,
  44. .dname = "Hashfast",
  45. .name = "HFA",
  46. .drv_detect = hashfast_detect,
  47. .thread_prepare = hashfast_prepare,
  48. .hash_work = hash_queued_work,
  49. .queue_full = hashfast_fill,
  50. .scanwork = hashfast_scanhash,
  51. .get_api_stats = hashfast_api_stats,
  52. .reinit_device = hashfast_init,
  53. .thread_shutdown = hashfast_shutdown,
  54. };