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

// SPDX-License-Identifier: GPL-2.0
/*
 * Charging control driver for the Wilco EC
 *
 * Copyright 2019 Google LLC
 *
 * See Documentation/ABI/testing/sysfs-class-power and
 * Documentation/ABI/testing/sysfs-class-power-wilco for userspace interface
 * and other info.
 */

#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/platform_data/wilco-ec.h>
#include <linux/power_supply.h>

#define DRV_NAME

/* Property IDs and related EC constants */
#define PID_CHARGE_MODE
#define PID_CHARGE_LOWER_LIMIT
#define PID_CHARGE_UPPER_LIMIT

enum charge_mode {};

#define CHARGE_LOWER_LIMIT_MIN
#define CHARGE_LOWER_LIMIT_MAX
#define CHARGE_UPPER_LIMIT_MIN
#define CHARGE_UPPER_LIMIT_MAX

/* Convert from POWER_SUPPLY_PROP_CHARGE_TYPE value to the EC's charge mode */
static int psp_val_to_charge_mode(int psp_val)
{}

/* Convert from EC's charge mode to POWER_SUPPLY_PROP_CHARGE_TYPE value */
static int charge_mode_to_psp_val(enum charge_mode mode)
{}

static enum power_supply_property wilco_charge_props[] =;

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

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

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

static const struct power_supply_desc wilco_ps_desc =;

static int wilco_charge_probe(struct platform_device *pdev)
{}

static struct platform_driver wilco_charge_driver =;
module_platform_driver();

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