linux/drivers/mfd/lp3943.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * TI/National Semiconductor LP3943 MFD Core Driver
 *
 * Copyright 2013 Texas Instruments
 *
 * Author: Milo Kim <[email protected]>
 *
 * Driver structure:
 *   LP3943 is an integrated device capable of driving 16 output channels.
 *   It can be used for a GPIO expander and PWM generators.
 *
 *                                   LED control    General usage for a device
 *                                   ___________   ____________________________
 *
 *   LP3943 MFD ---- GPIO expander    leds-gpio        eg) HW enable pin
 *               |
 *               --- PWM generator    leds-pwm         eg) PWM input
 *
 *   Internal two PWM channels are used for LED dimming effect.
 *   And each output pin can be used as a GPIO as well.
 *   The LED functionality can work with GPIOs or PWMs.
 *   LEDs can be controlled with legacy leds-gpio(static brightness) or
 *   leds-pwm drivers(dynamic brightness control).
 *   Alternatively, it can be used for generic GPIO and PWM controller.
 *   For example, a GPIO is HW enable pin of a device.
 *   A PWM is input pin of a backlight device.
 */

#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/mfd/core.h>
#include <linux/mfd/lp3943.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/slab.h>

#define LP3943_MAX_REGISTERS

/* Register configuration for pin MUX */
static const struct lp3943_reg_cfg lp3943_mux_cfg[] =;

static const struct mfd_cell lp3943_devs[] =;

int lp3943_read_byte(struct lp3943 *lp3943, u8 reg, u8 *read)
{}
EXPORT_SYMBOL_GPL();

int lp3943_write_byte(struct lp3943 *lp3943, u8 reg, u8 data)
{}
EXPORT_SYMBOL_GPL();

int lp3943_update_bits(struct lp3943 *lp3943, u8 reg, u8 mask, u8 data)
{}
EXPORT_SYMBOL_GPL();

static const struct regmap_config lp3943_regmap_config =;

static int lp3943_probe(struct i2c_client *cl)
{}

static const struct i2c_device_id lp3943_ids[] =;
MODULE_DEVICE_TABLE(i2c, lp3943_ids);

#ifdef CONFIG_OF
static const struct of_device_id lp3943_of_match[] =;
MODULE_DEVICE_TABLE(of, lp3943_of_match);
#endif

static struct i2c_driver lp3943_driver =;

module_i2c_driver();

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