linux/drivers/mfd/qcom-spmi-pmic.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
 */

#include <linux/device.h>
#include <linux/errno.h>
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/spmi.h>
#include <linux/types.h>
#include <linux/regmap.h>
#include <soc/qcom/qcom-spmi-pmic.h>

#define PMIC_REV2
#define PMIC_REV3
#define PMIC_REV4
#define PMIC_TYPE
#define PMIC_SUBTYPE
#define PMIC_FAB_ID

#define PMIC_TYPE_VALUE

#define PMIC_REV4_V2

struct qcom_spmi_dev {};

static DEFINE_MUTEX(pmic_spmi_revid_lock);

#define N_USIDS(n)

static const struct of_device_id pmic_spmi_id_table[] =;

/*
 * A PMIC can be represented by multiple SPMI devices, but
 * only the base PMIC device will contain a reference to
 * the revision information.
 *
 * This function takes a pointer to a pmic device and
 * returns a pointer to the base PMIC device.
 *
 * This only supports PMICs with 1 or 2 USIDs.
 */
static struct spmi_device *qcom_pmic_get_base_usid(struct spmi_device *sdev, struct qcom_spmi_dev *ctx)
{}

static int pmic_spmi_get_base_revid(struct spmi_device *sdev, struct qcom_spmi_dev *ctx)
{}

static int pmic_spmi_load_revid(struct regmap *map, struct device *dev,
				 struct qcom_spmi_pmic *pmic)
{}

/**
 * qcom_pmic_get() - Get a pointer to the base PMIC device
 *
 * This function takes a struct device for a driver which is a child of a PMIC.
 * And locates the PMIC revision information for it.
 *
 * @dev: the pmic function device
 * @return: the struct qcom_spmi_pmic* pointer associated with the function device
 */
const struct qcom_spmi_pmic *qcom_pmic_get(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

static const struct regmap_config spmi_regmap_config =;

static int pmic_spmi_probe(struct spmi_device *sdev)
{}

static void pmic_spmi_remove(struct spmi_device *sdev)
{}

MODULE_DEVICE_TABLE(of, pmic_spmi_id_table);

static struct spmi_driver pmic_spmi_driver =;
module_spmi_driver();

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