| /kernel/linux/linux-4.19/drivers/leds/ |
| D | leds-as3645a.c | 2 * drivers/leds/leds-as3645a.c - AS3645A and LM3555 flash controllers driver 24 #include <linux/led-class-flash.h> 31 #include <media/v4l2-flash-led-class.h> 136 char flash[32]; member 169 static int as3645a_write(struct as3645a *flash, u8 addr, u8 val) in as3645a_write() argument 171 struct i2c_client *client = flash->client; in as3645a_write() 183 static int as3645a_read(struct as3645a *flash, u8 addr) in as3645a_read() argument 185 struct i2c_client *client = flash->client; in as3645a_read() 201 * as3645a_set_config - Set flash configuration registers 202 * @flash: The flash [all …]
|
| /kernel/linux/linux-5.10/drivers/leds/ |
| D | leds-as3645a.c | 3 * drivers/leds/leds-as3645a.c - AS3645A and LM3555 flash controllers driver 16 #include <linux/led-class-flash.h> 23 #include <media/v4l2-flash-led-class.h> 156 static int as3645a_write(struct as3645a *flash, u8 addr, u8 val) in as3645a_write() argument 158 struct i2c_client *client = flash->client; in as3645a_write() 170 static int as3645a_read(struct as3645a *flash, u8 addr) in as3645a_read() argument 172 struct i2c_client *client = flash->client; in as3645a_read() 188 * as3645a_set_config - Set flash configuration registers 189 * @flash: The flash 191 * Configure the hardware with flash, assist and indicator currents, as well as [all …]
|
| /kernel/linux/linux-4.19/drivers/media/i2c/ |
| D | adp1653.c | 47 static int adp1653_update_hw(struct adp1653_flash *flash) in adp1653_update_hw() argument 49 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); in adp1653_update_hw() 55 flash->indicator_intensity->val) in adp1653_update_hw() 58 switch (flash->led_mode->val) { in adp1653_update_hw() 62 /* Flash mode, light on with strobe, duration from timer */ in adp1653_update_hw() 64 config |= TIMEOUT_US_TO_CODE(flash->flash_timeout->val) in adp1653_update_hw() 70 flash->torch_intensity->val) in adp1653_update_hw() 86 static int adp1653_get_fault(struct adp1653_flash *flash) in adp1653_get_fault() argument 88 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); in adp1653_get_fault() 96 flash->fault |= fault; in adp1653_get_fault() [all …]
|
| D | lm3646.c | 3 * General device driver for TI lm3646, Dual FLASH LED Driver 84 static int lm3646_mode_ctrl(struct lm3646_flash *flash, in lm3646_mode_ctrl() argument 89 return regmap_write(flash->regmap, in lm3646_mode_ctrl() 90 REG_ENABLE, flash->mode_reg | MODE_SHDN); in lm3646_mode_ctrl() 92 return regmap_write(flash->regmap, in lm3646_mode_ctrl() 93 REG_ENABLE, flash->mode_reg | MODE_TORCH); in lm3646_mode_ctrl() 95 return regmap_write(flash->regmap, in lm3646_mode_ctrl() 96 REG_ENABLE, flash->mode_reg | MODE_FLASH); in lm3646_mode_ctrl() 104 struct lm3646_flash *flash = to_lm3646_flash(ctrl); in lm3646_get_ctrl() local 111 rval = regmap_read(flash->regmap, REG_FLAG, ®_val); in lm3646_get_ctrl() [all …]
|
| D | lm3560.c | 3 * General device driver for TI lm3559, lm3560, FLASH LED Driver 76 static int lm3560_mode_ctrl(struct lm3560_flash *flash) in lm3560_mode_ctrl() argument 80 switch (flash->led_mode) { in lm3560_mode_ctrl() 82 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 86 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 90 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 98 static int lm3560_enable_ctrl(struct lm3560_flash *flash, in lm3560_enable_ctrl() argument 105 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() 108 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() 112 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/i2c/ |
| D | adp1653.c | 38 static int adp1653_update_hw(struct adp1653_flash *flash) in adp1653_update_hw() argument 40 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); in adp1653_update_hw() 46 flash->indicator_intensity->val) in adp1653_update_hw() 49 switch (flash->led_mode->val) { in adp1653_update_hw() 53 /* Flash mode, light on with strobe, duration from timer */ in adp1653_update_hw() 55 config |= TIMEOUT_US_TO_CODE(flash->flash_timeout->val) in adp1653_update_hw() 61 flash->torch_intensity->val) in adp1653_update_hw() 77 static int adp1653_get_fault(struct adp1653_flash *flash) in adp1653_get_fault() argument 79 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); in adp1653_get_fault() 87 flash->fault |= fault; in adp1653_get_fault() [all …]
|
| D | lm3646.c | 4 * General device driver for TI lm3646, Dual FLASH LED Driver 81 static int lm3646_mode_ctrl(struct lm3646_flash *flash, in lm3646_mode_ctrl() argument 86 return regmap_write(flash->regmap, in lm3646_mode_ctrl() 87 REG_ENABLE, flash->mode_reg | MODE_SHDN); in lm3646_mode_ctrl() 89 return regmap_write(flash->regmap, in lm3646_mode_ctrl() 90 REG_ENABLE, flash->mode_reg | MODE_TORCH); in lm3646_mode_ctrl() 92 return regmap_write(flash->regmap, in lm3646_mode_ctrl() 93 REG_ENABLE, flash->mode_reg | MODE_FLASH); in lm3646_mode_ctrl() 101 struct lm3646_flash *flash = to_lm3646_flash(ctrl); in lm3646_get_ctrl() local 108 rval = regmap_read(flash->regmap, REG_FLAG, ®_val); in lm3646_get_ctrl() [all …]
|
| D | lm3560.c | 4 * General device driver for TI lm3559, lm3560, FLASH LED Driver 68 static int lm3560_mode_ctrl(struct lm3560_flash *flash) in lm3560_mode_ctrl() argument 72 switch (flash->led_mode) { in lm3560_mode_ctrl() 74 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 78 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 82 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 90 static int lm3560_enable_ctrl(struct lm3560_flash *flash, in lm3560_enable_ctrl() argument 97 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() 100 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() 104 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() [all …]
|
| /kernel/linux/linux-5.10/Documentation/userspace-api/media/v4l/ |
| D | ext-ctrls-flash.rst | 6 Flash Control Reference 9 The V4L2 flash controls are intended to provide generic access to flash 10 controller devices. Flash controller devices are typically used in 13 The interface can support both LED and xenon flash devices. As of 14 writing this, there is no xenon flash driver using this interface. 23 Unsynchronised LED flash (software strobe) 26 Unsynchronised LED flash is controlled directly by the host as the 27 sensor. The flash must be enabled by the host before the exposure of the 29 for the timing of the flash. 34 Synchronised LED flash (hardware strobe) [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/media/atomisp/i2c/ |
| D | atomisp-lm3554.c | 3 * LED flash driver for LM3554 82 static int lm3554_write(struct lm3554 *flash, u8 addr, u8 val) in lm3554_write() argument 84 struct i2c_client *client = v4l2_get_subdevdata(&flash->sd); in lm3554_write() 96 static int lm3554_read(struct lm3554 *flash, u8 addr) in lm3554_read() argument 98 struct i2c_client *client = v4l2_get_subdevdata(&flash->sd); in lm3554_read() 113 static int lm3554_set_mode(struct lm3554 *flash, unsigned int mode) in lm3554_set_mode() argument 119 (flash->flash_current << LM3554_FLASH_CURRENT_SHIFT); in lm3554_set_mode() 121 ret = lm3554_write(flash, LM3554_FLASH_BRIGHTNESS_REG, val); in lm3554_set_mode() 123 flash->mode = mode; in lm3554_set_mode() 127 static int lm3554_set_torch(struct lm3554 *flash) in lm3554_set_torch() argument [all …]
|
| /kernel/linux/linux-4.19/drivers/mtd/maps/ |
| D | Kconfig | 6 bool "Support non-linear mappings of flash chips" 9 paged mappings of flash chips. 12 tristate "Flash device in physical memory map" 15 This provides a 'mapping' driver which allows the NOR Flash and 18 the physical address and size of the flash chips on your 37 hex "Physical start address of flash mapping" 41 This is the physical memory location at which the flash chips 47 hex "Physical length of flash mapping" 51 This is the total length of the mapping of the flash chips on 54 than the total amount of flash present. Refer to the memory [all …]
|
| /kernel/linux/linux-5.10/Documentation/ABI/testing/ |
| D | sysfs-class-led-flash | 6 Set the brightness of this LED in the flash strobe mode, in 7 microamperes. The file is created only for the flash LED devices 8 that support setting flash brightness. 18 Maximum brightness level for this LED in the flash strobe mode, 26 Hardware timeout for flash, in microseconds. The flash strobe 28 of the strobe. The file is created only for the flash LED 29 devices that support setting flash timeout. 36 Maximum flash timeout for this LED, in microseconds. 43 Flash strobe state. When written with 1 it triggers flash strobe 44 and when written with 0 it turns the flash off. [all …]
|
| /kernel/linux/linux-4.19/Documentation/ABI/testing/ |
| D | sysfs-class-led-flash | 6 Set the brightness of this LED in the flash strobe mode, in 7 microamperes. The file is created only for the flash LED devices 8 that support setting flash brightness. 18 Maximum brightness level for this LED in the flash strobe mode, 26 Hardware timeout for flash, in microseconds. The flash strobe 28 of the strobe. The file is created only for the flash LED 29 devices that support setting flash timeout. 36 Maximum flash timeout for this LED, in microseconds. 43 Flash strobe state. When written with 1 it triggers flash strobe 44 and when written with 0 it turns the flash off. [all …]
|
| /kernel/linux/linux-5.10/drivers/mtd/maps/ |
| D | Kconfig | 7 bool "Support non-linear mappings of flash chips" 10 paged mappings of flash chips. 13 tristate "Flash device in physical memory map" 16 This provides a 'mapping' driver which allows the NOR Flash and 19 the physical address and size of the flash chips on your 38 hex "Physical start address of flash mapping" 42 This is the physical memory location at which the flash chips 48 hex "Physical length of flash mapping" 52 This is the total length of the mapping of the flash chips on 55 than the total amount of flash present. Refer to the memory [all …]
|
| /kernel/linux/linux-5.10/drivers/mtd/devices/ |
| D | sst25l.c | 5 * Driver for SST25L SPI Flash chips 25 #include <linux/spi/flash.h> 67 static int sst25l_status(struct sst25l_flash *flash, int *status) in sst25l_status() argument 83 err = spi_sync(flash->spi, &m); in sst25l_status() 91 static int sst25l_write_enable(struct sst25l_flash *flash, int enable) in sst25l_write_enable() argument 97 err = spi_write(flash->spi, command, 1); in sst25l_write_enable() 102 err = spi_write(flash->spi, command, 1); in sst25l_write_enable() 108 err = spi_write(flash->spi, command, 2); in sst25l_write_enable() 113 err = sst25l_status(flash, &status); in sst25l_write_enable() 123 static int sst25l_wait_till_ready(struct sst25l_flash *flash) in sst25l_wait_till_ready() argument [all …]
|
| D | mchp23k256.c | 16 #include <linux/spi/flash.h> 41 static void mchp23k256_addr2cmd(struct mchp23k256_flash *flash, in mchp23k256_addr2cmd() argument 51 for (i = flash->caps->addr_width; i > 0; i--, addr >>= 8) in mchp23k256_addr2cmd() 55 static int mchp23k256_cmdsz(struct mchp23k256_flash *flash) in mchp23k256_cmdsz() argument 57 return 1 + flash->caps->addr_width; in mchp23k256_cmdsz() 63 struct mchp23k256_flash *flash = to_mchp23k256_flash(mtd); in mchp23k256_write() local 71 cmd_len = mchp23k256_cmdsz(flash); in mchp23k256_write() 74 mchp23k256_addr2cmd(flash, to, command); in mchp23k256_write() 84 mutex_lock(&flash->lock); in mchp23k256_write() 86 ret = spi_sync(flash->spi, &message); in mchp23k256_write() [all …]
|
| /kernel/linux/linux-4.19/drivers/mtd/devices/ |
| D | sst25l.c | 4 * Driver for SST25L SPI Flash chips 29 #include <linux/spi/flash.h> 71 static int sst25l_status(struct sst25l_flash *flash, int *status) in sst25l_status() argument 87 err = spi_sync(flash->spi, &m); in sst25l_status() 95 static int sst25l_write_enable(struct sst25l_flash *flash, int enable) in sst25l_write_enable() argument 101 err = spi_write(flash->spi, command, 1); in sst25l_write_enable() 106 err = spi_write(flash->spi, command, 1); in sst25l_write_enable() 112 err = spi_write(flash->spi, command, 2); in sst25l_write_enable() 117 err = sst25l_status(flash, &status); in sst25l_write_enable() 127 static int sst25l_wait_till_ready(struct sst25l_flash *flash) in sst25l_wait_till_ready() argument [all …]
|
| D | mchp23k256.c | 20 #include <linux/spi/flash.h> 45 static void mchp23k256_addr2cmd(struct mchp23k256_flash *flash, in mchp23k256_addr2cmd() argument 55 for (i = flash->caps->addr_width; i > 0; i--, addr >>= 8) in mchp23k256_addr2cmd() 59 static int mchp23k256_cmdsz(struct mchp23k256_flash *flash) in mchp23k256_cmdsz() argument 61 return 1 + flash->caps->addr_width; in mchp23k256_cmdsz() 67 struct mchp23k256_flash *flash = to_mchp23k256_flash(mtd); in mchp23k256_write() local 75 cmd_len = mchp23k256_cmdsz(flash); in mchp23k256_write() 78 mchp23k256_addr2cmd(flash, to, command); in mchp23k256_write() 88 mutex_lock(&flash->lock); in mchp23k256_write() 90 ret = spi_sync(flash->spi, &message); in mchp23k256_write() [all …]
|
| /kernel/linux/linux-4.19/include/linux/ |
| D | led-class-flash.h | 2 * LED Flash class interface 38 /* set flash brightness */ 41 /* get flash brightness */ 44 /* set flash strobe state */ 46 /* get flash strobe state */ 48 /* set flash timeout */ 50 /* get the flash LED fault */ 55 * Current value of a flash setting along 73 /* flash led specific ops */ 76 /* flash brightness value in microamperes along with its constraints */ [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | led-class-flash.h | 3 * LED Flash class interface 34 /* set flash brightness */ 37 /* get flash brightness */ 40 /* set flash strobe state */ 42 /* get flash strobe state */ 44 /* set flash timeout */ 46 /* get the flash LED fault */ 51 * Current value of a flash setting along 69 /* flash led specific ops */ 72 /* flash brightness value in microamperes along with its constraints */ [all …]
|
| /kernel/linux/linux-4.19/drivers/sbus/char/ |
| D | flash.c | 1 /* flash.c: Allow mmap access to the OBP Flash, for OBP updates. 31 } flash; variable 42 if (flash.read_base == flash.write_base) { in flash_mmap() 43 addr = flash.read_base; in flash_mmap() 44 size = flash.read_size; in flash_mmap() 52 addr = flash.read_base; in flash_mmap() 53 size = flash.read_size; in flash_mmap() 55 addr = flash.write_base; in flash_mmap() 56 size = flash.write_size; in flash_mmap() 89 if (file->f_pos > flash.read_size) in flash_llseek() [all …]
|
| /kernel/linux/linux-5.10/drivers/sbus/char/ |
| D | flash.c | 2 /* flash.c: Allow mmap access to the OBP Flash, for OBP updates. 31 } flash; variable 40 if (flash.read_base == flash.write_base) { in flash_mmap() 41 addr = flash.read_base; in flash_mmap() 42 size = flash.read_size; in flash_mmap() 50 addr = flash.read_base; in flash_mmap() 51 size = flash.read_size; in flash_mmap() 53 addr = flash.write_base; in flash_mmap() 54 size = flash.write_size; in flash_mmap() 87 if (file->f_pos > flash.read_size) in flash_llseek() [all …]
|
| /kernel/linux/linux-5.10/Documentation/leds/ |
| D | leds-class-flash.rst | 2 Flash LED handling under Linux 5 Some LED devices provide two modes - torch and flash. In the LED subsystem 7 and LED Flash class respectively. The torch mode related features are enabled 8 by default and the flash ones only if a driver declares it by setting 11 In order to enable the support for flash LEDs CONFIG_LEDS_CLASS_FLASH symbol 12 must be defined in the kernel config. A LED Flash class driver must be 15 Following sysfs attributes are exposed for controlling flash LED devices: 16 (see Documentation/ABI/testing/sysfs-class-led-flash) 26 V4L2 flash wrapper for flash LEDs 37 flash device, e.g. an I2C device [all …]
|
| /kernel/linux/linux-4.19/Documentation/leds/ |
| D | leds-class-flash.txt | 2 Flash LED handling under Linux 5 Some LED devices provide two modes - torch and flash. In the LED subsystem 7 and LED Flash class respectively. The torch mode related features are enabled 8 by default and the flash ones only if a driver declares it by setting 11 In order to enable the support for flash LEDs CONFIG_LEDS_CLASS_FLASH symbol 12 must be defined in the kernel config. A LED Flash class driver must be 15 Following sysfs attributes are exposed for controlling flash LED devices: 16 (see Documentation/ABI/testing/sysfs-class-led-flash) 25 V4L2 flash wrapper for flash LEDs 34 - dev : flash device, e.g. an I2C device [all …]
|
| /kernel/linux/linux-5.10/include/media/ |
| D | v4l2-flash-led-class.h | 3 * V4L2 flash LED sub-device registration helpers. 21 * struct v4l2_flash_ctrl_data - flash control initialization data, filled 22 * basing on the features declared by the LED flash 25 * @cid: contains v4l2 flash control id if the config 34 * struct v4l2_flash_ops - V4L2 flash operations 36 * @external_strobe_set: Setup strobing the flash by hardware pin state 53 * struct v4l2_flash_config - V4L2 Flash sub-device initialization data 56 * @intensity: non-flash strobe constraints for the LED 57 * @flash_faults: bitmask of flash faults that the LED flash class 60 * <linux/led-class-flash.h> [all …]
|