/linux/drivers/i2c/ |
H A D | i2c-slave-eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * I2C slave mode EEPROM simulator 5 * Copyright (C) 2014 by Wolfram Sang, Sang Engineering <wsa@sang-engineering.com> 9 * this driver does not support simulating EEPROM types which take more than 15 * The ST-M24C64 sends only 0xff then. Needs verification with other 43 #define I2C_SLAVE_DEVICE_MAGIC(_len, _flags) ((_flags) | ((_len) - 1)) 48 struct eeprom_data *eeprom = i2c_get_clientdata(client); in i2c_slave_eeprom_slave_cb() local 52 if (eeprom->idx_write_cnt < eeprom->num_address_bytes) { in i2c_slave_eeprom_slave_cb() 53 if (eeprom->idx_write_cnt == 0) in i2c_slave_eeprom_slave_cb() 54 eeprom->buffer_idx = 0; in i2c_slave_eeprom_slave_cb() [all …]
|
/linux/drivers/nvmem/ |
H A 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 …]
|
H A D | lpc18xx_eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * NXP LPC18xx/LPC43xx EEPROM memory NVMEM driver 15 #include <linux/nvmem-provider.h> 38 /* EEPROM device requires a ~1500 kHz clock (min 800 kHz, max 1600 kHz) */ 41 /* EEPROM requires 3 ms of erase/program time between each writing */ 54 static inline void lpc18xx_eeprom_writel(struct lpc18xx_eeprom_dev *eeprom, in lpc18xx_eeprom_writel() argument 57 writel(val, eeprom->reg_base + reg); in lpc18xx_eeprom_writel() 60 static inline u32 lpc18xx_eeprom_readl(struct lpc18xx_eeprom_dev *eeprom, in lpc18xx_eeprom_readl() argument 63 return readl(eeprom->reg_base + reg); in lpc18xx_eeprom_readl() 66 static int lpc18xx_eeprom_busywait_until_prog(struct lpc18xx_eeprom_dev *eeprom) in lpc18xx_eeprom_busywait_until_prog() argument [all …]
|
/linux/drivers/comedi/drivers/ |
H A D | cb_pcidda.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * Driver for the ComputerBoards / MeasurementComputing PCI-DDA series. 9 * COMEDI - Linux Control and Measurement Device Interface 10 * Copyright (C) 1997-8 David A. Schleef <ds@schleef.org> 15 * Description: MeasurementComputing PCI-DDA series 16 * Devices: [Measurement Computing] PCI-DDA08/12 (pci-dda08/12), 17 * PCI-DDA04/12 (pci-dda04/12), PCI-DDA02/12 (pci-dda02/12), 18 * PCI-DDA08/16 (pci-dda08/16), PCI-DDA04/16 (pci-dda04/16), 19 * PCI-DDA02/16 (pci-dda02/16) 33 #define EEPROM_SIZE 128 /* number of entries in eeprom */ [all …]
|
/linux/drivers/net/ethernet/dec/tulip/ |
H A D | eeprom.c | 2 drivers/net/ethernet/dec/tulip/eeprom.c 5 Written/copyright 1994-2001 by Donald Becker. 20 /* Serial EEPROM section. */ 27 /* Known cards that have old-style EEPROMs. */ 33 0x0004, 0x009E, /* 10baseT-FD */ 35 0x0905, 0x006D, /* 100baseTx-FD */ }}, 38 0x0108, 0x8021, /* 100baseFx-FD */ 40 0x0104, 0x009E, /* 10baseT-FD */ 42 0x0105, 0x006D, /* 100baseTx-FD */ }}, 43 {"Maxtech NX-110", 0, 0, 0xE8, { 0x1e00, 0x0000, 0x0800, 0x0513, [all …]
|
/linux/drivers/gpu/drm/panel/ |
H A D | panel-olimex-lcd-olinuxino.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * LCD-OLinuXino support for panel driver 42 char name[32]; member 70 struct lcd_olinuxino_eeprom eeprom; member 82 gpiod_set_value_cansleep(lcd->enable_gpio, 0); in lcd_olinuxino_unprepare() 83 regulator_disable(lcd->supply); in lcd_olinuxino_unprepare() 93 ret = regulator_enable(lcd->supply); in lcd_olinuxino_prepare() 97 gpiod_set_value_cansleep(lcd->enable_gpio, 1); in lcd_olinuxino_prepare() 106 struct lcd_olinuxino_info *lcd_info = &lcd->eeprom.info; in lcd_olinuxino_get_modes() 111 for (i = 0; i < lcd->eeprom.num_modes; i++) { in lcd_olinuxino_get_modes() [all …]
|
/linux/sound/pci/ice1712/ |
H A D | ice1724.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 48 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 86 /* check whether the clock mode is spdif-in */ 97 return (!ice->is_spdif_master(ice)) && PRO_RATE_LOCKED; in is_pro_rate_locked() 116 dev_dbg(ice->card->dev, "snd_vt1724_ac97_ready: timeout\n"); in snd_vt1724_ac97_ready() 126 dev_dbg(ice->card->dev, "snd_vt1724_ac97_wait_bit: timeout\n"); in snd_vt1724_ac97_wait_bit() 127 return -EIO; in snd_vt1724_ac97_wait_bit() 134 struct snd_ice1712 *ice = ac97->private_data; in snd_vt1724_ac97_write() 139 old_cmd |= ac97->num; in snd_vt1724_ac97_write() 148 struct snd_ice1712 *ice = ac97->private_data; in snd_vt1724_ac97_read() [all …]
|
H A D | ice1712.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 - spdif nonaudio consumer mode does not work (at least with my 11 Sony STR-DB830) 18 * split the code to several files. each low-level routine 25 * I also haven't done anything with the internal S/PDIF transmitter or the MPU-401 40 #include <linux/dma-mapping.h> 64 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 69 static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transcei… 79 MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support."); 106 /* check whether the clock mode is spdif-in */ [all …]
|
H A D | delta.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Lowlevel functions for M-Audio Delta 1010, 1010E, 44, 66, 66E, Dio2496, 37 for (idx = 7; idx >= 0; idx--) { in ap_cs8427_write_byte() 55 for (idx = 7; idx >= 0; idx--) { in ap_cs8427_read_byte() 73 switch (ice->eeprom.subvendor) { in ap_cs8427_codec_select() 102 switch (ice->eeprom.subvendor) { in ap_cs8427_codec_deassert() 125 struct snd_ice1712 *ice = device->bus->private_data; in ap_cs8427_sendbytes() 129 mutex_lock(&ice->gpio_mutex); in ap_cs8427_sendbytes() 131 ap_cs8427_write_byte(ice, (device->addr << 1) | 0, tmp); /* address + write mode */ in ap_cs8427_sendbytes() 132 while (count-- > 0) in ap_cs8427_sendbytes() [all …]
|
/linux/drivers/media/pci/saa7164/ |
H A D | saa7164-cards.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2010-2015 Steven Toth <stoth@kernellabs.com> 17 * and keep the -i2c.c implementation clean. 27 .name = "Unknown", 32 .name = "Generic Rev2", 38 .name = "Generic Rev3", 42 .name = "Hauppauge WinTV-HVR2200", 53 .name = "4K EEPROM", 60 .name = "TDA18271-1", 67 .name = "TDA18271-2", [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: ISC 3 * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name> 9 #include <linux/nvmem-consumer.h> 15 struct device_node *np = dev->dev->of_node; in mt76_get_of_eeprom_data() 19 data = of_get_property(np, "mediatek,eeprom-data", &size); in mt76_get_of_eeprom_data() 21 return -ENOENT; in mt76_get_of_eeprom_data() 24 return -EINVAL; in mt76_get_of_eeprom_data() 34 struct device_node *np = dev->dev->of_node; in mt76_get_of_data_from_mtd() 43 list = of_get_property(np, "mediatek,mtd-eeprom", &size); in mt76_get_of_data_from_mtd() 45 return -ENOENT; in mt76_get_of_data_from_mtd() [all …]
|
/linux/drivers/misc/eeprom/ |
H A 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 …]
|
H A 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 …]
|
/linux/drivers/net/wireless/ralink/rt2x00/ |
H A D | rt2800pci.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 Copyright (C) 2009 - 2010 Ivo van Doorn <IvDoorn@gmail.com> 79 static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) in rt2800pci_eepromregister_read() argument 81 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2800pci_eepromregister_read() 86 eeprom->reg_data_in = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_IN); in rt2800pci_eepromregister_read() 87 eeprom->reg_data_out = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_OUT); in rt2800pci_eepromregister_read() 88 eeprom->reg_data_clock = in rt2800pci_eepromregister_read() 90 eeprom->reg_chip_select = in rt2800pci_eepromregister_read() 94 static void rt2800pci_eepromregister_write(struct eeprom_93cx6 *eeprom) in rt2800pci_eepromregister_write() argument 96 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2800pci_eepromregister_write() [all …]
|
H A D | rt2x00soc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com> 4 Copyright (C) 2004 - 2009 Felix Fietkau <nbd@openwrt.org> 25 kfree(rt2x00dev->rf); in rt2x00soc_free_reg() 26 rt2x00dev->rf = NULL; in rt2x00soc_free_reg() 28 kfree(rt2x00dev->eeprom); in rt2x00soc_free_reg() 29 rt2x00dev->eeprom = NULL; in rt2x00soc_free_reg() 31 iounmap(rt2x00dev->csr.base); in rt2x00soc_free_reg() 36 struct platform_device *pdev = to_platform_device(rt2x00dev->dev); in rt2x00soc_alloc_reg() 41 return -ENODEV; in rt2x00soc_alloc_reg() [all …]
|
/linux/drivers/mtd/maps/ |
H A D | pismo.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * PISMO memory driver - http://www.pismoworld.org/ 15 #include <linux/mtd/plat-ram.h> 52 struct i2c_client *client = to_i2c_client(pdev->dev.parent); in pismo_set_vpp() 55 pismo->vpp(pismo->vpp_data, on); in pismo_set_vpp() 72 .addr = client->addr, in pismo_eeprom_read() 76 .addr = client->addr, in pismo_eeprom_read() 83 ret = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)); in pismo_eeprom_read() 85 return ret == ARRAY_SIZE(msg) ? size : -EIO; in pismo_eeprom_read() 89 struct pismo_mem *region, const char *name, in pismo_add_device() argument [all …]
|
/linux/arch/arm/boot/dts/nxp/imx/ |
H A D | imx51-zii-rdu1.dts | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 6 /dts-v1/; 8 #include <dt-bindings/sound/fsl-imx-audmux.h> 12 compatible = "zii,imx51-rdu1", "fsl,imx51"; 15 stdout-path = &uart1; 25 mdio-gpio0 = &mdio_gpio; 30 compatible = "fixed-clock"; 31 #clock-cells = <0>; 32 clock-frequency = <26000000>; 36 compatible = "gpio-gate-clock"; [all …]
|
/linux/Documentation/networking/devlink/ |
H A D | iosm.rst | 1 .. SPDX-License-Identifier: GPL-2.0 13 The ``iosm`` driver implements the following driver-specific parameters. 15 .. list-table:: Driver-specific parameters implemented 18 * - Name 19 - Type 20 - Mode 21 - Description 22 * - ``erase_full_flash`` 23 - u8 24 - runtime [all …]
|
/linux/arch/arm64/boot/dts/freescale/ |
H A D | imx8mq-zii-ultra.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 10 mdio-gpio0 = &mdio0; 15 stdout-path = &uart1; 19 compatible = "virtual,mdio-gpio"; 20 pinctrl-names = "default"; 21 pinctrl-0 = <&pinctrl_mdio_bitbang>, <&pinctrl_fec1_phy_reset>; 24 #address-cells = <1>; 25 #size-cells = <0>; 27 phy0: ethernet-phy@0 { 29 reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; [all …]
|
/linux/drivers/media/usb/au0828/ |
H A D | au0828-cards.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include "au0828-cards.h" 12 #include "media/v4l2-common.h" 16 /* Because the HVR-950q shares an i2s bus between the cs5340 and the in hvr950q_cs5340_audio() 26 * WARNING: There's a quirks table at sound/usb/quirks-table.h 32 .name = "Unknown board", 33 .tuner_type = -1U, 37 .name = "Hauppauge HVR850", 64 .name = "Hauppauge HVR950Q", 91 .name = "Hauppauge HVR950Q rev xxF8", [all …]
|
/linux/Documentation/i2c/ |
H A D | slave-eeprom-backend.rst | 2 Linux I2C slave EEPROM backend 5 by Wolfram Sang <wsa@sang-engineering.com> in 2014-20 7 This backend simulates an EEPROM on the connected I2C bus. Its memory contents 10 /sys/bus/i2c/devices/<device-directory>/slave-eeprom 12 The following types are available: 24c02, 24c32, 24c64, and 24c512. Read-only 13 variants are also supported. The name needed for instantiating has the form 14 'slave-<type>[ro]'. Examples follow: 17 # echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-1/new_device 19 24c512, read-only, address 0x42: 20 # echo slave-24c512ro 0x1042 > /sys/bus/i2c/devices/i2c-1/new_device [all …]
|
/linux/drivers/net/can/sja1000/ |
H A D | peak_pcmcia.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2010-2012 Stephane Grosjean <s.grosjean@peak-system.com> 5 * CAN driver for PEAK-System PCAN-PC Card 7 * Copyright (C) 2006-2010 PEAK System-Technik GmbH 22 MODULE_AUTHOR("Stephane Grosjean <s.grosjean@peak-system.com>"); 23 MODULE_DESCRIPTION("CAN driver for PEAK-System PCAN-PC Cards"); 26 /* PEAK-System PCMCIA driver name */ 99 /* EEPROM chip instruction set */ 100 /* note: EEPROM Read/Write instructions include A8 bit */ 103 #define PCC_EEP_WRDI 0x04 /* EEPROM Write Disable */ [all …]
|
/linux/arch/arm/boot/dts/nxp/vf/ |
H A D | vf610-zii-spb4.dts | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 6 * SPB - Seat Power Box 11 /dts-v1/; 19 stdout-path = &uart0; 27 gpio-leds { 28 compatible = "gpio-leds"; 29 pinctrl-0 = <&pinctrl_leds_debug>; 30 pinctrl-names = "default"; 32 led-debug { 35 linux,default-trigger = "heartbeat"; [all …]
|
H A D | vf610-zii-ssmb-spu3.dts | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 6 * SSMB - SPU3 Switch Management Board 7 * SPU - Seat Power Unit 11 * Based on an original 'vf610-twr.dts' which is Copyright 2015, 15 /dts-v1/; 23 stdout-path = &uart0; 31 gpio-leds { 32 compatible = "gpio-leds"; 33 pinctrl-0 = <&pinctrl_leds_debug>; 34 pinctrl-names = "default"; [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/mt7615/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: ISC 5 * Felix Fietkau <nbd@nbd.name> 10 #include "eeprom.h" 25 return -ETIMEDOUT; in mt7615_efuse_read() 50 if (is_mt7663(&dev->mt76)) in mt7615_efuse_init() 57 dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL); in mt7615_efuse_init() 58 dev->mt76.otp.size = len; in mt7615_efuse_init() 59 if (!dev->mt76.otp.data) in mt7615_efuse_init() 60 return -ENOMEM; in mt7615_efuse_init() 62 buf = dev->mt76.otp.data; in mt7615_efuse_init() [all …]
|