linux/drivers/power/supply/samsung-sdi-battery.c

// SPDX-License-Identifier: GPL-2.0

/*
 * Battery data and characteristics for Samsung SDI (Samsung Digital Interface)
 * batteries. The data is retrieved automatically into drivers using
 * the power_supply_get_battery_info() call.
 *
 * The BTI (battery type indicator) resistance in the code drops was very
 * unreliable. The resistance listed here was obtained by simply measuring
 * the BTI resistance with a multimeter on the battery.
 */
#include <linux/module.h>
#include <linux/power_supply.h>
#include "samsung-sdi-battery.h"

struct samsung_sdi_battery {};

/*
 * Voltage to internal resistance tables. The internal resistance varies
 * depending on the VBAT voltage, so look this up from a table. Different
 * tables apply depending on whether we are charging or not.
 */

static const struct power_supply_vbat_ri_table samsung_vbat2res_discharging_eb_l1m7flu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_charging_eb_l1m7flu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_discharging_eb425161la[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_charging_eb425161la[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_discharging_eb425161lu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_charging_eb425161lu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_discharging_eb485159lu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_charging_eb485159lu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_discharging_eb535151vu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_charging_eb535151vu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_discharging_eb585157lu[] =;

static const struct power_supply_vbat_ri_table samsung_vbat2res_charging_eb585157lu[] =;

/*
 * Temperature to internal resistance scaling tables.
 *
 * "resistance" is the percentage of the resistance determined from the voltage
 * so this represents the capacity ratio at different temperatures.
 *
 * FIXME: the proper table is missing: Samsung does not provide the necessary
 * temperature compensation tables so we just state 100% for every temperature.
 * If you have the datasheets, please provide these tables.
 */
static struct power_supply_resistance_temp_table samsung_temp2res[] =;

/*
 * Capacity tables for different Open Circuit Voltages (OCV).
 * These must be sorted by falling OCV value.
 */

static struct power_supply_battery_ocv_table samsung_ocv_cap_eb485159lu[] =;

/* Same capacity table is used by eb-l1m7flu, eb425161la, eb425161lu */
static struct power_supply_battery_ocv_table samsung_ocv_cap_1500mah[] =;

static struct power_supply_battery_ocv_table samsung_ocv_cap_eb535151vu[] =;

static struct power_supply_battery_ocv_table samsung_ocv_cap_eb585157lu[] =;

static const struct power_supply_maintenance_charge_table samsung_maint_charge_table[] =;

static struct samsung_sdi_battery samsung_sdi_batteries[] =;

int samsung_sdi_battery_get_info(struct device *dev,
				 const char *compatible,
				 struct power_supply_battery_info **info)
{}
EXPORT_SYMBOL_GPL();