sdio_func.h 888 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * include/linux/mmc/sdio_func.h
  3. *
  4. * Copyright 2007 Pierre Ossman
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or (at
  9. * your option) any later version.
  10. */
  11. #ifndef MMC_SDIO_FUNC_H
  12. #define MMC_SDIO_FUNC_H
  13. struct mmc_card;
  14. /*
  15. * SDIO function devices
  16. */
  17. struct sdio_func {
  18. struct mmc_card *card; /* the card this device belongs to */
  19. struct device dev; /* the device */
  20. unsigned int num; /* function number */
  21. unsigned int state; /* function state */
  22. #define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
  23. };
  24. #define sdio_func_present(f) ((f)->state & SDIO_STATE_PRESENT)
  25. #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT)
  26. #define sdio_func_id(f) ((f)->dev.bus_id)
  27. #endif