gpio-charger.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the
  6. * Free Software Foundation; either version 2 of the License, or (at your
  7. * option) any later version.
  8. *
  9. * You should have received a copy of the GNU General Public License along
  10. * with this program; if not, write to the Free Software Foundation, Inc.,
  11. * 675 Mass Ave, Cambridge, MA 02139, USA.
  12. *
  13. */
  14. #ifndef __LINUX_POWER_GPIO_CHARGER_H__
  15. #define __LINUX_POWER_GPIO_CHARGER_H__
  16. #include <linux/power_supply.h>
  17. #include <linux/types.h>
  18. /**
  19. * struct gpio_charger_platform_data - platform_data for gpio_charger devices
  20. * @name: Name for the chargers power_supply device
  21. * @type: Type of the charger
  22. * @gpio: GPIO which is used to indicate the chargers status
  23. * @gpio_active_low: Should be set to 1 if the GPIO is active low otherwise 0
  24. * @supplied_to: Array of battery names to which this chargers supplies power
  25. * @num_supplicants: Number of entries in the supplied_to array
  26. */
  27. struct gpio_charger_platform_data {
  28. const char *name;
  29. enum power_supply_type type;
  30. int gpio;
  31. int gpio_active_low;
  32. char **supplied_to;
  33. size_t num_supplicants;
  34. };
  35. #endif