linux/include/linux/pm2301_charger.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0-only */
   2/*
   3 * PM2301 charger driver.
   4 *
   5 * Copyright (C) 2012 ST Ericsson Corporation
   6 *
   7 * Contact: Olivier LAUNAY (olivier.launay@stericsson.com
   8 */
   9
  10#ifndef __LINUX_PM2301_H
  11#define __LINUX_PM2301_H
  12
  13/**
  14 * struct pm2xxx_bm_charger_parameters - Charger specific parameters
  15 * @ac_volt_max:        maximum allowed AC charger voltage in mV
  16 * @ac_curr_max:        maximum allowed AC charger current in mA
  17 */
  18struct pm2xxx_bm_charger_parameters {
  19        int ac_volt_max;
  20        int ac_curr_max;
  21};
  22
  23/**
  24 * struct pm2xxx_bm_data - pm2xxx battery management data
  25 * @enable_overshoot    flag to enable VBAT overshoot control
  26 * @chg_params    charger parameters
  27 */
  28struct pm2xxx_bm_data {
  29        bool enable_overshoot;
  30        const struct pm2xxx_bm_charger_parameters *chg_params;
  31};
  32
  33struct pm2xxx_charger_platform_data {
  34        char **supplied_to;
  35        size_t num_supplicants;
  36        int i2c_bus;
  37        const char *label;
  38        int gpio_irq_number;
  39        unsigned int lpn_gpio;
  40        int irq_type;
  41};
  42
  43struct pm2xxx_platform_data {
  44        struct pm2xxx_charger_platform_data *wall_charger;
  45        struct pm2xxx_bm_data *battery;
  46};
  47
  48#endif /* __LINUX_PM2301_H */
  49