/openbmc/u-boot/drivers/usb/gadget/ |
H A D | fotg210.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Dante Su <dantesu@faraday-tech.com> 34 uint id; member 38 struct fotg210_chip *chip; member 66 static inline int fifo_to_ep(struct fotg210_chip *chip, int id, int in) in fifo_to_ep() argument 68 return (id < 0) ? 0 : ((id & 0x03) + 1); in fifo_to_ep() 71 static inline int ep_to_fifo(struct fotg210_chip *chip, int id) in ep_to_fifo() argument 73 return (id <= 0) ? -1 : ((id - 1) & 0x03); in ep_to_fifo() 76 static inline int ep_reset(struct fotg210_chip *chip, uint8_t ep_addr) in ep_reset() argument 79 struct fotg210_regs *regs = chip->regs; in ep_reset() [all …]
|
/openbmc/linux/arch/mips/ath79/ |
H A D | setup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com> 6 * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> 29 #include <asm/mach-ath79/ath79.h> 30 #include <asm/mach-ath79/ar71xx_regs.h> 45 char *chip = "????"; in ath79_detect_sys_type() local 46 u32 id; in ath79_detect_sys_type() local 52 id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID); in ath79_detect_sys_type() 53 major = id & REV_ID_MAJOR_MASK; in ath79_detect_sys_type() 57 minor = id & AR71XX_REV_ID_MINOR_MASK; in ath79_detect_sys_type() [all …]
|
/openbmc/linux/sound/pci/oxygen/ |
H A D | oxygen_lib.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * C-Media CMI8788 driver - main driver module 24 MODULE_DESCRIPTION("C-Media CMI8788 helper library"); 29 static inline int oxygen_uart_input_ready(struct oxygen *chip) in oxygen_uart_input_ready() argument 31 return !(oxygen_read8(chip, OXYGEN_MPU401 + 1) & MPU401_RX_EMPTY); in oxygen_uart_input_ready() 34 static void oxygen_read_uart(struct oxygen *chip) in oxygen_read_uart() argument 36 if (unlikely(!oxygen_uart_input_ready(chip))) { in oxygen_read_uart() 38 oxygen_read8(chip, OXYGEN_MPU401); in oxygen_read_uart() 42 u8 data = oxygen_read8(chip, OXYGEN_MPU401); in oxygen_read_uart() 45 if (chip->uart_input_count >= ARRAY_SIZE(chip->uart_input)) in oxygen_read_uart() [all …]
|
H A D | oxygen.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * C-Media CMI8788 driver for C-Media's reference design and similar models 11 * SPI 0 -> 1st AK4396 (front) 12 * SPI 1 -> 2nd AK4396 (surround) 13 * SPI 2 -> 3rd AK4396 (center/LFE) 14 * SPI 3 -> WM8785 15 * SPI 4 -> 4th AK4396 (back) 17 * GPIO 0 -> DFS0 of AK5385 18 * GPIO 1 -> DFS1 of AK5385 20 * X-Meridian models: [all …]
|
/openbmc/linux/sound/usb/ |
H A D | card.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 * - the linked URBs would be preferred but not used so far because of 17 * - type II is not supported properly. there is no device which supports 33 #include <linux/usb/audio-v2.h> 34 #include <linux/usb/audio-v3.h> 63 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 64 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ variable 67 static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; 68 static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; 83 module_param_array(id, charp, NULL, 0444); [all …]
|
H A D | clock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 #include <linux/usb/audio-v2.h> 12 #include <linux/usb/audio-v3.h> 42 ((p)->v3.bLength >= sizeof((p)->v3)) : \ 43 ((p)->v2.bLength >= sizeof((p)->v2))) 46 ((proto) == UAC_VERSION_3 ? (p)->v3.field : (p)->v2.field) 48 static void *find_uac_clock_desc(struct usb_host_interface *iface, int id, in find_uac_clock_desc() argument 54 while ((cs = snd_usb_find_csint_desc(iface->extra, iface->extralen, in find_uac_clock_desc() 56 if (validator(cs, id, proto)) in find_uac_clock_desc() 63 static bool validate_clock_source(void *p, int id, int proto) in validate_clock_source() argument [all …]
|
/openbmc/linux/drivers/mtd/nand/raw/ |
H A D | nand_hynix.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Author: Boris Brezillon <boris.brezillon@free-electrons.com> 20 * struct hynix_read_retry - read-retry data 21 * @nregs: number of register to set when applying a new read-retry mode 22 * @regs: register offsets (NAND chip dependent) 33 * struct hynix_nand - private Hynix NAND struct 35 * @read_retry: read-retry information 42 * struct hynix_read_retry_otp - structure describing how the read-retry OTP 49 * chip 50 * @size: size of the read-retry OTP section [all …]
|
H A D | nand_samsung.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Author: Boris Brezillon <boris.brezillon@free-electrons.com> 11 static void samsung_nand_decode_id(struct nand_chip *chip) in samsung_nand_decode_id() argument 13 struct nand_device *base = &chip->base; in samsung_nand_decode_id() 15 struct mtd_info *mtd = nand_to_mtd(chip); in samsung_nand_decode_id() 18 memorg = nanddev_get_memorg(&chip->base); in samsung_nand_decode_id() 20 /* New Samsung (6 byte ID): Samsung K9GAG08U0F (p.44) */ in samsung_nand_decode_id() 21 if (chip->id.len == 6 && !nand_is_slc(chip) && in samsung_nand_decode_id() 22 chip->id.data[5] != 0x00) { in samsung_nand_decode_id() 23 u8 extid = chip->id.data[3]; in samsung_nand_decode_id() [all …]
|
H A D | nand_toshiba.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Author: Boris Brezillon <boris.brezillon@free-electrons.com> 29 static int toshiba_nand_benand_read_eccstatus_op(struct nand_chip *chip, in toshiba_nand_benand_read_eccstatus_op() argument 34 if (nand_has_exec_op(chip)) { in toshiba_nand_benand_read_eccstatus_op() 36 nand_get_sdr_timings(nand_get_interface_config(chip)); in toshiba_nand_benand_read_eccstatus_op() 39 PSEC_TO_NSEC(sdr->tADL_min)), in toshiba_nand_benand_read_eccstatus_op() 40 NAND_OP_8BIT_DATA_IN(chip->ecc.steps, ecc_status, 0), in toshiba_nand_benand_read_eccstatus_op() 42 struct nand_operation op = NAND_OPERATION(chip->cur_cs, instrs); in toshiba_nand_benand_read_eccstatus_op() 44 return nand_exec_op(chip, &op); in toshiba_nand_benand_read_eccstatus_op() 47 return -ENOTSUPP; in toshiba_nand_benand_read_eccstatus_op() [all …]
|
H A D | nand_amd.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Author: Boris Brezillon <boris.brezillon@free-electrons.com> 11 static void amd_nand_decode_id(struct nand_chip *chip) in amd_nand_decode_id() argument 13 struct mtd_info *mtd = nand_to_mtd(chip); in amd_nand_decode_id() 16 memorg = nanddev_get_memorg(&chip->base); in amd_nand_decode_id() 18 nand_decode_ext_id(chip); in amd_nand_decode_id() 21 * Check for Spansion/AMD ID + repeating 5th, 6th byte since in amd_nand_decode_id() 24 * Data sheet (5 byte ID): Spansion S30ML-P ORNAND (p.39) in amd_nand_decode_id() 26 if (chip->id.data[4] != 0x00 && chip->id.data[5] == 0x00 && in amd_nand_decode_id() 27 chip->id.data[6] == 0x00 && chip->id.data[7] == 0x00 && in amd_nand_decode_id() [all …]
|
/openbmc/linux/drivers/mfd/ |
H A D | max8925-core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2009-2010 Marvell International Ltd. 28 .name = "max8925-backlight", 31 .id = -1, 37 .name = "max8925-tsc", 46 .name = "max8925-touch", 49 .id = -1, 55 .name = "max8925-power", 64 .name = "max8925-power", 67 .id = -1, [all …]
|
H A D | 88pm860x-core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 25 #include <linux/power/charger-manager.h> 136 /* Hook-switch press or release */ 141 {PM8607_IRQ_AUDIO_SHORT, PM8607_IRQ_AUDIO_SHORT, "audio-short", 170 .name = "88pm860x-backlight", 171 .id = 0, 175 .name = "88pm860x-backlight", 176 .id = 1, 180 .name = "88pm860x-backlight", 181 .id = 2, [all …]
|
H A D | 88pm80x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 18 /* 88pm80x chips have same definition for chip id register. */ 24 unsigned int id; member 29 /* 88PM800 chip id number */ 31 /* 88PM805 chip id number */ 33 /* 88PM860 chip id number */ 40 * pm800 and pm805. would remove it after HW chip fixes the issue. 53 struct pm80x_chip *chip; in pm80x_init() local 58 chip = in pm80x_init() 59 devm_kzalloc(&client->dev, sizeof(struct pm80x_chip), GFP_KERNEL); in pm80x_init() [all …]
|
H A D | adp5520.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * LEDs : drivers/led/leds-adp5520 6 * GPIO : drivers/gpio/adp5520-gpio (ADP5520 only) 7 * Keys : drivers/input/keyboard/adp5520-keys (ADP5520 only) 17 * Copyright (C) 2006-2008 Marvell International Ltd. 38 unsigned long id; member 49 dev_err(&client->dev, "failed reading at 0x%02x\n", reg); in __adp5520_read() 64 dev_err(&client->dev, "failed writing 0x%02x to 0x%02x\n", in __adp5520_write() 74 struct adp5520_chip *chip = i2c_get_clientdata(client); in __adp5520_ack_bits() local 78 mutex_lock(&chip->lock); in __adp5520_ack_bits() [all …]
|
/openbmc/linux/drivers/gpio/ |
H A D | gpio-moxtet.c | 1 // SPDX-License-Identifier: GPL-2.0 36 struct moxtet_gpio_chip *chip = gpiochip_get_data(gc); in moxtet_gpio_get_value() local 39 if (chip->desc->in_mask & BIT(offset)) { in moxtet_gpio_get_value() 40 ret = moxtet_device_read(chip->dev); in moxtet_gpio_get_value() 41 } else if (chip->desc->out_mask & BIT(offset)) { in moxtet_gpio_get_value() 42 ret = moxtet_device_written(chip->dev); in moxtet_gpio_get_value() 46 return -EINVAL; in moxtet_gpio_get_value() 58 struct moxtet_gpio_chip *chip = gpiochip_get_data(gc); in moxtet_gpio_set_value() local 61 state = moxtet_device_written(chip->dev); in moxtet_gpio_set_value() 65 offset -= MOXTET_GPIO_INPUTS; in moxtet_gpio_set_value() [all …]
|
/openbmc/linux/drivers/regulator/ |
H A D | slg51000-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // SLG51000 High PSRR, Multi-Output Regulators 20 #include "slg51000-regulator.h" 206 "gpio-en-ldo"); in slg51000_of_parse_cb() 208 config->ena_gpiod = ena_gpiod; in slg51000_of_parse_cb() 217 .id = SLG51000_REGULATOR_##_id, \ 244 static int slg51000_regulator_init(struct slg51000 *chip) in slg51000_regulator_init() argument 250 int id, ret = 0; in slg51000_regulator_init() local 257 for (id = 0; id < SLG51000_MAX_REGULATORS; id++) { in slg51000_regulator_init() 258 chip->rdesc[id] = ®ls_desc[id]; in slg51000_regulator_init() [all …]
|
H A D | da9121-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // DA9121 Single-channel dual-phase 10A buck converter 7 // DA9130 Single-channel dual-phase 10A buck converter (Automotive) 8 // DA9217 Single-channel dual-phase 6A buck converter 9 // DA9122 Dual-channel single-phase 5A buck converter 10 // DA9131 Dual-channel single-phase 5A buck converter (Automotive) 11 // DA9220 Dual-channel single-phase 3A buck converter 12 // DA9132 Dual-channel single-phase 3A buck converter (Automotive) 30 #include "da9121-regulator.h" 32 /* Chip data */ [all …]
|
H A D | aw37503-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0 48 struct aw37503_regulator *chip = rdev_get_drvdata(rdev); in aw37503_regulator_enable() local 49 int id = rdev_get_id(rdev); in aw37503_regulator_enable() local 50 struct aw37503_reg_pdata *rpdata = &chip->reg_pdata[id]; in aw37503_regulator_enable() 53 if (!IS_ERR(rpdata->en_gpiod)) { in aw37503_regulator_enable() 54 gpiod_set_value_cansleep(rpdata->en_gpiod, 1); in aw37503_regulator_enable() 55 rpdata->ena_gpio_state = 1; in aw37503_regulator_enable() 59 if (rdev->constraints->active_discharge == in aw37503_regulator_enable() 63 dev_err(chip->dev, "Failed to disable active discharge: %d\n", in aw37503_regulator_enable() 74 struct aw37503_regulator *chip = rdev_get_drvdata(rdev); in aw37503_regulator_disable() local [all …]
|
/openbmc/linux/drivers/staging/iio/adc/ |
H A D | ad7816.c | 1 // SPDX-License-Identifier: GPL-2.0+ 35 #define AD7816_BOUND_VALUE_MIN -95 41 * struct ad7816_chip_info - chip specific information 45 kernel_ulong_t id; member 64 static int ad7816_spi_read(struct ad7816_chip_info *chip, u16 *data) in ad7816_spi_read() argument 66 struct spi_device *spi_dev = chip->spi_dev; in ad7816_spi_read() 70 gpiod_set_value(chip->rdwr_pin, 1); in ad7816_spi_read() 71 gpiod_set_value(chip->rdwr_pin, 0); in ad7816_spi_read() 72 ret = spi_write(spi_dev, &chip->channel_id, sizeof(chip->channel_id)); in ad7816_spi_read() 74 dev_err(&spi_dev->dev, "SPI channel setting error\n"); in ad7816_spi_read() [all …]
|
/openbmc/linux/sound/isa/sb/ |
H A D | sb16.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 46 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 47 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ variable 50 static bool isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; 61 static int mic_agc[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; 66 static int seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4}; 71 module_param_array(id, charp, NULL, 0444); 72 MODULE_PARM_DESC(id, "ID string for SoundBlaster 16 soundcard."); 82 MODULE_PARM_DESC(mpu_port, "MPU-401 port # for SB16 driver."); 92 MODULE_PARM_DESC(dma8, "8-bit DMA # for SB16 driver."); [all …]
|
/openbmc/linux/drivers/staging/iio/addac/ |
H A D | adt7316.c | 1 // SPDX-License-Identifier: GPL-2.0+ 163 * Chip ID 177 * struct adt7316_chip_info - chip specific information 190 u8 id; /* chip id */ member 213 * struct adt7316_chip_info - chip specific information 226 struct adt7316_chip_info *chip = iio_priv(dev_info); in adt7316_show_enabled() local 228 return sprintf(buf, "%d\n", !!(chip->config1 & ADT7316_EN)); in adt7316_show_enabled() 231 static ssize_t _adt7316_store_enabled(struct adt7316_chip_info *chip, in _adt7316_store_enabled() argument 238 config1 = chip->config1 | ADT7316_EN; in _adt7316_store_enabled() 240 config1 = chip->config1 & ~ADT7316_EN; in _adt7316_store_enabled() [all …]
|
/openbmc/linux/sound/usb/6fire/ |
H A D | chip.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 #include "chip.h" 30 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */ 31 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* Id for card */ variable 38 module_param_array(id, charp, NULL, 0444); 39 MODULE_PARM_DESC(id, "ID string for the 6fire sound device."); 45 static void usb6fire_chip_abort(struct sfire_chip *chip) in usb6fire_chip_abort() argument 47 if (chip) { in usb6fire_chip_abort() 48 if (chip->pcm) in usb6fire_chip_abort() 49 usb6fire_pcm_abort(chip); in usb6fire_chip_abort() [all …]
|
/openbmc/linux/sound/i2c/other/ |
H A D | ak4114.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Routines for control of the AK4114 via I2C and 4-wire serial interface 25 static void ak4114_init_regs(struct ak4114 *chip); 29 ak4114->write(ak4114->private_data, reg, val); in reg_write() 31 ak4114->regmap[reg] = val; in reg_write() 33 ak4114->txcsb[reg-AK4114_REG_TXCSB0] = val; in reg_write() 38 return ak4114->read(ak4114->private_data, reg); in reg_read() 48 …2x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < ARRAY_SIZE(ak4114->regmap) ? ak4114->regmap[i] :… 52 static void snd_ak4114_free(struct ak4114 *chip) in snd_ak4114_free() argument 54 atomic_inc(&chip->wq_processing); /* don't schedule new work */ in snd_ak4114_free() [all …]
|
/openbmc/linux/sound/isa/ |
H A D | opl3sa2.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Driver for Yamaha OPL3-SA[2,3] soundcards 26 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 27 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ variable 30 static bool isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; 43 MODULE_PARM_DESC(index, "Index value for OPL3-SA soundcard."); 44 module_param_array(id, charp, NULL, 0444); 45 MODULE_PARM_DESC(id, "ID string for OPL3-SA soundcard."); 47 MODULE_PARM_DESC(enable, "Enable OPL3-SA soundcard."); 53 MODULE_PARM_DESC(port, "Port # for OPL3-SA driver."); [all …]
|
H A D | als100.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 card-als100.c - driver for Avance Logic ALS100 based soundcards. 5 Copyright (C) 1999-2000 by Massimo Piccioni <dafastidio@libero.it> 6 Copyright (C) 1999-2002 by Massimo Piccioni <dafastidio@libero.it> 10 Generalised for soundcards based on DT-0196 and ALS-007 chips 32 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 33 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ variable 45 module_param_array(id, charp, NULL, 0444); 46 MODULE_PARM_DESC(id, "ID string for Avance Logic based soundcard."); 50 MODULE_ALIAS("snd-dt019x"); [all …]
|