#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/linear_range.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/power_supply.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/types.h>
#include "bd99954-charger.h"
struct bd9995x_init_data { … };
struct bd9995x_state { … };
struct bd9995x_device { … };
static const struct regmap_range bd9995x_readonly_reg_ranges[] = …;
static const struct regmap_access_table bd9995x_writeable_regs = …;
static const struct regmap_range bd9995x_volatile_reg_ranges[] = …;
static const struct regmap_access_table bd9995x_volatile_regs = …;
static const struct regmap_range_cfg regmap_range_cfg[] = …;
static const struct regmap_config bd9995x_regmap_config = …;
enum bd9995x_chrg_fault { … };
static int bd9995x_get_prop_batt_health(struct bd9995x_device *bd)
{ … }
static int bd9995x_get_prop_charge_type(struct bd9995x_device *bd)
{ … }
static bool bd9995x_get_prop_batt_present(struct bd9995x_device *bd)
{ … }
static int bd9995x_get_prop_batt_voltage(struct bd9995x_device *bd)
{ … }
static int bd9995x_get_prop_batt_current(struct bd9995x_device *bd)
{ … }
#define DEFAULT_BATTERY_TEMPERATURE …
static int bd9995x_get_prop_batt_temp(struct bd9995x_device *bd)
{ … }
static int bd9995x_power_supply_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int bd9995x_get_chip_state(struct bd9995x_device *bd,
struct bd9995x_state *state)
{ … }
static irqreturn_t bd9995x_irq_handler_thread(int irq, void *private)
{ … }
static int __bd9995x_chip_reset(struct bd9995x_device *bd)
{ … }
static int bd9995x_hw_init(struct bd9995x_device *bd)
{ … }
static enum power_supply_property bd9995x_power_supply_props[] = …;
static const struct power_supply_desc bd9995x_power_supply_desc = …;
static const struct linear_range input_current_limit_ranges[] = …;
static const struct linear_range charging_current_ranges[] = …;
static const struct linear_range charge_voltage_regulation_ranges[] = …;
static const struct linear_range vsys_voltage_regulation_ranges[] = …;
static const struct linear_range trickle_to_pre_threshold_ranges[] = …;
static const struct linear_range fast_charge_current_ranges[] = …;
struct battery_init { … };
struct dt_init { … };
static int bd9995x_fw_probe(struct bd9995x_device *bd)
{ … }
static void bd9995x_chip_reset(void *bd)
{ … }
static int bd9995x_probe(struct i2c_client *client)
{ … }
static const struct of_device_id bd9995x_of_match[] = …;
MODULE_DEVICE_TABLE(of, bd9995x_of_match);
static struct i2c_driver bd9995x_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;