| /OK3568_Linux_fs/u-boot/drivers/mtd/spi/ |
| H A D | spi_flash.c | 34 static int read_sr(struct spi_flash *flash, u8 *rs) in read_sr() argument 40 ret = spi_flash_read_common(flash, &cmd, 1, rs, 1); in read_sr() 49 static int read_fsr(struct spi_flash *flash, u8 *fsr) in read_fsr() argument 54 ret = spi_flash_read_common(flash, &cmd, 1, fsr, 1); in read_fsr() 63 static int write_sr(struct spi_flash *flash, u8 ws) in write_sr() argument 69 ret = spi_flash_write_common(flash, &cmd, 1, &ws, 1); in write_sr() 79 static int read_cr(struct spi_flash *flash, u8 *rc) in read_cr() argument 85 ret = spi_flash_read_common(flash, &cmd, 1, rc, 1); in read_cr() 94 static int write_cr(struct spi_flash *flash, u8 wc) in write_cr() argument 100 ret = read_sr(flash, &data[0]); in write_cr() [all …]
|
| H A D | sf_probe.c | 27 static int spi_flash_probe_slave(struct spi_flash *flash) in spi_flash_probe_slave() argument 29 struct spi_slave *spi = flash->spi; in spi_flash_probe_slave() 46 flash->mtd.name = (char *)ofnode_read_string(spi->dev->node, "label"); in spi_flash_probe_slave() 49 ret = spi_nor_scan(flash); in spi_flash_probe_slave() 54 ret = spi_flash_mtd_register(flash); in spi_flash_probe_slave() 67 struct spi_flash *flash; in spi_flash_probe() local 74 flash = calloc(1, sizeof(*flash)); in spi_flash_probe() 75 if (!flash) { in spi_flash_probe() 80 flash->spi = bus; in spi_flash_probe() 81 if (spi_flash_probe_slave(flash)) { in spi_flash_probe() [all …]
|
| H A D | Kconfig | 4 bool "Enable Driver Model for SPI flash" 7 Enable driver model for SPI flash. This SPI flash interface 9 implemented by the SPI flash uclass. There is one standard 10 SPI flash driver which knows how to probe most chips 14 during the transition parent. SPI and SPI flash must be 19 bool "Support sandbox SPI flash device" 25 device. Typically the contents of the emulated SPI flash device is 32 Enable the SPI flash Core support. This will include basic 45 flash is present on the system. 54 flash is present on the system. [all …]
|
| H A D | fsl_espi_spl.c | 17 struct spi_flash *flash; in fsl_spi_spl_load_image() local 19 flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, in fsl_spi_spl_load_image() 21 if (flash == NULL) { in fsl_spi_spl_load_image() 26 spi_flash_read(flash, offs, size, vdst); in fsl_spi_spl_load_image() 41 struct spi_flash *flash; in fsl_spi_boot() local 43 flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, in fsl_spi_boot() 45 if (flash == NULL) { in fsl_spi_boot() 57 buf = malloc(flash->page_size); in fsl_spi_boot() 62 memset(buf, 0, flash->page_size); in fsl_spi_boot() 64 spi_flash_read(flash, CONFIG_CFG_DATA_SECTOR, in fsl_spi_boot() [all …]
|
| H A D | sf_mtd.c | 19 struct spi_flash *flash = mtd->priv; in spi_flash_mtd_erase() local 22 if (!flash) in spi_flash_mtd_erase() 27 err = spi_flash_erase(flash, instr->addr, instr->len); in spi_flash_mtd_erase() 43 struct spi_flash *flash = mtd->priv; in spi_flash_mtd_read() local 46 if (!flash) in spi_flash_mtd_read() 49 err = spi_flash_read(flash, from, len, buf); in spi_flash_mtd_read() 59 struct spi_flash *flash = mtd->priv; in spi_flash_mtd_write() local 62 if (!flash) in spi_flash_mtd_write() 65 err = spi_flash_write(flash, to, len, buf); in spi_flash_mtd_write() 85 int spi_flash_mtd_register(struct spi_flash *flash) in spi_flash_mtd_register() argument [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/i2c/ |
| H A 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() 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() 89 if (!flash->fault) in adp1653_get_fault() [all …]
|
| H A D | aw36518.c | 136 static int aw36518_i2c_write(struct aw36518_flash *flash, u8 reg, u8 val) in aw36518_i2c_write() argument 138 struct i2c_client *client = flash->client; in aw36518_i2c_write() 147 v4l2_dbg(2, debug, &flash->leds[0].sd, in aw36518_i2c_write() 154 static int aw36518_i2c_read(struct aw36518_flash *flash, u8 reg) in aw36518_i2c_read() argument 156 struct i2c_client *client = flash->client; in aw36518_i2c_read() 170 static int aw36518_led_on(struct aw36518_flash *flash, bool on) in aw36518_led_on() argument 173 struct i2c_client *client = flash->client; in aw36518_led_on() 177 v4l2_dbg(1, debug, &flash->leds[0].sd, in aw36518_led_on() 180 temp = aw36518_i2c_read(flash, AW36518_REG_ENABLE); in aw36518_led_on() 186 if (flash->led_mode == V4L2_FLASH_LED_MODE_FLASH && on) in aw36518_led_on() [all …]
|
| H A D | lm3560.c | 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() 107 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() [all …]
|
| H A D | sgm3784.c | 93 static int sgm3784_i2c_write(struct sgm3784_flash *flash, u8 reg, u8 val) in sgm3784_i2c_write() argument 95 struct i2c_client *client = flash->client; in sgm3784_i2c_write() 104 v4l2_dbg(2, debug, &flash->leds[0].sd, in sgm3784_i2c_write() 111 static int sgm3784_i2c_read(struct sgm3784_flash *flash, u8 reg) in sgm3784_i2c_read() argument 113 struct i2c_client *client = flash->client; in sgm3784_i2c_read() 122 v4l2_dbg(2, debug, &flash->leds[0].sd, in sgm3784_i2c_read() 128 static int sgm3784_led_on(struct sgm3784_flash *flash, bool on) in sgm3784_led_on() argument 133 v4l2_dbg(1, debug, &flash->leds[0].sd, in sgm3784_led_on() 137 ret = sgm3784_i2c_write(flash, SGM3784_REG_ENABLE, val); in sgm3784_led_on() 138 flash->leds[0].timestamp = ns_to_kernel_old_timeval(ktime_get_ns()); in sgm3784_led_on() [all …]
|
| H A D | lm3646.c | 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() 135 struct lm3646_flash *flash = to_lm3646_flash(ctrl); in lm3646_set_ctrl() local [all …]
|
| /OK3568_Linux_fs/kernel/drivers/leds/ |
| H A D | leds-as3645a.c | 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() 197 static int as3645a_set_current(struct as3645a *flash) in as3645a_set_current() argument 201 val = (flash->flash_current << AS_CURRENT_FLASH_CURRENT_SHIFT) in as3645a_set_current() 202 | (flash->assist_current << AS_CURRENT_ASSIST_LIGHT_SHIFT) in as3645a_set_current() 205 return as3645a_write(flash, AS_CURRENT_SET_REG, val); in as3645a_set_current() 208 static int as3645a_set_timeout(struct as3645a *flash) in as3645a_set_timeout() argument 212 val = flash->timeout << AS_INDICATOR_AND_TIMER_TIMEOUT_SHIFT; in as3645a_set_timeout() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/staging/media/atomisp/i2c/ |
| H A D | atomisp-lm3554.c | 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 131 val = (flash->mode << LM3554_TORCH_MODE_SHIFT) | in lm3554_set_torch() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/devices/ |
| H A D | sst25l.c | 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 130 err = sst25l_status(flash, &status); in sst25l_wait_till_ready() 142 static int sst25l_erase_sector(struct sst25l_flash *flash, uint32_t offset) in sst25l_erase_sector() argument [all …]
|
| H A D | mchp23k256.c | 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() 88 mutex_unlock(&flash->lock); in mchp23k256_write() [all …]
|
| H A D | spear_smi.c | 178 struct spear_snor_flash *flash[MAX_NUM_FLASH_CHIP]; member 420 get_sector_erase_cmd(struct spear_snor_flash *flash, u32 offset) in get_sector_erase_cmd() argument 425 x[0] = flash->erase_cmd; in get_sector_erase_cmd() 496 struct spear_snor_flash *flash = get_flash_data(mtd); in spear_mtd_erase() local 501 if (!flash || !dev) in spear_mtd_erase() 504 bank = flash->bank; in spear_mtd_erase() 513 mutex_lock(&flash->lock); in spear_mtd_erase() 517 command = get_sector_erase_cmd(flash, addr); in spear_mtd_erase() 521 mutex_unlock(&flash->lock); in spear_mtd_erase() 528 mutex_unlock(&flash->lock); in spear_mtd_erase() [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/nand/spi/ |
| H A D | Kconfig | 13 bool "GIGADEVICE SPI flash support" 16 Add support for various GIGADEVICE SPI Nand flash chips 19 bool "MACRONIX SPI flash support" 22 Add support for various MACRONIX SPI Nand flash chips 25 bool "MICRON SPI flash support" 28 Add support for various MICRON SPI Nand flash chips 31 bool "TOSHIBA SPI flash support" 34 Add support for various TOSHIBA SPI Nand flash chips 37 bool "WINBOND SPI flash support" 40 Add support for various WINBOND SPI Nand flash chips [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/userspace-api/media/v4l/ |
| H A D | ext-ctrls-flash.rst | 9 The V4L2 flash controls are intended to provide generic access to flash 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) 37 The synchronised LED flash is pre-programmed by the host (power and 39 sensor to the flash. [all …]
|
| /OK3568_Linux_fs/kernel/drivers/sbus/char/ |
| H A D | flash.c | 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() 88 file->f_pos = flash.read_size; in flash_llseek() [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/ABI/testing/ |
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/cmd/ |
| H A D | sf.c | 22 static struct spi_flash *flash; variable 56 if (round_up_len && flash->sector_size > 0) in sf_parse_len_arg() 57 *len = ROUND(len_arg, flash->sector_size); in sf_parse_len_arg() 128 flash = NULL; in do_spi_flash_probe() 136 flash = dev_get_uclass_priv(new); in do_spi_flash_probe() 138 if (flash) in do_spi_flash_probe() 139 spi_flash_free(flash); in do_spi_flash_probe() 142 flash = new; in do_spi_flash_probe() 149 flash = new; in do_spi_flash_probe() 169 static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset, in spi_flash_update_block() argument [all …]
|
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | spi_flash.h | 114 void spi_flash_free(struct spi_flash *flash); 116 static inline int spi_flash_read(struct spi_flash *flash, u32 offset, in spi_flash_read() argument 119 return spi_flash_read_dm(flash->dev, offset, len, buf); in spi_flash_read() 122 static inline int spi_flash_write(struct spi_flash *flash, u32 offset, in spi_flash_write() argument 125 return spi_flash_write_dm(flash->dev, offset, len, buf); in spi_flash_write() 128 static inline int spi_flash_erase(struct spi_flash *flash, u32 offset, in spi_flash_erase() argument 131 return spi_flash_erase_dm(flash->dev, offset, len); in spi_flash_erase() 145 void spi_flash_free(struct spi_flash *flash); 147 static inline int spi_flash_read(struct spi_flash *flash, u32 offset, in spi_flash_read() argument 150 struct mtd_info *mtd = &flash->mtd; in spi_flash_read() [all …]
|
| /OK3568_Linux_fs/u-boot/board/imgtec/malta/ |
| H A D | flash-malta-boot.tcl | 16 flash device sharp_16x32_be; 19 flash device sharp_16x32; 22 flash clear all; 23 flash set 0xBE000000..0xBE0FFFFF 24 flash erase sector 0xbe000000; 25 flash erase sector 0xbe020000; 26 flash erase sector 0xbe040000; 27 flash erase sector 0xbe060000; 28 flash erase sector 0xbe080000; 29 flash erase sector 0xbe0a0000; [all …]
|
| /OK3568_Linux_fs/u-boot/doc/ |
| H A D | README.at91 | 23 - Nand flash. 26 make at91sam9260ek_nandflash_config - use nand flash 27 make at91sam9260ek_dataflash_cs0_config - use data flash (spi cs0) 28 make at91sam9260ek_dataflash_cs1_config - use data flash (spi cs1) 45 - Nand flash. 48 make at91sam9261ek_nandflash_config - use nand flash 49 make at91sam9261ek_dataflash_cs0_config - use data flash (spi cs0) 50 make at91sam9261ek_dataflash_cs3_config - use data flash (spi cs3) 65 - Nand flash. 66 - Nor flash (not populate by default) [all …]
|
| /OK3568_Linux_fs/u-boot/common/spl/ |
| H A D | spl_spi.c | 26 struct spi_flash *flash, in spi_load_image_os() argument 32 spi_flash_read(flash, CONFIG_SYS_SPI_KERNEL_OFFS, 0x40, in spi_load_image_os() 42 spi_flash_read(flash, CONFIG_SYS_SPI_KERNEL_OFFS, in spi_load_image_os() 46 spi_flash_read(flash, CONFIG_SYS_SPI_ARGS_OFFS, in spi_load_image_os() 57 struct spi_flash *flash = load->dev; in spl_spi_fit_read() local 60 ret = spi_flash_read(flash, sector, count, buf); in spl_spi_fit_read() 76 struct spi_flash *flash; local 85 flash = spi_flash_probe(CONFIG_SF_DEFAULT_BUS, 89 if (!flash) { 104 if (spl_start_uboot() || spi_load_image_os(spl_image, flash, header)) [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/leds/ |
| H A D | leds-class-flash.rst | 5 Some LED devices provide two modes - torch and flash. In the LED subsystem 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 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 41 LED flash class device to wrap 43 LED flash class device representing indicator LED associated with 49 defines the source of the flash LED strobe - [all …]
|