linux/drivers/power/supply/axp20x_ac_power.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * AXP20X and AXP22X PMICs' ACIN power supply driver
 *
 * Copyright (C) 2016 Free Electrons
 *	Quentin Schulz <[email protected]>
 */

#include <linux/device.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/axp20x.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/iio/consumer.h>

#define AXP20X_PWR_STATUS_ACIN_PRESENT
#define AXP20X_PWR_STATUS_ACIN_AVAIL

#define AXP813_ACIN_PATH_SEL
#define AXP813_ACIN_PATH_SEL_TO_BIT(x)

#define AXP813_VHOLD_MASK
#define AXP813_VHOLD_UV_TO_BIT(x)
#define AXP813_VHOLD_REG_TO_UV(x)

#define AXP813_CURR_LIMIT_MASK
#define AXP813_CURR_LIMIT_UA_TO_BIT(x)
#define AXP813_CURR_LIMIT_REG_TO_UA(x)

#define DRVNAME

struct axp20x_ac_power {};

static irqreturn_t axp20x_ac_power_irq(int irq, void *devid)
{}

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

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

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

static enum power_supply_property axp20x_ac_power_properties[] =;

static enum power_supply_property axp22x_ac_power_properties[] =;

static enum power_supply_property axp813_ac_power_properties[] =;

static const struct power_supply_desc axp20x_ac_power_desc =;

static const struct power_supply_desc axp22x_ac_power_desc =;

static const struct power_supply_desc axp813_ac_power_desc =;

static const char * const axp20x_irq_names[] =;

struct axp_data {};

static const struct axp_data axp20x_data =;

static const struct axp_data axp22x_data =;

static const struct axp_data axp813_data =;

#ifdef CONFIG_PM_SLEEP
static int axp20x_ac_power_suspend(struct device *dev)
{}

static int axp20x_ac_power_resume(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(axp20x_ac_power_pm_ops, axp20x_ac_power_suspend,
						 axp20x_ac_power_resume);

static int axp20x_ac_power_probe(struct platform_device *pdev)
{}

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

static struct platform_driver axp20x_ac_power_driver =;

module_platform_driver();

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