linux/drivers/mfd/adp5585.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Analog Devices ADP5585 I/O expander, PWM controller and keypad controller
 *
 * Copyright 2022 NXP
 * Copyright 2024 Ideas on Board Oy
 */

#include <linux/array_size.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/mfd/adp5585.h>
#include <linux/mfd/core.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/types.h>

static const struct mfd_cell adp5585_devs[] =;

static const struct regmap_range adp5585_volatile_ranges[] =;

static const struct regmap_access_table adp5585_volatile_regs =;

/*
 * Chip variants differ in the default configuration of pull-up and pull-down
 * resistors, and therefore have different default register values:
 *
 * - The -00, -01 and -03 variants (collectively referred to as
 *   ADP5585_REGMAP_00) have pull-up on all GPIO pins by default.
 * - The -02 variant has no default pull-up or pull-down resistors.
 * - The -04 variant has default pull-down resistors on all GPIO pins.
 */

static const u8 adp5585_regmap_defaults_00[ADP5585_MAX_REG + 1] =;

static const u8 adp5585_regmap_defaults_02[ADP5585_MAX_REG + 1] =;

static const u8 adp5585_regmap_defaults_04[ADP5585_MAX_REG + 1] =;

enum adp5585_regmap_type {};

static const struct regmap_config adp5585_regmap_configs[] =;

static int adp5585_i2c_probe(struct i2c_client *i2c)
{}

static int adp5585_suspend(struct device *dev)
{}

static int adp5585_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(adp5585_pm, adp5585_suspend, adp5585_resume);

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

static struct i2c_driver adp5585_i2c_driver =;
module_i2c_driver();

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