linux/drivers/power/supply/qcom_battmgr.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022, Linaro Ltd
 */
#include <linux/auxiliary_bus.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of_device.h>
#include <linux/power_supply.h>
#include <linux/soc/qcom/pdr.h>
#include <linux/soc/qcom/pmic_glink.h>
#include <linux/math.h>
#include <linux/units.h>

#define BATTMGR_CHEMISTRY_LEN
#define BATTMGR_STRING_LEN

enum qcom_battmgr_variant {};

#define BATTMGR_BAT_STATUS

#define BATTMGR_REQUEST_NOTIFICATION

#define BATTMGR_NOTIFICATION
#define NOTIF_BAT_PROPERTY
#define NOTIF_USB_PROPERTY
#define NOTIF_WLS_PROPERTY
#define NOTIF_BAT_INFO
#define NOTIF_BAT_STATUS

#define BATTMGR_BAT_INFO

#define BATTMGR_BAT_DISCHARGE_TIME

#define BATTMGR_BAT_CHARGE_TIME

#define BATTMGR_BAT_PROPERTY_GET
#define BATTMGR_BAT_PROPERTY_SET
#define BATT_STATUS
#define BATT_HEALTH
#define BATT_PRESENT
#define BATT_CHG_TYPE
#define BATT_CAPACITY
#define BATT_SOH
#define BATT_VOLT_OCV
#define BATT_VOLT_NOW
#define BATT_VOLT_MAX
#define BATT_CURR_NOW
#define BATT_CHG_CTRL_LIM
#define BATT_CHG_CTRL_LIM_MAX
#define BATT_TEMP
#define BATT_TECHNOLOGY
#define BATT_CHG_COUNTER
#define BATT_CYCLE_COUNT
#define BATT_CHG_FULL_DESIGN
#define BATT_CHG_FULL
#define BATT_MODEL_NAME
#define BATT_TTF_AVG
#define BATT_TTE_AVG
#define BATT_RESISTANCE
#define BATT_POWER_NOW
#define BATT_POWER_AVG

#define BATTMGR_USB_PROPERTY_GET
#define BATTMGR_USB_PROPERTY_SET
#define USB_ONLINE
#define USB_VOLT_NOW
#define USB_VOLT_MAX
#define USB_CURR_NOW
#define USB_CURR_MAX
#define USB_INPUT_CURR_LIMIT
#define USB_TYPE
#define USB_ADAP_TYPE
#define USB_MOISTURE_DET_EN
#define USB_MOISTURE_DET_STS

#define BATTMGR_WLS_PROPERTY_GET
#define BATTMGR_WLS_PROPERTY_SET
#define WLS_ONLINE
#define WLS_VOLT_NOW
#define WLS_VOLT_MAX
#define WLS_CURR_NOW
#define WLS_CURR_MAX
#define WLS_TYPE
#define WLS_BOOST_EN

struct qcom_battmgr_enable_request {};

struct qcom_battmgr_property_request {};

struct qcom_battmgr_update_request {};

struct qcom_battmgr_charge_time_request {};

struct qcom_battmgr_discharge_time_request {};

struct qcom_battmgr_message {};

#define BATTMGR_CHARGING_SOURCE_AC
#define BATTMGR_CHARGING_SOURCE_USB
#define BATTMGR_CHARGING_SOURCE_WIRELESS

enum qcom_battmgr_unit {};

struct qcom_battmgr_info {};

struct qcom_battmgr_status {};

struct qcom_battmgr_ac {};

struct qcom_battmgr_usb {};

struct qcom_battmgr_wireless {};

struct qcom_battmgr {};

static int qcom_battmgr_request(struct qcom_battmgr *battmgr, void *data, size_t len)
{}

static int qcom_battmgr_request_property(struct qcom_battmgr *battmgr, int opcode,
					 int property, u32 value)
{}

static int qcom_battmgr_update_status(struct qcom_battmgr *battmgr)
{}

static int qcom_battmgr_update_info(struct qcom_battmgr *battmgr)
{}

static int qcom_battmgr_update_charge_time(struct qcom_battmgr *battmgr)
{}

static int qcom_battmgr_update_discharge_time(struct qcom_battmgr *battmgr)
{}

static const u8 sm8350_bat_prop_map[] =;

static int qcom_battmgr_bat_sm8350_update(struct qcom_battmgr *battmgr,
					  enum power_supply_property psp)
{}

static int qcom_battmgr_bat_sc8280xp_update(struct qcom_battmgr *battmgr,
					    enum power_supply_property psp)
{}

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

static const enum power_supply_property sc8280xp_bat_props[] =;

static const struct power_supply_desc sc8280xp_bat_psy_desc =;

static const enum power_supply_property sm8350_bat_props[] =;

static const struct power_supply_desc sm8350_bat_psy_desc =;

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

static const enum power_supply_property sc8280xp_ac_props[] =;

static const struct power_supply_desc sc8280xp_ac_psy_desc =;

static const u8 sm8350_usb_prop_map[] =;

static int qcom_battmgr_usb_sm8350_update(struct qcom_battmgr *battmgr,
					  enum power_supply_property psp)
{}

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

static const enum power_supply_usb_type usb_psy_supported_types[] =;

static const enum power_supply_property sc8280xp_usb_props[] =;

static const struct power_supply_desc sc8280xp_usb_psy_desc =;

static const enum power_supply_property sm8350_usb_props[] =;

static const struct power_supply_desc sm8350_usb_psy_desc =;

static const u8 sm8350_wls_prop_map[] =;

static int qcom_battmgr_wls_sm8350_update(struct qcom_battmgr *battmgr,
					  enum power_supply_property psp)
{}

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

static const enum power_supply_property sc8280xp_wls_props[] =;

static const struct power_supply_desc sc8280xp_wls_psy_desc =;

static const enum power_supply_property sm8350_wls_props[] =;

static const struct power_supply_desc sm8350_wls_psy_desc =;

static void qcom_battmgr_notification(struct qcom_battmgr *battmgr,
				      const struct qcom_battmgr_message *msg,
				      int len)
{}

static void qcom_battmgr_sc8280xp_strcpy(char *dest, const char *src)
{}

static unsigned int qcom_battmgr_sc8280xp_parse_technology(const char *chemistry)
{}

static unsigned int qcom_battmgr_sc8280xp_convert_temp(unsigned int temperature)
{}

static void qcom_battmgr_sc8280xp_callback(struct qcom_battmgr *battmgr,
					   const struct qcom_battmgr_message *resp,
					   size_t len)
{}

static void qcom_battmgr_sm8350_callback(struct qcom_battmgr *battmgr,
					 const struct qcom_battmgr_message *resp,
					 size_t len)
{}

static void qcom_battmgr_callback(const void *data, size_t len, void *priv)
{}

static void qcom_battmgr_enable_worker(struct work_struct *work)
{}

static void qcom_battmgr_pdr_notify(void *priv, int state)
{}

static const struct of_device_id qcom_battmgr_of_variants[] =;

static char *qcom_battmgr_battery[] =;

static int qcom_battmgr_probe(struct auxiliary_device *adev,
			      const struct auxiliary_device_id *id)
{}

static const struct auxiliary_device_id qcom_battmgr_id_table[] =;
MODULE_DEVICE_TABLE(auxiliary, qcom_battmgr_id_table);

static struct auxiliary_driver qcom_battmgr_driver =;

module_auxiliary_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();