#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/completion.h>
#include <linux/mfd/pcf50633/core.h>
#include <linux/mfd/pcf50633/adc.h>
struct pcf50633_adc_request { … };
struct pcf50633_adc_sync_request { … };
#define PCF50633_MAX_ADC_FIFO_DEPTH …
struct pcf50633_adc { … };
static inline struct pcf50633_adc *__to_adc(struct pcf50633 *pcf)
{ … }
static void adc_setup(struct pcf50633 *pcf, int channel, int avg)
{ … }
static void trigger_next_adc_job_if_any(struct pcf50633 *pcf)
{ … }
static int
adc_enqueue_request(struct pcf50633 *pcf, struct pcf50633_adc_request *req)
{ … }
static void pcf50633_adc_sync_read_callback(struct pcf50633 *pcf, void *param,
int result)
{ … }
int pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg)
{ … }
EXPORT_SYMBOL_GPL(…);
int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
void (*callback)(struct pcf50633 *, void *, int),
void *callback_param)
{ … }
EXPORT_SYMBOL_GPL(…);
static int adc_result(struct pcf50633 *pcf)
{ … }
static void pcf50633_adc_irq(int irq, void *data)
{ … }
static int pcf50633_adc_probe(struct platform_device *pdev)
{ … }
static void pcf50633_adc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver pcf50633_adc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;