linux/drivers/acpi/sbs.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  sbs.c - ACPI Smart Battery System Driver ($Revision: 2.0 $)
 *
 *  Copyright (c) 2007 Alexey Starikovskiy <[email protected]>
 *  Copyright (c) 2005-2007 Vladimir Lebedev <[email protected]>
 *  Copyright (c) 2005 Rich Townsend <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>

#include <linux/acpi.h>
#include <linux/timer.h>
#include <linux/jiffies.h>
#include <linux/delay.h>
#include <linux/power_supply.h>
#include <linux/platform_data/x86/apple.h>
#include <acpi/battery.h>

#include "sbshc.h"

#define ACPI_SBS_CLASS
#define ACPI_AC_CLASS
#define ACPI_SBS_DEVICE_NAME
#define ACPI_BATTERY_DIR_NAME
#define ACPI_AC_DIR_NAME

#define ACPI_SBS_NOTIFY_STATUS
#define ACPI_SBS_NOTIFY_INFO

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

static unsigned int cache_time =;
module_param(cache_time, uint, 0644);
MODULE_PARM_DESC();

#define MAX_SBS_BAT
#define ACPI_SBS_BLOCK_MAX

static const struct acpi_device_id sbs_device_ids[] =;
MODULE_DEVICE_TABLE(acpi, sbs_device_ids);

struct acpi_battery {};

#define to_acpi_battery(x)

struct acpi_sbs {};

#define to_acpi_sbs(x)

static void acpi_sbs_remove(struct acpi_device *device);
static int acpi_battery_get_state(struct acpi_battery *battery);

static inline int battery_scale(int log)
{}

static inline int acpi_battery_vscale(struct acpi_battery *battery)
{}

static inline int acpi_battery_ipscale(struct acpi_battery *battery)
{}

static inline int acpi_battery_mode(struct acpi_battery *battery)
{}

static inline int acpi_battery_scale(struct acpi_battery *battery)
{}

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

static int acpi_battery_technology(struct acpi_battery *battery)
{}

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

static const enum power_supply_property sbs_ac_props[] =;

static const enum power_supply_property sbs_charge_battery_props[] =;

static const enum power_supply_property sbs_energy_battery_props[] =;

static const struct power_supply_desc acpi_sbs_charger_desc =;

/* --------------------------------------------------------------------------
                            Smart Battery System Management
   -------------------------------------------------------------------------- */

struct acpi_battery_reader {};

static struct acpi_battery_reader info_readers[] =;

static struct acpi_battery_reader state_readers[] =;

static int acpi_manager_get_info(struct acpi_sbs *sbs)
{}

static int acpi_battery_get_info(struct acpi_battery *battery)
{}

static int acpi_battery_get_state(struct acpi_battery *battery)
{}

static int acpi_battery_get_alarm(struct acpi_battery *battery)
{}

static int acpi_battery_set_alarm(struct acpi_battery *battery)
{}

static int acpi_ac_get_present(struct acpi_sbs *sbs)
{}

static ssize_t acpi_battery_alarm_show(struct device *dev,
					struct device_attribute *attr,
					char *buf)
{}

static ssize_t acpi_battery_alarm_store(struct device *dev,
					struct device_attribute *attr,
					const char *buf, size_t count)
{}

static struct device_attribute alarm_attr =;

static struct attribute *acpi_battery_attrs[] =;
ATTRIBUTE_GROUPS();

/* --------------------------------------------------------------------------
                                 Driver Interface
   -------------------------------------------------------------------------- */
static int acpi_battery_read(struct acpi_battery *battery)
{}

/* Smart Battery */
static int acpi_battery_add(struct acpi_sbs *sbs, int id)
{}

static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
{}

static int acpi_charger_add(struct acpi_sbs *sbs)
{}

static void acpi_charger_remove(struct acpi_sbs *sbs)
{}

static void acpi_sbs_callback(void *context)
{}

static int acpi_sbs_add(struct acpi_device *device)
{}

static void acpi_sbs_remove(struct acpi_device *device)
{}

#ifdef CONFIG_PM_SLEEP
static int acpi_sbs_resume(struct device *dev)
{}
#else
#define acpi_sbs_resume
#endif

static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume);

static struct acpi_driver acpi_sbs_driver =;
module_acpi_driver();