linux/drivers/power/supply/cros_peripheral_charger.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Power supply driver for ChromeOS EC based Peripheral Device Charger.
 *
 * Copyright 2020 Google LLC.
 */

#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <asm/unaligned.h>

#define DRV_NAME
#define PCHG_DIR_PREFIX
#define PCHG_DIR_NAME
#define PCHG_DIR_NAME_LENGTH
#define PCHG_CACHE_UPDATE_DELAY

struct port_data {};

struct charger_data {};

static enum power_supply_property cros_pchg_props[] =;

static int cros_pchg_ec_command(const struct charger_data *charger,
				unsigned int version,
				unsigned int command,
				const void *outdata,
				unsigned int outsize,
				void *indata,
				unsigned int insize)
{}

static const unsigned int pchg_cmd_version =;

static bool cros_pchg_cmd_ver_check(const struct charger_data *charger)
{}

static int cros_pchg_port_count(const struct charger_data *charger)
{}

static int cros_pchg_get_status(struct port_data *port)
{}

static int cros_pchg_get_port_status(struct port_data *port, bool ratelimit)
{}

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

static int cros_pchg_event(const struct charger_data *charger)
{}

static int cros_ec_notify(struct notifier_block *nb,
			  unsigned long queued_during_suspend,
			  void *data)
{}

static int cros_pchg_probe(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int __maybe_unused cros_pchg_resume(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(cros_pchg_pm_ops, NULL, cros_pchg_resume);

static const struct platform_device_id cros_pchg_id[] =;
MODULE_DEVICE_TABLE(platform, cros_pchg_id);

static struct platform_driver cros_pchg_driver =;

module_platform_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();