linux/drivers/iio/adc/lp8788_adc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * TI LP8788 MFD - ADC driver
 *
 * Copyright 2012 Texas Instruments
 *
 * Author: Milo(Woogyom) Kim <[email protected]>
 */

#include <linux/delay.h>
#include <linux/iio/iio.h>
#include <linux/iio/driver.h>
#include <linux/iio/machine.h>
#include <linux/mfd/lp8788.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

/* register address */
#define LP8788_ADC_CONF
#define LP8788_ADC_RAW
#define LP8788_ADC_DONE

#define ADC_CONV_START

struct lp8788_adc {};

static const int lp8788_scale[LPADC_MAX] =;

static int lp8788_get_adc_result(struct lp8788_adc *adc, enum lp8788_adc_id id,
				int *val)
{}

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

static const struct iio_info lp8788_adc_info =;

#define LP8788_CHAN(_id, _type)

static const struct iio_chan_spec lp8788_adc_channels[] =;

/* default maps used by iio consumer (lp8788-charger driver) */
static struct iio_map lp8788_default_iio_maps[] =;

static int lp8788_iio_map_register(struct device *dev,
				struct iio_dev *indio_dev,
				struct lp8788_platform_data *pdata,
				struct lp8788_adc *adc)
{}

static int lp8788_adc_probe(struct platform_device *pdev)
{}

static struct platform_driver lp8788_adc_driver =;
module_platform_driver();

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