linux/drivers/power/supply/mm8013.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2023, Linaro Limited
 */
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>

#define REG_BATID
 #define BATID_101
 #define BATID_102
#define REG_TEMPERATURE
#define REG_VOLTAGE
#define REG_FLAGS
 #define MM8013_FLAG_OTC
 #define MM8013_FLAG_OTD
 #define MM8013_FLAG_BATHI
 #define MM8013_FLAG_BATLOW
 #define MM8013_FLAG_CHG_INH
 #define MM8013_FLAG_FC
 #define MM8013_FLAG_CHG
 #define MM8013_FLAG_OCC
 #define MM8013_FLAG_ODC
 #define MM8013_FLAG_OT
 #define MM8013_FLAG_UT
 #define MM8013_FLAG_DSG
#define REG_FULL_CHARGE_CAPACITY
#define REG_NOMINAL_CHARGE_CAPACITY
#define REG_AVERAGE_CURRENT
#define REG_AVERAGE_TIME_TO_EMPTY
#define REG_AVERAGE_TIME_TO_FULL
#define REG_MAX_LOAD_CURRENT
#define REG_CYCLE_COUNT
#define REG_STATE_OF_CHARGE
#define REG_DESIGN_CAPACITY
/* TODO: 0x62-0x68 seem to contain 'MM8013C' in a length-prefixed, non-terminated string */

#define DECIKELVIN_TO_DECIDEGC(t)

struct mm8013_chip {};

static int mm8013_checkdevice(struct mm8013_chip *chip)
{}

static enum power_supply_property mm8013_battery_props[] =;

static int mm8013_get_property(struct power_supply *psy,
			       enum power_supply_property psp,
			       union power_supply_propval *val)
{}

static const struct power_supply_desc mm8013_desc =;

static const struct regmap_config mm8013_regmap_config =;

static int mm8013_probe(struct i2c_client *client)
{}

static const struct i2c_device_id mm8013_id_table[] =;
MODULE_DEVICE_TABLE(i2c, mm8013_id_table);

static const struct of_device_id mm8013_match_table[] =;

static struct i2c_driver mm8013_i2c_driver =;
module_i2c_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();