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

/*
 * Battery charger driver for TI BQ24735
 *
 * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#include <linux/devm-helpers.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
#include <linux/power_supply.h>
#include <linux/slab.h>

#include <linux/power/bq24735-charger.h>

/* BQ24735 available commands and their respective masks */
#define BQ24735_CHARGE_OPT
#define BQ24735_CHARGE_CURRENT
#define BQ24735_CHARGE_CURRENT_MASK
#define BQ24735_CHARGE_VOLTAGE
#define BQ24735_CHARGE_VOLTAGE_MASK
#define BQ24735_INPUT_CURRENT
#define BQ24735_INPUT_CURRENT_MASK
#define BQ24735_MANUFACTURER_ID
#define BQ24735_DEVICE_ID

/* ChargeOptions bits of interest */
#define BQ24735_CHARGE_OPT_CHG_DISABLE
#define BQ24735_CHARGE_OPT_AC_PRESENT

struct bq24735 {};

static inline struct bq24735 *to_bq24735(struct power_supply *psy)
{}

static enum power_supply_property bq24735_charger_properties[] =;

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

static inline int bq24735_write_word(struct i2c_client *client, u8 reg,
				     u16 value)
{}

static inline int bq24735_read_word(struct i2c_client *client, u8 reg)
{}

static int bq24735_update_word(struct i2c_client *client, u8 reg,
			       u16 mask, u16 value)
{}

static int bq24735_config_charger(struct bq24735 *charger)
{}

static inline int bq24735_enable_charging(struct bq24735 *charger)
{}

static inline int bq24735_disable_charging(struct bq24735 *charger)
{}

static bool bq24735_charger_is_present(struct bq24735 *charger)
{}

static int bq24735_charger_is_charging(struct bq24735 *charger)
{}

static void bq24735_update(struct bq24735 *charger)
{}

static irqreturn_t bq24735_charger_isr(int irq, void *devid)
{}

static void bq24735_poll(struct work_struct *work)
{}

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

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

static struct bq24735_platform *bq24735_parse_dt_data(struct i2c_client *client)
{}

static int bq24735_charger_probe(struct i2c_client *client)
{}

static const struct i2c_device_id bq24735_charger_id[] =;
MODULE_DEVICE_TABLE(i2c, bq24735_charger_id);

static const struct of_device_id bq24735_match_ids[] =;
MODULE_DEVICE_TABLE(of, bq24735_match_ids);

static struct i2c_driver bq24735_charger_driver =;

module_i2c_driver();

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