| /kernel/linux/linux-6.6/sound/core/oss/ |
| 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 …]
|
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/hwmon/ |
| 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 …]
|
| 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 …]
|
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-5.10/sound/core/oss/ |
| 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 …]
|
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/firmware/tegra/ |
| D | bpmp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 #include <soc/tegra/bpmp-abi.h> 22 #include "bpmp-private.h" 35 channel_to_ops(struct tegra_bpmp_channel *channel) in channel_to_ops() argument 37 struct tegra_bpmp *bpmp = channel->bpmp; in channel_to_ops() 39 return bpmp->soc->ops; in channel_to_ops() 48 np = of_parse_phandle(dev->of_node, "nvidia,bpmp", 0); in tegra_bpmp_get() 50 return ERR_PTR(-ENOENT); in tegra_bpmp_get() 54 bpmp = ERR_PTR(-ENODEV); in tegra_bpmp_get() 60 bpmp = ERR_PTR(-EPROBE_DEFER); in tegra_bpmp_get() [all …]
|
| /kernel/linux/linux-5.10/drivers/hwmon/ |
| D | max31790.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max31790.c - Part of lm_sensors, Linux kernel modules for hardware 51 * Client data (each client gets its own) 70 struct max31790_data *data = dev_get_drvdata(dev); in max31790_update_device() local 71 struct i2c_client *client = data->client; in max31790_update_device() 72 struct max31790_data *ret = data; in max31790_update_device() 76 mutex_lock(&data->update_lock); in max31790_update_device() 78 if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { in max31790_update_device() 83 data->fault_status = rv & 0x3F; in max31790_update_device() 89 data->fault_status |= (rv & 0x3F) << 6; in max31790_update_device() [all …]
|
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/rpmsg/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/firmware/tegra/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/thermal/qcom/ |
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/rpmsg/ |
| 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 …]
|
| D | qcom_glink_native.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2016-2017, Linaro Ltd 36 u8 data[]; member 40 * struct glink_defer_cmd - deferred incoming control message 43 * @data: payload of the message 52 u8 data[]; member 56 * struct glink_core_rx_intent - RX intent 59 * @data: pointer to the data (may be NULL for zero-copy) 63 * @in_use: To mark if intent is already in use for the channel 68 void *data; member [all …]
|
| /kernel/linux/linux-5.10/drivers/iio/dac/ |
| 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 52 int (*dac5571_cmd)(struct dac5571_data *data, int channel, u16 val); 53 int (*dac5571_pwrdwn)(struct dac5571_data *data, int channel, u8 pwrdwn); 64 static int dac5571_cmd_single(struct dac5571_data *data, int channel, u16 val) in dac5571_cmd_single() argument 68 shift = 12 - data->spec->resolution; in dac5571_cmd_single() 69 data->buf[1] = val << shift; in dac5571_cmd_single() 70 data->buf[0] = val >> (8 - shift); in dac5571_cmd_single() 72 if (i2c_master_send(data->client, data->buf, 2) != 2) in dac5571_cmd_single() 73 return -EIO; in dac5571_cmd_single() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/ipa/ |
| D | gsi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. 4 * Copyright (C) 2018-2020 Linaro Ltd. 29 * providing a well-defined communication layer between the AP subsystem 32 * -------- --------- 34 * | AP +<---. .----+ Modem | 35 * | +--. | | .->+ | 37 * -------- | | | | --------- 39 * --+-+---+-+-- 41 * |-----------| [all …]
|
| /kernel/linux/linux-5.10/drivers/visorbus/ |
| D | visorchannel.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2010 - 2015 UNISYS CORPORATION 8 * This provides s-Par channel communication primitives, which are 9 * independent of the mechanism used to access the channel data. 36 * channel creator knows if more than one thread will be inserting or 48 void visorchannel_destroy(struct visorchannel *channel) in visorchannel_destroy() argument 50 if (!channel) in visorchannel_destroy() 53 if (channel->mapped) { in visorchannel_destroy() 54 memunmap(channel->mapped); in visorchannel_destroy() 55 if (channel->requested) in visorchannel_destroy() [all …]
|
| /kernel/linux/linux-6.6/drivers/iio/dac/ |
| 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 …]
|
| /kernel/linux/linux-6.6/Documentation/ABI/testing/ |
| 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 …]
|
| /kernel/linux/linux-5.10/Documentation/ABI/testing/ |
| 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 isochrnous 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 …]
|