Source
static DEVICE_ATTR(pattern, S_IWUSR, NULL, lm3556_indicator_pattern_store);
/*
* Simple driver for Texas Instruments LM355x LED Flash driver chip
* Copyright (C) 2012 Texas Instruments
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
enum lm355x_type {
CHIP_LM3554 = 0,
CHIP_LM3556,
};
enum lm355x_regs {
REG_FLAG = 0,
REG_TORCH_CFG,
REG_TORCH_CTRL,
REG_STROBE_CFG,
REG_FLASH_CTRL,
REG_INDI_CFG,
REG_INDI_CTRL,
REG_OPMODE,
REG_MAX,
};
/* operation mode */
enum lm355x_mode {
MODE_SHDN = 0,
MODE_INDIC,
MODE_TORCH,
MODE_FLASH
};
/* register map info. */
struct lm355x_reg_data {
u8 regno;
u8 mask;
u8 shift;
};
struct lm355x_chip_data {
struct device *dev;
enum lm355x_type type;
struct led_classdev cdev_flash;
struct led_classdev cdev_torch;
struct led_classdev cdev_indicator;
struct lm355x_platform_data *pdata;
struct regmap *regmap;
struct mutex lock;