linux/drivers/power/supply/power_supply_sysfs.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  Sysfs interface for the universal power supply monitor class
 *
 *  Copyright © 2007  David Woodhouse <[email protected]>
 *  Copyright © 2007  Anton Vorontsov <[email protected]>
 *  Copyright © 2004  Szabolcs Gyurko
 *  Copyright © 2003  Ian Molton <[email protected]>
 *
 *  Modified: 2004, Oct     Szabolcs Gyurko
 */

#include <linux/ctype.h>
#include <linux/device.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/string_helpers.h>

#include "power_supply.h"

#define MAX_PROP_NAME_LEN

struct power_supply_attr {};

#define _POWER_SUPPLY_ATTR(_name, _text, _len)

#define POWER_SUPPLY_ATTR(_name)
#define _POWER_SUPPLY_ENUM_ATTR(_name, _text)
#define POWER_SUPPLY_ENUM_ATTR(_name)

static const char * const POWER_SUPPLY_TYPE_TEXT[] =;

static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] =;

static const char * const POWER_SUPPLY_STATUS_TEXT[] =;

static const char * const POWER_SUPPLY_CHARGE_TYPE_TEXT[] =;

static const char * const POWER_SUPPLY_HEALTH_TEXT[] =;

static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] =;

static const char * const POWER_SUPPLY_CAPACITY_LEVEL_TEXT[] =;

static const char * const POWER_SUPPLY_SCOPE_TEXT[] =;

static const char * const POWER_SUPPLY_CHARGE_BEHAVIOUR_TEXT[] =;

static struct power_supply_attr power_supply_attrs[] =;
#define POWER_SUPPLY_ATTR_CNT

static struct attribute *
__power_supply_attrs[POWER_SUPPLY_ATTR_CNT + 1];

static struct power_supply_attr *to_ps_attr(struct device_attribute *attr)
{}

static enum power_supply_property dev_attr_psp(struct device_attribute *attr)
{}

static ssize_t power_supply_show_usb_type(struct device *dev,
					  const struct power_supply_desc *desc,
					  union power_supply_propval *value,
					  char *buf)
{}

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

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

static umode_t power_supply_attr_is_visible(struct kobject *kobj,
					   struct attribute *attr,
					   int attrno)
{}

static const struct attribute_group power_supply_attr_group =;

const struct attribute_group *power_supply_attr_groups[] =;

void power_supply_init_attrs(void)
{}

static int add_prop_uevent(const struct device *dev, struct kobj_uevent_env *env,
			   enum power_supply_property prop, char *prop_buf)
{}

int power_supply_uevent(const struct device *dev, struct kobj_uevent_env *env)
{}

ssize_t power_supply_charge_behaviour_show(struct device *dev,
					   unsigned int available_behaviours,
					   enum power_supply_charge_behaviour current_behaviour,
					   char *buf)
{}
EXPORT_SYMBOL_GPL();

int power_supply_charge_behaviour_parse(unsigned int available_behaviours, const char *buf)
{}
EXPORT_SYMBOL_GPL();