linux/drivers/iio/adc/rockchip_saradc.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Rockchip Successive Approximation Register (SAR) A/D Converter
 * Copyright (C) 2014 ROCKCHIP, Inc.
 */

#include <linux/bitfield.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/reset.h>
#include <linux/regulator/consumer.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>

#define SARADC_DATA

#define SARADC_STAS
#define SARADC_STAS_BUSY

#define SARADC_CTRL
#define SARADC_CTRL_IRQ_STATUS
#define SARADC_CTRL_IRQ_ENABLE
#define SARADC_CTRL_POWER_CTRL
#define SARADC_CTRL_CHN_MASK

#define SARADC_DLY_PU_SOC
#define SARADC_DLY_PU_SOC_MASK

#define SARADC_TIMEOUT
#define SARADC_MAX_CHANNELS

/* v2 registers */
#define SARADC2_CONV_CON
#define SARADC_T_PD_SOC
#define SARADC_T_DAS_SOC
#define SARADC2_END_INT_EN
#define SARADC2_ST_CON
#define SARADC2_STATUS
#define SARADC2_END_INT_ST
#define SARADC2_DATA_BASE

#define SARADC2_EN_END_INT
#define SARADC2_START
#define SARADC2_SINGLE_MODE

#define SARADC2_CONV_CHANNELS

struct rockchip_saradc;

struct rockchip_saradc_data {};

struct rockchip_saradc {};

static void rockchip_saradc_reset_controller(struct reset_control *reset);

static void rockchip_saradc_start_v1(struct rockchip_saradc *info, int chn)
{}

static void rockchip_saradc_start_v2(struct rockchip_saradc *info, int chn)
{}

static void rockchip_saradc_start(struct rockchip_saradc *info, int chn)
{}

static int rockchip_saradc_read_v1(struct rockchip_saradc *info)
{}

static int rockchip_saradc_read_v2(struct rockchip_saradc *info)
{}

static int rockchip_saradc_read(struct rockchip_saradc *info)
{}

static void rockchip_saradc_power_down_v1(struct rockchip_saradc *info)
{}

static void rockchip_saradc_power_down(struct rockchip_saradc *info)
{}

static int rockchip_saradc_conversion(struct rockchip_saradc *info,
				      struct iio_chan_spec const *chan)
{}

static int rockchip_saradc_read_raw(struct iio_dev *indio_dev,
				    struct iio_chan_spec const *chan,
				    int *val, int *val2, long mask)
{}

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

static const struct iio_info rockchip_saradc_iio_info =;

#define SARADC_CHANNEL(_index, _id, _res)

static const struct iio_chan_spec rockchip_saradc_iio_channels[] =;

static const struct rockchip_saradc_data saradc_data =;

static const struct iio_chan_spec rockchip_rk3066_tsadc_iio_channels[] =;

static const struct rockchip_saradc_data rk3066_tsadc_data =;

static const struct iio_chan_spec rockchip_rk3399_saradc_iio_channels[] =;

static const struct rockchip_saradc_data rk3399_saradc_data =;

static const struct iio_chan_spec rockchip_rk3568_saradc_iio_channels[] =;

static const struct rockchip_saradc_data rk3568_saradc_data =;

static const struct iio_chan_spec rockchip_rk3588_saradc_iio_channels[] =;

static const struct rockchip_saradc_data rk3588_saradc_data =;

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

/*
 * Reset SARADC Controller.
 */
static void rockchip_saradc_reset_controller(struct reset_control *reset)
{}

static void rockchip_saradc_regulator_disable(void *data)
{}

static irqreturn_t rockchip_saradc_trigger_handler(int irq, void *p)
{}

static int rockchip_saradc_volt_notify(struct notifier_block *nb,
				       unsigned long event, void *data)
{}

static void rockchip_saradc_regulator_unreg_notifier(void *data)
{}

static int rockchip_saradc_probe(struct platform_device *pdev)
{}

static int rockchip_saradc_suspend(struct device *dev)
{}

static int rockchip_saradc_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(rockchip_saradc_pm_ops,
				rockchip_saradc_suspend,
				rockchip_saradc_resume);

static struct platform_driver rockchip_saradc_driver =;

module_platform_driver();

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