linux/drivers/power/supply/max14656_charger_detector.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Maxim MAX14656 / AL32 USB Charger Detector driver
 *
 * Copyright (C) 2014 LG Electronics, Inc
 * Copyright (C) 2016 Alexander Kurz <[email protected]>
 *
 * Components from Maxim AL32 Charger detection Driver for MX50 Yoshi Board
 * Copyright (C) Amazon Technologies Inc. All rights reserved.
 * Manish Lachwani ([email protected])
 */
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/mod_devicetable.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/power_supply.h>
#include <linux/devm-helpers.h>

#define MAX14656_MANUFACTURER
#define MAX14656_NAME

#define MAX14656_DEVICE_ID
#define MAX14656_INTERRUPT_1
#define MAX14656_INTERRUPT_2
#define MAX14656_STATUS_1
#define MAX14656_STATUS_2
#define MAX14656_INTMASK_1
#define MAX14656_INTMASK_2
#define MAX14656_CONTROL_1
#define MAX14656_CONTROL_2
#define MAX14656_CONTROL_3

#define DEVICE_VENDOR_MASK
#define DEVICE_REV_MASK
#define INT_EN_REG_MASK
#define CHG_TYPE_INT_MASK
#define STATUS1_VB_VALID_MASK
#define STATUS1_CHG_TYPE_MASK
#define INT1_DCD_TIMEOUT_MASK
#define CONTROL1_DEFAULT
#define CONTROL1_INT_EN
#define CONTROL1_INT_ACTIVE_HIGH
#define CONTROL1_EDGE
#define CONTROL2_DEFAULT
#define CONTROL2_ADC_EN
#define CONTROL3_DEFAULT

enum max14656_chg_type {};

static const struct max14656_chg_type_props {} chg_type_props[] =;

struct max14656_chip {};

static int max14656_read_reg(struct i2c_client *client, int reg, u8 *val)
{}

static int max14656_write_reg(struct i2c_client *client, int reg, u8 val)
{}

static int max14656_read_block_reg(struct i2c_client *client, u8 reg,
				  u8 length, u8 *val)
{}

#define REG_TOTAL_NUM
static void max14656_irq_worker(struct work_struct *work)
{}

static irqreturn_t max14656_irq(int irq, void *dev_id)
{}

static int max14656_hw_init(struct max14656_chip *chip)
{}

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

static enum power_supply_property max14656_battery_props[] =;

static int max14656_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver max14656_i2c_driver =;
module_i2c_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();