linux/drivers/iio/potentiometer/max5432.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Maxim Integrated MAX5432-MAX5435 digital potentiometer driver
 * Copyright (C) 2019 Martin Kaiser <[email protected]>
 *
 * Datasheet:
 * https://datasheets.maximintegrated.com/en/ds/MAX5432-MAX5435.pdf
 */

#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <linux/limits.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>

/* All chip variants have 32 wiper positions. */
#define MAX5432_MAX_POS

#define MAX5432_OHM_50K
#define MAX5432_OHM_100K

/* Update the volatile (currently active) setting. */
#define MAX5432_CMD_VREG

struct max5432_data {};

static const struct iio_chan_spec max5432_channels[] =;

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

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

static const struct iio_info max5432_info =;

static int max5432_probe(struct i2c_client *client)
{}

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

static struct i2c_driver max5432_driver =;

module_i2c_driver();

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