linux/drivers/hwmon/max197.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Maxim MAX197 A/D Converter driver
 *
 * Copyright (c) 2012 Savoir-faire Linux Inc.
 *          Vivien Didelot <[email protected]>
 *
 * For further information, see the Documentation/hwmon/max197.rst file.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/platform_device.h>
#include <linux/platform_data/max197.h>

#define MAX199_LIMIT
#define MAX197_LIMIT

#define MAX197_NUM_CH

/* Control byte format */
#define MAX197_BIP
#define MAX197_RNG

#define MAX197_SCALE

/* List of supported chips */
enum max197_chips {};

/**
 * struct max197_data - device instance specific data
 * @pdata:		Platform data.
 * @hwmon_dev:		The hwmon device.
 * @lock:		Read/Write mutex.
 * @limit:		Max range value (10V for MAX197, 4V for MAX199).
 * @scale:		Need to scale.
 * @ctrl_bytes:		Channels control byte.
 */
struct max197_data {};

static inline void max197_set_unipolarity(struct max197_data *data, int channel)
{}

static inline void max197_set_bipolarity(struct max197_data *data, int channel)
{}

static inline void max197_set_half_range(struct max197_data *data, int channel)
{}

static inline void max197_set_full_range(struct max197_data *data, int channel)
{}

static inline bool max197_is_bipolar(struct max197_data *data, int channel)
{}

static inline bool max197_is_full_range(struct max197_data *data, int channel)
{}

/* Function called on read access on in{0,1,2,3,4,5,6,7}_{min,max} */
static ssize_t max197_show_range(struct device *dev,
				 struct device_attribute *devattr, char *buf)
{}

/* Function called on write access on in{0,1,2,3,4,5,6,7}_{min,max} */
static ssize_t max197_store_range(struct device *dev,
				  struct device_attribute *devattr,
				  const char *buf, size_t count)
{}

/* Function called on read access on in{0,1,2,3,4,5,6,7}_input */
static ssize_t max197_show_input(struct device *dev,
				 struct device_attribute *devattr,
				 char *buf)
{}

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

#define MAX197_SENSOR_DEVICE_ATTR_CH(chan)

#define MAX197_SENSOR_DEV_ATTR_IN(chan)

static DEVICE_ATTR_RO(name);

MAX197_SENSOR_DEVICE_ATTR_CH();
MAX197_SENSOR_DEVICE_ATTR_CH();
MAX197_SENSOR_DEVICE_ATTR_CH();
MAX197_SENSOR_DEVICE_ATTR_CH();
MAX197_SENSOR_DEVICE_ATTR_CH();
MAX197_SENSOR_DEVICE_ATTR_CH();
MAX197_SENSOR_DEVICE_ATTR_CH();
MAX197_SENSOR_DEVICE_ATTR_CH();

static const struct attribute_group max197_sysfs_group =;

static int max197_probe(struct platform_device *pdev)
{}

static void max197_remove(struct platform_device *pdev)
{}

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

static struct platform_driver max197_driver =;
module_platform_driver();

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