sys_soc.h 952 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2011
  3. * Author: Lee Jones <lee.jones@linaro.org> for ST-Ericsson.
  4. * License terms: GNU General Public License (GPL), version 2
  5. */
  6. #ifndef __SOC_BUS_H
  7. #define __SOC_BUS_H
  8. #include <linux/device.h>
  9. struct soc_device_attribute {
  10. const char *machine;
  11. const char *family;
  12. const char *revision;
  13. const char *soc_id;
  14. };
  15. /**
  16. * soc_device_register - register SoC as a device
  17. * @soc_plat_dev_attr: Attributes passed from platform to be attributed to a SoC
  18. */
  19. struct soc_device *soc_device_register(
  20. struct soc_device_attribute *soc_plat_dev_attr);
  21. /**
  22. * soc_device_unregister - unregister SoC device
  23. * @dev: SoC device to be unregistered
  24. */
  25. void soc_device_unregister(struct soc_device *soc_dev);
  26. /**
  27. * soc_device_to_device - helper function to fetch struct device
  28. * @soc: Previously registered SoC device container
  29. */
  30. struct device *soc_device_to_device(struct soc_device *soc);
  31. #endif /* __SOC_BUS_H */