linux/drivers/power/supply/pm8916_lbc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2023, Nikita Travkin <[email protected]>
 */

#include <linux/errno.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/extcon-provider.h>
#include <linux/mod_devicetable.h>

/* Two bytes: type + subtype */
#define PM8916_PERPH_TYPE
#define PM8916_LBC_CHGR_TYPE
#define PM8916_LBC_BAT_IF_TYPE
#define PM8916_LBC_USB_TYPE
#define PM8916_LBC_MISC_TYPE

#define PM8916_LBC_CHGR_CHG_OPTION
#define PM8916_LBC_CHGR_PMIC_CHARGER

#define PM8916_LBC_CHGR_CHG_STATUS

#define PM8916_INT_RT_STS

#define PM8916_LBC_USB_USBIN_VALID

#define PM8916_LBC_CHGR_VDD_MAX
#define PM8916_LBC_CHGR_VDD_SAFE
#define PM8916_LBC_CHGR_IBAT_MAX
#define PM8916_LBC_CHGR_IBAT_SAFE

#define PM8916_LBC_CHGR_TCHG_MAX_EN
#define PM8916_LBC_CHGR_TCHG_MAX_ENABLED
#define PM8916_LBC_CHGR_TCHG_MAX

#define PM8916_LBC_CHGR_CHG_CTRL
#define PM8916_LBC_CHGR_CHG_EN
#define PM8916_LBC_CHGR_PSTG_EN

#define PM8916_LBC_CHGR_MIN_CURRENT
#define PM8916_LBC_CHGR_MAX_CURRENT

#define PM8916_LBC_CHGR_MIN_VOLTAGE
#define PM8916_LBC_CHGR_MAX_VOLTAGE
#define PM8916_LBC_CHGR_VOLTAGE_STEP

#define PM8916_LBC_CHGR_MIN_TIME
#define PM8916_LBC_CHGR_MAX_TIME

struct pm8916_lbc_charger {};

static const unsigned int pm8916_lbc_charger_cable[] =;

enum {};

static int pm8916_lbc_charger_configure(struct pm8916_lbc_charger *chg)
{}

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

static int pm8916_lbc_charger_set_property(struct power_supply *psy,
					   enum power_supply_property prop,
					   const union power_supply_propval *val)
{}

static int pm8916_lbc_charger_property_is_writeable(struct power_supply *psy,
						    enum power_supply_property psp)
{}

static enum power_supply_property pm8916_lbc_charger_properties[] =;

static irqreturn_t pm8916_lbc_charger_state_changed_irq(int irq, void *data)
{}

static int pm8916_lbc_charger_probe_dt(struct pm8916_lbc_charger *chg)
{}

static const struct power_supply_desc pm8916_lbc_charger_psy_desc =;

static int pm8916_lbc_charger_probe(struct platform_device *pdev)
{}

static const struct of_device_id pm8916_lbc_charger_of_match[] =;
MODULE_DEVICE_TABLE(of, pm8916_lbc_charger_of_match);

static struct platform_driver pm8916_lbc_charger_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();