linux/drivers/mfd/sprd-sc27xx-spi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2017 Spreadtrum Communications Inc.
 */

#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mfd/core.h>
#include <linux/mfd/sc27xx-pmic.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include <uapi/linux/usb/charger.h>

#define SPRD_PMIC_INT_MASK_STATUS
#define SPRD_PMIC_INT_RAW_STATUS
#define SPRD_PMIC_INT_EN

#define SPRD_SC2730_IRQ_BASE
#define SPRD_SC2730_IRQ_NUMS
#define SPRD_SC2730_CHG_DET
#define SPRD_SC2731_IRQ_BASE
#define SPRD_SC2731_IRQ_NUMS
#define SPRD_SC2731_CHG_DET

/* PMIC charger detection definition */
#define SPRD_PMIC_CHG_DET_DELAY_US
#define SPRD_PMIC_CHG_DET_TIMEOUT
#define SPRD_PMIC_CHG_DET_DONE
#define SPRD_PMIC_SDP_TYPE
#define SPRD_PMIC_DCP_TYPE
#define SPRD_PMIC_CDP_TYPE
#define SPRD_PMIC_CHG_TYPE_MASK

struct sprd_pmic {};

struct sprd_pmic_data {};

/*
 * Since different PMICs of SC27xx series can have different interrupt
 * base address and irq number, we should save irq number and irq base
 * in the device data structure.
 */
static const struct sprd_pmic_data sc2730_data =;

static const struct sprd_pmic_data sc2731_data =;

enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

static int sprd_pmic_spi_write(void *context, const void *data, size_t count)
{}

static int sprd_pmic_spi_read(void *context,
			      const void *reg, size_t reg_size,
			      void *val, size_t val_size)
{}

static struct regmap_bus sprd_pmic_regmap =;

static const struct regmap_config sprd_pmic_config =;

static int sprd_pmic_probe(struct spi_device *spi)
{}

static int sprd_pmic_suspend(struct device *dev)
{}

static int sprd_pmic_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops,
				sprd_pmic_suspend, sprd_pmic_resume);

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

static const struct spi_device_id sprd_pmic_spi_ids[] =;
MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);

static struct spi_driver sprd_pmic_driver =;

static int __init sprd_pmic_init(void)
{}
subsys_initcall(sprd_pmic_init);

static void __exit sprd_pmic_exit(void)
{}
module_exit(sprd_pmic_exit);

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