linux/drivers/hwmon/mc13783-adc.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for the ADC on Freescale Semiconductor MC13783 and MC13892 PMICs.
 *
 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
 * Copyright (C) 2009 Sascha Hauer, Pengutronix
 */

#include <linux/mfd/mc13xxx.h>
#include <linux/platform_device.h>
#include <linux/hwmon-sysfs.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/hwmon.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/err.h>

#define DRIVER_NAME

/* platform device id driver data */
#define MC13783_ADC_16CHANS
#define MC13783_ADC_BPDIV2

struct mc13783_adc_priv {};

static ssize_t name_show(struct device *dev, struct device_attribute *devattr,
			 char *buf)
{}

static int mc13783_adc_read(struct device *dev,
		struct device_attribute *devattr, unsigned int *val)
{}

static ssize_t mc13783_adc_bp_show(struct device *dev,
				   struct device_attribute *devattr,
				   char *buf)
{}

static ssize_t mc13783_adc_gp_show(struct device *dev,
				   struct device_attribute *devattr,
				   char *buf)
{}

static ssize_t mc13783_adc_uid_show(struct device *dev,
				    struct device_attribute *devattr,
				    char *buf)
{}

static ssize_t mc13783_adc_temp_show(struct device *dev,
				     struct device_attribute *devattr,
				     char *buf)
{}

static DEVICE_ATTR_RO(name);
static SENSOR_DEVICE_ATTR_RO(in2_input, mc13783_adc_bp, 2);
static SENSOR_DEVICE_ATTR_RO(in5_input, mc13783_adc_gp, 5);
static SENSOR_DEVICE_ATTR_RO(in6_input, mc13783_adc_gp, 6);
static SENSOR_DEVICE_ATTR_RO(in7_input, mc13783_adc_gp, 7);
static SENSOR_DEVICE_ATTR_RO(in8_input, mc13783_adc_gp, 8);
static SENSOR_DEVICE_ATTR_RO(in9_input, mc13783_adc_gp, 9);
static SENSOR_DEVICE_ATTR_RO(in10_input, mc13783_adc_gp, 10);
static SENSOR_DEVICE_ATTR_RO(in11_input, mc13783_adc_gp, 11);
static SENSOR_DEVICE_ATTR_RO(in12_input, mc13783_adc_gp, 12);
static SENSOR_DEVICE_ATTR_RO(in13_input, mc13783_adc_gp, 13);
static SENSOR_DEVICE_ATTR_RO(in14_input, mc13783_adc_gp, 14);
static SENSOR_DEVICE_ATTR_RO(in15_input, mc13783_adc_gp, 15);
static SENSOR_DEVICE_ATTR_RO(in16_input, mc13783_adc_uid, 16);
static SENSOR_DEVICE_ATTR_RO(temp1_input, mc13783_adc_temp, 17);

static struct attribute *mc13783_attr_base[] =;

static const struct attribute_group mc13783_group_base =;

/* these are only used if MC13783_ADC_16CHANS is provided in driver data */
static struct attribute *mc13783_attr_16chans[] =;

static const struct attribute_group mc13783_group_16chans =;

/* last four channels may be occupied by the touchscreen */
static struct attribute *mc13783_attr_ts[] =;

static const struct attribute_group mc13783_group_ts =;

static int mc13783_adc_use_touchscreen(struct platform_device *pdev)
{}

static int __init mc13783_adc_probe(struct platform_device *pdev)
{}

static void mc13783_adc_remove(struct platform_device *pdev)
{}

static const struct platform_device_id mc13783_adc_idtable[] =;
MODULE_DEVICE_TABLE(platform, mc13783_adc_idtable);

static struct platform_driver mc13783_adc_driver =;

module_platform_driver_probe();

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