bq27xxx_battery.h 956 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __LINUX_BQ27X00_BATTERY_H__
  2. #define __LINUX_BQ27X00_BATTERY_H__
  3. /**
  4. * struct bq27xxx_plaform_data - Platform data for bq27xxx devices
  5. * @name: Name of the battery.
  6. * @chip: Chip class number of this device.
  7. * @read: HDQ read callback.
  8. * This function should provide access to the HDQ bus the battery is
  9. * connected to.
  10. * The first parameter is a pointer to the battery device, the second the
  11. * register to be read. The return value should either be the content of
  12. * the passed register or an error value.
  13. */
  14. enum bq27xxx_chip {
  15. BQ27000 = 1, /* bq27000, bq27200 */
  16. BQ27010, /* bq27010, bq27210 */
  17. BQ27500, /* bq27500, bq27510, bq27520 */
  18. BQ27530, /* bq27530, bq27531 */
  19. BQ27541, /* bq27541, bq27542, bq27546, bq27742 */
  20. BQ27545, /* bq27545 */
  21. BQ27421, /* bq27421, bq27425, bq27441, bq27621 */
  22. };
  23. struct bq27xxx_platform_data {
  24. const char *name;
  25. enum bq27xxx_chip chip;
  26. int (*read)(struct device *dev, unsigned int);
  27. };
  28. #endif