linux/drivers/leds/leds-pca995x.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * LED driver for PCA995x I2C LED drivers
 *
 * Copyright 2011 bct electronic GmbH
 * Copyright 2013 Qtechnology/AS
 * Copyright 2022 NXP
 * Copyright 2023 Marek Vasut
 */

#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>
#include <linux/regmap.h>

/* Register definition */
#define PCA995X_MODE1
#define PCA995X_MODE2
#define PCA995X_LEDOUT0
#define PCA9955B_PWM0
#define PCA9952_PWM0
#define PCA9952_IREFALL
#define PCA9955B_IREFALL

/* Auto-increment disabled. Normal mode */
#define PCA995X_MODE1_CFG

/* LED select registers determine the source that drives LED outputs */
#define PCA995X_LED_OFF
#define PCA995X_LED_ON
#define PCA995X_LED_PWM_MODE
#define PCA995X_LDRX_MASK
#define PCA995X_LDRX_BITS

#define PCA995X_MAX_OUTPUTS
#define PCA995X_OUTPUTS_PER_REG

#define PCA995X_IREFALL_FULL_CFG
#define PCA995X_IREFALL_HALF_CFG

#define PCA995X_TYPE_NON_B
#define PCA995X_TYPE_B

#define ldev_to_led(c)

struct pca995x_led {};

struct pca995x_chip {};

static int pca995x_brightness_set(struct led_classdev *led_cdev,
				  enum led_brightness brightness)
{}

static const struct regmap_config pca995x_regmap =;

static int pca995x_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver pca995x_driver =;
module_i2c_driver();

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