/openbmc/linux/sound/core/oss/ |
H A D | rate.c | 2 * Rate conversion Plug-In 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 29 #define R_MASK (BITS-1) 55 unsigned int channel; in rate_init() local 56 struct rate_priv *data = (struct rate_priv *)plugin->extra_data; in rate_init() local 57 data->pos = 0; in rate_init() 58 for (channel = 0; channel < plugin->src_format.channels; channel++) { in rate_init() 59 data->channels[channel].last_S1 = 0; in rate_init() 60 data->channels[channel].last_S2 = 0; in rate_init() 73 unsigned int channel; in resample_expand() local [all …]
|
H A D | mulaw.c | 2 * Mu-Law conversion Plug-In Interface 4 * Uros Bizjak <uros@kss-loka.si> 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 29 #define SIGN_BIT (0x80) /* Sign bit for a u-law byte. */ 31 #define NSEGS (8) /* Number of u-law segments. */ 55 * linear2ulaw() - Convert a linear PCM value to u-law 58 * is biased by adding 33 which shifts the encoding range from (0 - 8158) to 59 * (33 - 8191). The result can be seen in the following encoding table: 62 * ------------------------ --------------- 75 * four bits wxyz. * The trailing bits (a - h) are ignored. [all …]
|
H A D | linear.c | 2 * Linear conversion Plug-In 4 * Abramo Bagnara <abramo@alsa-project.org> 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 36 unsigned int copy_ofs; /* byte offset in temporary u32 data */ 42 static inline void do_convert(struct linear_priv *data, in do_convert() argument 48 memcpy(p + data->copy_ofs, src + data->src_ofs, data->copy_bytes); in do_convert() 49 if (data->cvt_endian) in do_convert() 51 tmp ^= data->flip; in do_convert() 52 memcpy(dst, p + data->dst_ofs, data->dst_bytes); in do_convert() 60 struct linear_priv *data = (struct linear_priv *)plugin->extra_data; in convert() local [all …]
|
/openbmc/linux/drivers/hwmon/ |
H A D | max31790.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max31790.c - Part of lm_sensors, Linux kernel modules for hardware 53 * Client data (each client gets its own) 72 struct max31790_data *data = dev_get_drvdata(dev); in max31790_update_device() local 73 struct i2c_client *client = data->client; in max31790_update_device() 74 struct max31790_data *ret = data; in max31790_update_device() 78 mutex_lock(&data->update_lock); in max31790_update_device() 80 if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { in max31790_update_device() 85 data->fault_status |= rv & 0x3F; in max31790_update_device() 91 data->fault_status |= (rv & 0x3F) << 6; in max31790_update_device() [all …]
|
H A D | tmp464.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 #define TMP464_NUM_CHANNELS 5 /* chan 0 is internal, 1-4 are remote */ 25 #define TMP468_NUM_CHANNELS 9 /* chan 0 is internal, 1-8 are remote */ 29 #define TMP464_TEMP_REG(channel) (channel) argument 30 #define TMP464_TEMP_OFFSET_REG(channel) (0x40 + ((channel) - 1) * 8) argument 31 #define TMP464_N_FACTOR_REG(channel) (0x41 + ((channel) - 1) * 8) argument 78 .data = (void *)TMP464_NUM_CHANNELS 82 .data = (void *)TMP468_NUM_CHANNELS 102 struct tmp464_channel channel[MAX_CHANNELS]; member 120 static int tmp464_enable_channels(struct tmp464_data *data) in tmp464_enable_channels() argument [all …]
|
H A D | nct7904.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * nct7904.c - driver for Nuvoton NCT7904D. 92 #define FANCTL1_FMR_REG 0x00 /* Bank 3; 1 reg per channel */ 93 #define FANCTL1_OUT_REG 0x10 /* Bank 3; 1 reg per channel */ 110 /*The timeout range is 1-255 minutes*/ 145 static int nct7904_bank_lock(struct nct7904_data *data, unsigned int bank) in nct7904_bank_lock() argument 149 mutex_lock(&data->bank_lock); in nct7904_bank_lock() 150 if (data->bank_sel == bank) in nct7904_bank_lock() 152 ret = i2c_smbus_write_byte_data(data->client, BANK_SEL_REG, bank); in nct7904_bank_lock() 154 data->bank_sel = bank; in nct7904_bank_lock() [all …]
|
H A D | max197.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 2012 Savoir-faire Linux Inc. 21 #include <linux/hwmon-sysfs.h> 34 #define MAX197_SCALE 12207 /* Scale coefficient for raw data */ 40 * struct max197_data - device instance specific data 41 * @pdata: Platform data. 57 static inline void max197_set_unipolarity(struct max197_data *data, int channel) in max197_set_unipolarity() argument 59 data->ctrl_bytes[channel] &= ~MAX197_BIP; in max197_set_unipolarity() 62 static inline void max197_set_bipolarity(struct max197_data *data, int channel) in max197_set_bipolarity() argument 64 data->ctrl_bytes[channel] |= MAX197_BIP; in max197_set_bipolarity() [all …]
|
H A D | adt7411.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Driver for the ADT7411 (I2C/SPI 8 channel 10 bit ADC & temperature-sensor) 7 * TODO: SPI, use power-down mode for suspend?, interrupt handling? 18 #include <linux/hwmon-sysfs.h> 63 ? 0x2b + 2 * ((nr)-2) \ 66 ? 0x2c + 2 * ((nr)-2) \ 112 * msb-registers get locked by the hardware. After _one_ of those msb is read, 119 struct adt7411_data *data = i2c_get_clientdata(client); in adt7411_read_10_bit() local 122 mutex_lock(&data->device_lock); in adt7411_read_10_bit() 135 mutex_unlock(&data->device_lock); in adt7411_read_10_bit() [all …]
|
H A D | tmp421.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 20 #include <linux/hwmon-sysfs.h> 72 .data = (void *)2 76 .data = (void *)3 80 .data = (void *)4 84 .data = (void *)2 88 .data = (void *)3 111 struct tmp421_channel channel[MAX_CHANNELS]; member 120 temp = temp - 64 * 256; in temp_from_raw() 127 static int tmp421_update_device(struct tmp421_data *data) in tmp421_update_device() argument [all …]
|
H A D | adm9240.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 * Alarms 16-bit map of active alarms 26 * Test hardware: Intel SE440BX-2 desktop motherboard --Grant 36 #include <linux/hwmon-sysfs.h> 38 #include <linux/hwmon-vid.h> 74 return (val * mul - div / 2) / div; in SCALE() 93 /* temperature range: -40..125, 127 disables temperature alarm */ 96 val = clamp_val(val, -40000, 127000); in TEMP_TO_REG() 104 return -1; in FAN_FROM_REG() 124 /* per client data */ [all …]
|
H A D | w83627ehf.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * w83627ehf - Driver for the hardware monitoring functionality of 4 * the Winbond W83627EHF Super-I/O chip 5 * Copyright (C) 2005-2012 Jean Delvare <jdelvare@suse.de> 10 * Copyright (C) 2010 Sheng-Yuan Huang (Nuvoton) (PS00) 18 * This driver also supports the W83627EHG, which is the lead-free 27 * w83627dhg-p 9 5 4 3 0xb070 0xc1 0x5ca3 30 * w83667hg-b 9 5 3 4 0xb350 0xc1 0x5ca3 41 #include <linux/hwmon-sysfs.h> 42 #include <linux/hwmon-vid.h> [all …]
|
/openbmc/u-boot/include/ |
H A D | adc.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 10 /* ADC_CHANNEL() - ADC channel bit mask, to select only required channels */ 13 /* The last possible selected channel with 32-bit mask */ 17 * adc_data_format: define the ADC output data format, can be useful when 19 * - ADC_DATA_FORMAT_BIN - binary offset 20 * - ADC_DATA_FORMAT_2S - two's complement 23 * platform data using one of the above data format types. 31 * struct adc_channel - structure to hold channel conversion data. 32 * Useful to keep the result of a multi-channel conversion output. 34 * @id - channel id [all …]
|
/openbmc/linux/drivers/rpmsg/ |
H A D | qcom_smd.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 27 * The Qualcomm Shared Memory communication solution provides point-to-point 28 * channels for clients to send and receive streaming or packet based data. 30 * Each channel consists of a control item (channel info) and a ring buffer 31 * pair. The channel info carry information related to channel state, flow 37 * Upon creating a new channel the remote processor allocates channel info and 39 * interrupt is sent to the other end of the channel and a scan for new 40 * channels should be done. A channel never goes away, it will only change 44 * channel by setting the state of its end of the channel to "opening" and [all …]
|
/openbmc/ipmitool/lib/ |
H A D | ipmi_channel.c | 1 /* -*-mode: C; indent-tabs-mode: t; -*- 22 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. 26 * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, 60 /* _ipmi_get_channel_access - Get Channel Access for given channel. Results are 63 * @intf - IPMI interface 64 * @channel_access - ptr to channel_access_t with Channel set. 65 * @get_volatile_settings - get volatile if != 0, else non-volatile settings. 67 * returns - negative number means error, positive is a ccode. 76 uint8_t data[2]; in _ipmi_get_channel_access() local 79 return (-3); in _ipmi_get_channel_access() [all …]
|
H A D | ipmi_lanp.c | 22 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. 26 * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, 74 /* is_lan_channel - Check if channel is LAN medium 76 * return 1 if channel is LAN 77 * return 0 if channel is not LAN 80 * @chan: channel number to check 99 /* find_lan_channel - Find first channel that is LAN 101 * return channel number if successful 102 * return 0 if no lan channel found, which is not a valid LAN channel 105 * @start: channel number to start searching from [all …]
|
/openbmc/linux/drivers/thermal/qcom/ |
H A D | qcom-spmi-adc-tm5.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. 12 #include <linux/iio/adc/qcom-vadc-common.h> 27 * channel is programmed to use one of ADC channels for voltage comparison. 169 int (*disable_channel)(struct adc_tm5_channel *channel); 170 int (*configure)(struct adc_tm5_channel *channel, int low, int high); 171 irqreturn_t (*isr)(int irq, void *data); 178 * struct adc_tm5_channel - ADC Thermal Monitoring channel data. 179 * @channel: channel number. 180 * @adc_channel: corresponding ADC channel number. [all …]
|
/openbmc/linux/drivers/firmware/tegra/ |
H A D | bpmp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 18 #include <soc/tegra/bpmp-abi.h> 21 #include "bpmp-private.h" 28 channel_to_ops(struct tegra_bpmp_channel *channel) in channel_to_ops() argument 30 struct tegra_bpmp *bpmp = channel->bpmp; in channel_to_ops() 32 return bpmp->soc->ops; in channel_to_ops() 41 np = of_parse_phandle(dev->of_node, "nvidia,bpmp", 0); in tegra_bpmp_get() 43 return ERR_PTR(-ENOENT); in tegra_bpmp_get() 47 bpmp = ERR_PTR(-ENODEV); in tegra_bpmp_get() 53 bpmp = ERR_PTR(-EPROBE_DEFER); in tegra_bpmp_get() [all …]
|
/openbmc/u-boot/drivers/adc/ |
H A D | sandbox.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 #include <sandbox-adc.h> 13 * struct sandbox_adc_priv - sandbox ADC device's operation status and data 15 * @conversion_status - conversion status: ACTIVE (started) / INACTIVE (stopped) 16 * @conversion_mode - conversion mode: single or multi-channel 17 * @active_channel - active channel number, valid for single channel mode 18 * data[] - channels data 24 unsigned int data[4]; member 27 int sandbox_adc_start_channel(struct udevice *dev, int channel) in sandbox_adc_start_channel() argument 31 /* Set single-channel mode */ in sandbox_adc_start_channel() [all …]
|
/openbmc/linux/sound/core/seq/ |
H A D | seq_ump_convert.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 68 return port->ump_group ? (port->ump_group - 1) : 0; in get_ump_group() 76 * UMP -> MIDI1 sequencer event 85 ev->data.note.channel = val->note.channel; in ump_midi1_to_note_ev() 86 ev->data.note.note = val->note.note; in ump_midi1_to_note_ev() 87 ev->data.note.velocity = val->note.velocity; in ump_midi1_to_note_ev() 94 ev->data.control.channel = val->caf.channel; in ump_midi1_to_ctrl_ev() 95 ev->data.control.value = val->caf.data; in ump_midi1_to_ctrl_ev() 102 ev->data.control.channel = val->pb.channel; in ump_midi1_to_pitchbend_ev() 103 ev->data.control.value = (val->pb.data_msb << 7) | val->pb.data_lsb; in ump_midi1_to_pitchbend_ev() [all …]
|
/openbmc/linux/drivers/iio/dac/ |
H A D | ti-dac5571.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ti-dac5571.c - Texas Instruments 8/10/12-bit 1/4-channel DAC driver 54 int (*dac5571_cmd)(struct dac5571_data *data, int channel, u16 val); 55 int (*dac5571_pwrdwn)(struct dac5571_data *data, int channel, u8 pwrdwn); 66 static int dac5571_cmd_single(struct dac5571_data *data, int channel, u16 val) in dac5571_cmd_single() argument 70 shift = 12 - data->spec->resolution; in dac5571_cmd_single() 71 data->buf[1] = val << shift; in dac5571_cmd_single() 72 data->buf[0] = val >> (8 - shift); in dac5571_cmd_single() 74 if (i2c_master_send(data->client, data->buf, 2) != 2) in dac5571_cmd_single() 75 return -EIO; in dac5571_cmd_single() [all …]
|
/openbmc/phosphor-host-ipmid/user_channel/ |
H A D | channel_mgmt.hpp | 8 // http://www.apache.org/licenses/LICENSE-2.0 19 #include "ipmid/api-types.hpp" 45 * Structure to store both non-volatile and volatile channel access information 56 * Structure for channel information - base structure to get all information 57 * about the channel.(refer spec sec 22.22 to 22.24) 86 /** @brief determines valid channel 88 * @param[in] chNum - channel number 96 * @param[in] chNum - channel number 97 * @param[in] authType - authentication type 103 /** @brief function to get channel name from channel number [all …]
|
H A D | channel_layer.hpp | 8 // http://www.apache.org/licenses/LICENSE-2.0 39 * @enum Channel Protocol Type (refer spec sec 6.4) 57 * @enum Channel Medium Type (refer spec sec 6.5) 79 * @enum Channel Session Type (refer spec sec 22.24 - 80 * response data byte 5) 91 * @enum Channel Access Mode (refer spec sec 6.6) 102 * @enum Authentication Types (refer spec sec 13.6 - IPMI 116 // to phosphor-ipmi-host/include 134 * @enum Access mode for channel access set/get (refer spec 135 * sec 22.22 - request byte 2[7:6]) [all …]
|
/openbmc/linux/Documentation/ABI/testing/ |
H A D | configfs-most | 9 # mount -t configfs none /sys/kernel/config/ 19 configure the buffer size for this channel 22 configure the sub-buffer size for this channel 23 (needed for synchronous and isochronous data) 28 channel 31 configure type of data that will travel over 32 this channel 39 configure DBR data buffer size (this is used 51 channel 52 name of the channel the link is to be attached to [all …]
|
/openbmc/linux/drivers/nvme/host/ |
H A D | hwmon.c | 1 // SPDX-License-Identifier: GPL-2.0 32 return -EIO; in nvme_get_temp_thresh() 55 return -EIO; in nvme_set_temp_thresh() 60 static int nvme_hwmon_get_smart_log(struct nvme_hwmon_data *data) in nvme_hwmon_get_smart_log() argument 62 return nvme_get_log(data->ctrl, NVME_NSID_ALL, NVME_LOG_SMART, 0, in nvme_hwmon_get_smart_log() 63 NVME_CSI_NVM, data->log, sizeof(*data->log), 0); in nvme_hwmon_get_smart_log() 67 u32 attr, int channel, long *val) in nvme_hwmon_read() argument 69 struct nvme_hwmon_data *data = dev_get_drvdata(dev); in nvme_hwmon_read() local 70 struct nvme_smart_log *log = data->log; in nvme_hwmon_read() 80 return nvme_get_temp_thresh(data->ctrl, channel, false, val); in nvme_hwmon_read() [all …]
|
/openbmc/qemu/include/io/ |
H A D | channel.h | 25 #include "qemu/coroutine-core.h" 28 #define TYPE_QIO_CHANNEL "qio-channel" 33 #define QIO_CHANNEL_ERR_BLOCK -2 61 gpointer data); 66 * The QIOChannel defines the core API for a generic I/O channel 70 * - Use QOM to properly support arbitrary subclassing 71 * - Support use of iovecs for efficient I/O with multiple blocks 72 * - None of the character set translation, binary data exclusively 73 * - Direct support for QEMU Error object reporting 74 * - File descriptor passing [all …]
|