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

// SPDX-License-Identifier: GPL-2.0-or-later
/* NXP PCF50633 Main Battery Charger Driver
 *
 * (C) 2006-2008 by Openmoko, Inc.
 * Author: Balaji Rao <[email protected]>
 * All rights reserved.
 *
 * Broken down from monstrous PCF50633 driver mainly by
 * Harald Welte, Andy Green and Werner Almesberger
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>

#include <linux/mfd/pcf50633/core.h>
#include <linux/mfd/pcf50633/mbc.h>

struct pcf50633_mbc {};

int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma)
{}
EXPORT_SYMBOL_GPL();

int pcf50633_mbc_get_status(struct pcf50633 *pcf)
{}
EXPORT_SYMBOL_GPL();

int pcf50633_mbc_get_usb_online_status(struct pcf50633 *pcf)
{}
EXPORT_SYMBOL_GPL();

static ssize_t
show_chgmode(struct device *dev, struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR(chgmode, S_IRUGO, show_chgmode, NULL);

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

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

static DEVICE_ATTR(usb_curlim, S_IRUGO | S_IWUSR, show_usblim, set_usblim);

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

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

/*
 * This attribute allows to change MBC charging limit on the fly
 * independently of usb current limit. It also gets set automatically every
 * time usb current limit is changed.
 */
static DEVICE_ATTR(chg_curlim, S_IRUGO | S_IWUSR, show_chglim, set_chglim);

static struct attribute *pcf50633_mbc_sysfs_attrs[] =;

ATTRIBUTE_GROUPS();

static void
pcf50633_mbc_irq_handler(int irq, void *data)
{}

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

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

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

static enum power_supply_property power_props[] =;

static const u8 mbc_irq_handlers[] =;

static const struct power_supply_desc pcf50633_mbc_adapter_desc =;

static const struct power_supply_desc pcf50633_mbc_usb_desc =;

static const struct power_supply_desc pcf50633_mbc_ac_desc =;

static int pcf50633_mbc_probe(struct platform_device *pdev)
{}

static void pcf50633_mbc_remove(struct platform_device *pdev)
{}

static struct platform_driver pcf50633_mbc_driver =;

module_platform_driver();

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