linux/drivers/power/supply/max77650-charger.c

// SPDX-License-Identifier: GPL-2.0
//
// Copyright (C) 2018 BayLibre SAS
// Author: Bartosz Golaszewski <[email protected]>
//
// Battery charger driver for MAXIM 77650/77651 charger/power-supply.

#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/mfd/max77650.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>

#define MAX77650_CHARGER_ENABLED
#define MAX77650_CHARGER_DISABLED
#define MAX77650_CHARGER_CHG_EN_MASK

#define MAX77650_CHG_DETAILS_MASK
#define MAX77650_CHG_DETAILS_BITS(_reg)

/* Charger is OFF. */
#define MAX77650_CHG_OFF
/* Charger is in prequalification mode. */
#define MAX77650_CHG_PREQ
/* Charger is in fast-charge constant current mode. */
#define MAX77650_CHG_ON_CURR
/* Charger is in JEITA modified fast-charge constant-current mode. */
#define MAX77650_CHG_ON_CURR_JEITA
/* Charger is in fast-charge constant-voltage mode. */
#define MAX77650_CHG_ON_VOLT
/* Charger is in JEITA modified fast-charge constant-voltage mode. */
#define MAX77650_CHG_ON_VOLT_JEITA
/* Charger is in top-off mode. */
#define MAX77650_CHG_ON_TOPOFF
/* Charger is in JEITA modified top-off mode. */
#define MAX77650_CHG_ON_TOPOFF_JEITA
/* Charger is done. */
#define MAX77650_CHG_DONE
/* Charger is JEITA modified done. */
#define MAX77650_CHG_DONE_JEITA
/* Charger is suspended due to a prequalification timer fault. */
#define MAX77650_CHG_SUSP_PREQ_TIM_FAULT
/* Charger is suspended due to a fast-charge timer fault. */
#define MAX77650_CHG_SUSP_FAST_CHG_TIM_FAULT
/* Charger is suspended due to a battery temperature fault. */
#define MAX77650_CHG_SUSP_BATT_TEMP_FAULT

#define MAX77650_CHGIN_DETAILS_MASK
#define MAX77650_CHGIN_DETAILS_BITS(_reg)

#define MAX77650_CHGIN_UNDERVOLTAGE_LOCKOUT
#define MAX77650_CHGIN_OVERVOLTAGE_LOCKOUT
#define MAX77650_CHGIN_OKAY

#define MAX77650_CHARGER_CHG_MASK
#define MAX77650_CHARGER_CHG_CHARGING(_reg)

#define MAX77650_CHARGER_VCHGIN_MIN_MASK
#define MAX77650_CHARGER_VCHGIN_MIN_SHIFT(_val)

#define MAX77650_CHARGER_ICHGIN_LIM_MASK
#define MAX77650_CHARGER_ICHGIN_LIM_SHIFT(_val)

struct max77650_charger_data {};

static enum power_supply_property max77650_charger_properties[] =;

static const unsigned int max77650_charger_vchgin_min_table[] =;

static const unsigned int max77650_charger_ichgin_lim_table[] =;

static int max77650_charger_set_vchgin_min(struct max77650_charger_data *chg,
					   unsigned int val)
{}

static int max77650_charger_set_ichgin_lim(struct max77650_charger_data *chg,
					   unsigned int val)
{}

static int max77650_charger_enable(struct max77650_charger_data *chg)
{}

static void max77650_charger_disable(struct max77650_charger_data *chg)
{}

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

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

static const struct power_supply_desc max77650_battery_desc =;

static int max77650_charger_probe(struct platform_device *pdev)
{}

static void max77650_charger_remove(struct platform_device *pdev)
{}

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

static struct platform_driver max77650_charger_driver =;
module_platform_driver();

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