/Linux-v6.1/drivers/misc/eeprom/ |
D | eeprom_93cx6.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2004 - 2006 rt2x00 SourceForge Project 7 * Abstract: EEPROM reader routines for 93cx6 chipsets. 18 MODULE_DESCRIPTION("EEPROM 93cx6 chip driver"); 21 static inline void eeprom_93cx6_pulse_high(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_high() argument 23 eeprom->reg_data_clock = 1; in eeprom_93cx6_pulse_high() 24 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_high() 34 static inline void eeprom_93cx6_pulse_low(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_low() argument 36 eeprom->reg_data_clock = 0; in eeprom_93cx6_pulse_low() 37 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_low() [all …]
|
D | idt_89hpesx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2016 T-Platforms. All Rights Reserved. 5 * IDT PCIe-switch NTB Linux driver 8 * Serge Semin <fancer.lancer@gmail.com>, <Sergey.Semin@t-platforms.ru> 11 * NOTE of the IDT 89HPESx SMBus-slave interface driver 12 * This driver primarily is developed to have an access to EEPROM device of 13 * IDT PCIe-switches. IDT provides a simple SMBus interface to perform IO- 14 * operations from/to EEPROM, which is located at private (so called Master) 16 * binary sysfs-file in the device directory: 17 * /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom [all …]
|
D | eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> 23 /* Size of EEPROM in bytes */ 26 /* possible types of eeprom devices */ 32 /* Each client has this additional data */ 37 u8 data[EEPROM_SIZE]; /* Register values */ member 44 struct eeprom_data *data = i2c_get_clientdata(client); in eeprom_update_client() local 47 mutex_lock(&data->update_lock); in eeprom_update_client() 49 if (!(data->valid & (1 << slice)) || in eeprom_update_client() 50 time_after(jiffies, data->last_updated[slice] + 300 * HZ)) { in eeprom_update_client() [all …]
|
D | max6875.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * max6875.c - driver for MAX6874/MAX6875 7 * Based on eeprom.c 9 * The MAX6875 has a bank of registers and two banks of EEPROM. 11 * * 0x0000 - 0x0046 = configuration registers 12 * * 0x8000 - 0x8046 = configuration EEPROM 13 * * 0x8100 - 0x82FF = user EEPROM 15 * This driver makes the user EEPROM available for read. 17 * The registers & config EEPROM should be accessed via i2c-dev. 20 * two addresses - 0x50/0x51 and 0x52/0x53. [all …]
|
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 2 menu "EEPROM support" 14 board. Use these generic chip names, instead of vendor-specific 20 Unless you like data loss puzzles, always be sure that any chip 23 as read-only won't help recover from this. Also, if your chip 24 has any software write-protect mechanism you may want to review the 42 after you configure the board init code to know about each eeprom 49 tristate "Old I2C EEPROM reader (DEPRECATED)" 52 If you say yes here you get read-only access to the EEPROM data 60 will be called eeprom. [all …]
|
/Linux-v6.1/drivers/nvmem/ |
D | rave-sp-eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * EEPROM driver for RAVE SP 10 #include <linux/mfd/rave-sp.h> 12 #include <linux/nvmem-provider.h> 18 * enum rave_sp_eeprom_access_type - Supported types of EEPROM access 20 * @RAVE_SP_EEPROM_WRITE: EEPROM write 21 * @RAVE_SP_EEPROM_READ: EEPROM read 29 * enum rave_sp_eeprom_header_size - EEPROM command header sizes 31 * @RAVE_SP_EEPROM_HEADER_SMALL: EEPROM header size for "small" devices (< 8K) 32 * @RAVE_SP_EEPROM_HEADER_BIG: EEPROM header size for "big" devices (> 8K) [all …]
|
/Linux-v6.1/include/linux/ |
D | eeprom_93cx6.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 Copyright (C) 2004 - 2006 rt2x00 SourceForge Project 10 Abstract: EEPROM reader datastructures for 93cx6 chipsets. 15 * EEPROM operation defines. 29 * struct eeprom_93cx6 - control structure for setting the commands 30 * for reading the eeprom data. 31 * @data: private pointer for the driver. 32 * @register_read(struct eeprom_93cx6 *eeprom): handler to 33 * read the eeprom register, this function should set all reg_* fields. 34 * @register_write(struct eeprom_93cx6 *eeprom): handler to [all …]
|
/Linux-v6.1/drivers/net/ethernet/intel/e1000e/ |
D | nvm.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 7 * e1000_raise_eec_clk - Raise EEPROM clock 9 * @eecd: pointer to the EEPROM 11 * Enable/Raise the EEPROM clock bit. 18 udelay(hw->nvm.delay_usec); in e1000_raise_eec_clk() 22 * e1000_lower_eec_clk - Lower EEPROM clock 24 * @eecd: pointer to the EEPROM 26 * Clear/Lower the EEPROM clock bit. 33 udelay(hw->nvm.delay_usec); in e1000_lower_eec_clk() [all …]
|
/Linux-v6.1/drivers/net/wireless/intel/iwlwifi/ |
D | iwl-eeprom-parse.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 * Copyright (C) 2005-2014, 2018-2020 Intel Corporation 9 #include "iwl-drv.h" 10 #include "iwl-modparams.h" 11 #include "iwl-eeprom-parse.h" 14 /* EEPROM offset definitions */ 29 /* corresponding link offsets in EEPROM */ 65 /* SKU Capabilities (actual values from EEPROM definition) */ 74 /* radio config bits (actual values from EEPROM definition) */ 75 #define EEPROM_RF_CFG_TYPE_MSK(x) (x & 0x3) /* bits 0-1 */ [all …]
|
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt7915/ |
D | eeprom.c | 1 // SPDX-License-Identifier: ISC 6 #include "eeprom.h" 10 struct mt76_dev *mdev = &dev->mt76; in mt7915_eeprom_load_precal() 11 u8 *eeprom = mdev->eeprom.data; in mt7915_eeprom_load_precal() local 12 u32 val = eeprom[MT_EE_DO_PRE_CAL]; in mt7915_eeprom_load_precal() 15 if (!dev->flash_mode) in mt7915_eeprom_load_precal() 22 dev->cal = devm_kzalloc(mdev->dev, val, GFP_KERNEL); in mt7915_eeprom_load_precal() 23 if (!dev->cal) in mt7915_eeprom_load_precal() 24 return -ENOMEM; in mt7915_eeprom_load_precal() 26 offs = is_mt7915(&dev->mt76) ? MT_EE_PRECAL : MT_EE_PRECAL_V2; in mt7915_eeprom_load_precal() [all …]
|
/Linux-v6.1/drivers/net/ethernet/intel/igb/ |
D | e1000_nvm.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 11 * igb_raise_eec_clk - Raise EEPROM clock 13 * @eecd: pointer to the EEPROM 15 * Enable/Raise the EEPROM clock bit. 22 udelay(hw->nvm.delay_usec); in igb_raise_eec_clk() 26 * igb_lower_eec_clk - Lower EEPROM clock 28 * @eecd: pointer to the EEPROM 30 * Clear/Lower the EEPROM clock bit. 37 udelay(hw->nvm.delay_usec); in igb_lower_eec_clk() [all …]
|
D | e1000_i210.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 17 * igb_get_hw_semaphore_i210 - Acquire hardware semaphore 25 s32 timeout = hw->nvm.word_size + 1; in igb_get_hw_semaphore_i210() 42 if (hw->dev_spec._82575.clear_semaphore_once) { in igb_get_hw_semaphore_i210() 43 hw->dev_spec._82575.clear_semaphore_once = false; in igb_get_hw_semaphore_i210() 56 hw_dbg("Driver can't access device - SMBI bit is set.\n"); in igb_get_hw_semaphore_i210() 57 return -E1000_ERR_NVM; in igb_get_hw_semaphore_i210() 77 return -E1000_ERR_NVM; in igb_get_hw_semaphore_i210() 84 * igb_acquire_nvm_i210 - Request for access to EEPROM [all …]
|
/Linux-v6.1/drivers/net/ethernet/intel/ixgb/ |
D | ixgb_ee.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2008 Intel Corporation. */ 12 u16 data, 21 * Raises the EEPROM's clock input. 23 * hw - Struct containing variables accessed by shared code 24 * eecd_reg - EECD's current value 30 /* Raise the clock input to the EEPROM (by setting the SK bit), and then in ixgb_raise_clock() 40 * Lowers the EEPROM's clock input. 42 * hw - Struct containing variables accessed by shared code 43 * eecd_reg - EECD's current value [all …]
|
/Linux-v6.1/drivers/net/wireless/mediatek/mt7601u/ |
D | eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-only 13 #include "eeprom.h" 32 mt7601u_efuse_read(struct mt7601u_dev *dev, u16 addr, u8 *data, in mt7601u_efuse_read() argument 47 return -ETIMEDOUT; in mt7601u_efuse_read() 51 /* Parts of eeprom not in the usage map (0x80-0xc0,0xf0) in mt7601u_efuse_read() 52 * will not return valid data but it's ok. in mt7601u_efuse_read() 54 memset(data, 0xff, 16); in mt7601u_efuse_read() 60 put_unaligned_le32(val, data + 4 * i); in mt7601u_efuse_read() 70 u8 data[round_up(MT_EFUSE_USAGE_MAP_SIZE, 16)]; in mt7601u_efuse_physical_size_check() local 76 data + i * 16, MT_EE_PHYSICAL_READ); in mt7601u_efuse_physical_size_check() [all …]
|
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt7603/ |
D | eeprom.c | 1 // SPDX-License-Identifier: ISC 5 #include "eeprom.h" 8 mt7603_efuse_read(struct mt7603_dev *dev, u32 base, u16 addr, u8 *data) in mt7603_efuse_read() argument 21 return -ETIMEDOUT; in mt7603_efuse_read() 28 memset(data, 0xff, 16); in mt7603_efuse_read() 34 put_unaligned_le32(val, data + 4 * i); in mt7603_efuse_read() 51 dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL); in mt7603_efuse_init() 52 dev->mt76.otp.size = len; in mt7603_efuse_init() 53 if (!dev->mt76.otp.data) in mt7603_efuse_init() 54 return -ENOMEM; in mt7603_efuse_init() [all …]
|
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt7615/ |
D | eeprom.c | 1 // SPDX-License-Identifier: ISC 10 #include "eeprom.h" 13 u16 addr, u8 *data) in mt7615_efuse_read() argument 25 return -ETIMEDOUT; in mt7615_efuse_read() 32 memset(data, 0x0, 16); in mt7615_efuse_read() 38 put_unaligned_le32(val, data + 4 * i); in mt7615_efuse_read() 54 dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL); in mt7615_efuse_init() 55 dev->mt76.otp.size = len; in mt7615_efuse_init() 56 if (!dev->mt76.otp.data) in mt7615_efuse_init() 57 return -ENOMEM; in mt7615_efuse_init() [all …]
|
/Linux-v6.1/drivers/net/ethernet/intel/ixgbe/ |
D | ixgbe_common.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 18 static void ixgbe_shift_out_eeprom_bits(struct ixgbe_hw *hw, u16 data, 28 u16 words, u16 *data); 30 u16 words, u16 *data); 41 * ixgbe_device_supports_autoneg_fc - Check if phy supports autoneg flow 55 switch (hw->phy.media_type) { in ixgbe_device_supports_autoneg_fc() 58 switch (hw->device_id) { in ixgbe_device_supports_autoneg_fc() 64 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_device_supports_autoneg_fc() 74 if (hw->device_id == IXGBE_DEV_ID_X550EM_X_XFI) in ixgbe_device_supports_autoneg_fc() [all …]
|
D | ixgbe_x540.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 31 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_get_invariants_X540() 32 struct ixgbe_phy_info *phy = &hw->phy; in ixgbe_get_invariants_X540() 35 phy->ops.set_phy_power = ixgbe_set_copper_phy_power; in ixgbe_get_invariants_X540() 37 mac->mcft_size = IXGBE_X540_MC_TBL_SIZE; in ixgbe_get_invariants_X540() 38 mac->vft_size = IXGBE_X540_VFT_TBL_SIZE; in ixgbe_get_invariants_X540() 39 mac->num_rar_entries = IXGBE_X540_RAR_ENTRIES; in ixgbe_get_invariants_X540() 40 mac->rx_pb_size = IXGBE_X540_RX_PB_SIZE; in ixgbe_get_invariants_X540() 41 mac->max_rx_queues = IXGBE_X540_MAX_RX_QUEUES; in ixgbe_get_invariants_X540() [all …]
|
/Linux-v6.1/drivers/net/usb/ |
D | asix_common.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Copyright (C) 2003-2006 David Hollis <dhollis@davehollis.com> 7 * Copyright (c) 2002-2003 TiVo Inc. 15 u16 size, void *data, int in_pm) in asix_read_cmd() argument 28 value, index, data, size); in asix_read_cmd() 31 ret = ret < 0 ? ret : -ENODATA; in asix_read_cmd() 33 netdev_warn(dev->net, "Failed to read reg index 0x%04x: %d\n", in asix_read_cmd() 41 u16 size, void *data, int in_pm) in asix_write_cmd() argument 54 value, index, data, size); in asix_write_cmd() 57 netdev_warn(dev->net, "Failed to write reg index 0x%04x: %d\n", in asix_write_cmd() [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/eeprom/ |
D | microchip,93lc46b.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/eeprom/microchip,93lc46b.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Microchip 93xx46 SPI compatible EEPROM family dt bindings 10 - Cory Tusar <cory.tusar@pid1solutions.com> 15 - atmel,at93c46 16 - atmel,at93c46d 17 - atmel,at93c56 18 - atmel,at93c66 [all …]
|
/Linux-v6.1/drivers/net/ethernet/intel/igc/ |
D | igc_nvm.c | 1 // SPDX-License-Identifier: GPL-2.0 8 * igc_poll_eerd_eewr_done - Poll for EEPROM read/write completion 10 * @ee_reg: EEPROM flag for polling 12 * Polls the EEPROM status bit for either read or write completion based 17 s32 ret_val = -IGC_ERR_NVM; in igc_poll_eerd_eewr_done() 39 * igc_acquire_nvm - Generic request for access to EEPROM 42 * Set the EEPROM access request bit and wait for EEPROM access grant bit. 44 * EEPROM access and return -IGC_ERR_NVM (-1). 60 timeout--; in igc_acquire_nvm() 67 ret_val = -IGC_ERR_NVM; in igc_acquire_nvm() [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/nvmem/ |
D | zii,rave-sp-eeprom.txt | 1 Zodiac Inflight Innovations RAVE EEPROM Bindings 3 RAVE SP EEPROM device is a "MFD cell" device exposing physical EEPROM 7 Documentation/devicetree/bindings/mfd/zii,rave-sp.txt) 11 - compatible: Should be "zii,rave-sp-eeprom" 15 - zii,eeprom-name: Unique EEPROM identifier describing its function in the 18 Data cells: 20 Data cells are child nodes of eerpom node, bindings for which are 25 rave-sp { 26 compatible = "zii,rave-sp-rdu1"; 27 current-speed = <38400>; [all …]
|
/Linux-v6.1/Documentation/misc-devices/ |
D | max6875.rst | 13 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf 19 ----------- 21 The Maxim MAX6875 is an EEPROM-programmable power-supply sequencer/supervisor. 23 It also provides 512 bytes of user EEPROM. 25 At reset, the MAX6875 reads the configuration EEPROM into its configuration 33 - vin gpi vout 43 ------------- 45 eeprom - 512 bytes of user-defined EEPROM space. 49 --------------- 61 $ echo max6875 0x50 > /sys/bus/i2c/devices/i2c-0/new_device [all …]
|
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt76x2/ |
D | eeprom.c | 1 // SPDX-License-Identifier: ISC 10 #include "eeprom.h" 17 void *src = dev->mt76.eeprom.data + MT_EE_MAC_ADDR; in mt76x2_eeprom_get_macaddr() 19 memcpy(dev->mphy.macaddr, src, ETH_ALEN); in mt76x2_eeprom_get_macaddr() 80 struct device_node *np = dev->mt76.dev->of_node; in mt76x2_apply_cal_free_data() 81 u8 *eeprom = dev->mt76.eeprom.data; in mt76x2_apply_cal_free_data() local 83 eeprom[MT_EE_TX_POWER_0_START_5G], in mt76x2_apply_cal_free_data() 84 eeprom[MT_EE_TX_POWER_0_START_5G + 1], in mt76x2_apply_cal_free_data() 85 eeprom[MT_EE_TX_POWER_1_START_5G], in mt76x2_apply_cal_free_data() 86 eeprom[MT_EE_TX_POWER_1_START_5G + 1] in mt76x2_apply_cal_free_data() [all …]
|
/Linux-v6.1/drivers/media/usb/pvrusb2/ |
D | pvrusb2-eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include "pvrusb2-eeprom.h" 10 #include "pvrusb2-hdw-internal.h" 11 #include "pvrusb2-debug.h" 19 Read and analyze data in the eeprom. Use tveeprom to figure out 21 internally it has a family resemblance to ivtv-type devices 27 /* We seem to only be interested in the last 128 bytes of the EEPROM */ 30 /* Grab EEPROM contents, needed for direct method. */ 34 u8 *eeprom; in pvr2_eeprom_fetch() local 42 eeprom = kzalloc(EEPROM_SIZE, GFP_KERNEL); in pvr2_eeprom_fetch() [all …]
|