Home
last modified time | relevance | path

Searched +full:data +full:- +full:channel (Results 1 – 25 of 1049) sorted by relevance

12345678910>>...42

/linux/drivers/hwmon/
H A Dmax31790.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * max31790.c - Part of lm_sensors, Linux kernel modules for hardware
56 * Client data (each client gets its own)
75 struct max31790_data *data = dev_get_drvdata(dev); in max31790_update_device() local
76 struct i2c_client *client = data->client; in max31790_update_device()
77 struct max31790_data *ret = data; in max31790_update_device()
81 mutex_lock(&data->update_lock); in max31790_update_device()
83 if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { in max31790_update_device()
88 data->fault_status |= rv & 0x3F; in max31790_update_device()
94 data->fault_status |= (rv & 0x3F) << 6; in max31790_update_device()
[all …]
H A Dtmp464.c1 // 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 Dnct7904.c1 // 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 Dadt7411.c1 // 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 Dadm9240.c1 // 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 Dtmp421.c1 // 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 Dmax31730.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for MAX31730 3-Channel Remote Temperature Sensor
5 * Copyright (c) 2019 Guenter Roeck <linux@roeck-us.net>
41 #define MAX31730_TEMP_MIN (-128000)
44 /* Each client has this additional data */
53 /*-----------------------------------------------------------------------*/
60 static int max31730_write_config(struct max31730_data *data, u8 set_mask, in max31730_write_config() argument
66 value = data->current_conf & ~clr_mask; in max31730_write_config()
69 if (data->current_conf != value) { in max31730_write_config()
72 err = i2c_smbus_write_byte_data(data->client, MAX31730_REG_CONF, in max31730_write_config()
[all …]
H A Dlm95241.c1 // SPDX-License-Identifier: GPL-2.0-or-later
75 /* Client data (each client gets its own) */
80 unsigned long interval; /* in milli-seconds */
102 struct lm95241_data *data = dev_get_drvdata(dev); in lm95241_update_device() local
103 struct i2c_client *client = data->client; in lm95241_update_device()
105 mutex_lock(&data->update_lock); in lm95241_update_device()
107 if (time_after(jiffies, data->last_updated in lm95241_update_device()
108 + msecs_to_jiffies(data->interval)) || in lm95241_update_device()
109 !data->valid) { in lm95241_update_device()
112 dev_dbg(dev, "Updating lm95241 data.\n"); in lm95241_update_device()
[all …]
H A Dmax127.c1 // SPDX-License-Identifier: GPL-2.0+
15 * MAX127 Control Byte. Refer to MAX127 datasheet, Table 1 "Control-Byte
29 * MAX127 channel input ranges. Refer to MAX127 datasheet, Table 3 "Range
37 * - the first byte contains data[11:4].
38 * - the second byte contains data[3:0] (MSB) and 4 dummy 0s (LSB).
57 .addr = client->addr, in max127_select_channel()
63 status = i2c_transfer(client->adapter, &msg, 1); in max127_select_channel()
67 return -EIO; in max127_select_channel()
77 .addr = client->addr, in max127_read_channel()
83 status = i2c_transfer(client->adapter, &msg, 1); in max127_read_channel()
[all …]
H A Dlm95234.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 2013, 2014 Guenter Roeck <linux@roeck-us.net>
47 #define LM95234_REG_TCRIT2(x) ((x) + 0x49) /* Remote channel 1,2 */
54 /* Client data (each client gets its own) */
68 regs[0] = LM95234_REG_UTEMPH(index - 1); in lm95234_read_temp()
69 regs[1] = LM95234_REG_UTEMPL(index - 1); in lm95234_read_temp()
101 *val = (regvals[0] - regvals[1]) * 1000; in lm95234_hyst_get()
105 static ssize_t lm95234_hyst_set(struct lm95234_data *data, long val) in lm95234_hyst_set() argument
110 mutex_lock(&data->update_lock); in lm95234_hyst_set()
112 ret = regmap_read(data->regmap, LM95234_REG_TCRIT1(0), &tcrit); in lm95234_hyst_set()
[all …]
H A Dmax6697.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) 2012 Guenter Roeck <linux@roeck-us.net>
38 * Applies to alert register and over-temperature register.
46 /* alert - local channel is in bit 6 */
50 /* over-temperature - local channel is in bit 7 */
73 #define MAX6581_OFFSET_MIN -31750
76 #define MAX6697_CONV_TIME 156 /* ms per channel, worst case */
178 static int max6697_alarm_channel_map(int channel) in max6697_alarm_channel_map() argument
180 switch (channel) { in max6697_alarm_channel_map()
186 return channel - 1; in max6697_alarm_channel_map()
[all …]
H A Demc1403.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * emc1403.c - SMSC Thermal Driver
17 #include <linux/hwmon-sysfs.h>
38 struct thermal_data *data = dev_get_drvdata(dev); in power_state_show() local
42 retval = regmap_read(data->regmap, 0x03, &val); in power_state_show()
51 struct thermal_data *data = dev_get_drvdata(dev); in power_state_store() local
56 return -EINVAL; in power_state_store()
58 retval = regmap_update_bits(data->regmap, 0x03, BIT(6), in power_state_store()
81 return -ENODEV; in emc1403_detect()
86 strscpy(info->type, "emc1402", I2C_NAME_SIZE); in emc1403_detect()
[all …]
H A Dmax6620.c1 // SPDX-License-Identifier: GPL-2.0-or-later
20 * http://pdfserv.maxim-ic.com/en/ds/MAX6620.pdf
95 /* Minimum and maximum values of the FAN-RPM */
128 * Client data (each client gets its own)
162 struct max6620_data *data = dev_get_drvdata(dev); in max6620_update_device() local
163 struct i2c_client *client = data->client; in max6620_update_device()
167 mutex_lock(&data->update_lock); in max6620_update_device()
169 if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { in max6620_update_device()
174 data->fancfg[i] = ret; in max6620_update_device()
179 data->fandyn[i] = ret; in max6620_update_device()
[all …]
/linux/drivers/iio/adc/
H A Drohm-bd79124.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * https://fscdn.rohm.com/en/products/databook/datasheet/ic/data_converter/dac/bd79124muf-c-e.pdf
15 #include <linux/devm-helpers.h>
30 #include <linux/iio/adc-helpers.h>
81 * These macros return the address of the first reg for the given channel.
90 * The hysteresis for a channel is stored in the same register where the
115 /* Bitmask of disabled events (for rate limiting) for each channel. */
201 struct bd79124_data *data = gpiochip_get_data(gc); in bd79124gpo_set() local
203 return regmap_assign_bits(data->map, BD79124_REG_GPO_VAL, BIT(offset), in bd79124gpo_set()
212 struct bd79124_data *data = gpiochip_get_data(gc); in bd79124gpo_set_multiple() local
[all …]
/linux/sound/core/oss/
H A Dmulaw.c2 * 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 Dlinear.c2 * 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 …]
/linux/drivers/firmware/tegra/
H A Dbpmp.c1 // 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 …]
/linux/drivers/iio/dac/
H A Dti-dac5571.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * ti-dac5571.c - Texas Instruments 8/10/12-bit 1/4-channel DAC driver
55 int (*dac5571_cmd)(struct dac5571_data *data, int channel, u16 val);
56 int (*dac5571_pwrdwn)(struct dac5571_data *data, int channel, u8 pwrdwn);
67 static int dac5571_cmd_single(struct dac5571_data *data, int channel, u16 val) in dac5571_cmd_single() argument
71 shift = 12 - data->spec->resolution; in dac5571_cmd_single()
72 data->buf[1] = val << shift; in dac5571_cmd_single()
73 data->buf[0] = val >> (8 - shift); in dac5571_cmd_single()
75 if (i2c_master_send(data->client, data->buf, 2) != 2) in dac5571_cmd_single()
76 return -EIO; in dac5571_cmd_single()
[all …]
/linux/Documentation/ABI/testing/
H A Dconfigfs-most9 # 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 …]
/linux/sound/core/seq/
H A Dseq_ump_convert.c1 // 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 …]
/linux/drivers/nvme/host/
H A Dhwmon.c1 // 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 …]
/linux/sound/soc/sprd/
H A Dsprd-mcdt.c1 // SPDX-License-Identifier: GPL-2.0
14 #include "sprd-mcdt.h"
57 /* Channel water mark definition */
62 /* DMA channel select definition */
75 /* DMA channel ACK select definition */
78 /* Channel FIFO definition */
121 u32 orig = readl_relaxed(mcdt->base + reg); in sprd_mcdt_update()
125 writel_relaxed(tmp, mcdt->base + reg); in sprd_mcdt_update()
128 static void sprd_mcdt_dac_set_watermark(struct sprd_mcdt_dev *mcdt, u8 channel, in sprd_mcdt_dac_set_watermark() argument
131 u32 reg = MCDT_DAC0_WTMK + channel * 4; in sprd_mcdt_dac_set_watermark()
[all …]
/linux/Documentation/filesystems/
H A Drelay.rst1 .. SPDX-License-Identifier: GPL-2.0
8 efficiently log and transfer large quantities of data from the kernel
9 to userspace via user-defined 'relay channels'.
11 A 'relay channel' is a kernel->user data relay mechanism implemented
12 as a set of per-cpu kernel buffers ('channel buffers'), each
14 clients write into the channel buffers using efficient write
15 functions; these automatically log into the current cpu's channel
17 and retrieve the data as it becomes available. The relay files
19 are associated with the channel buffers using the API described below.
21 The format of the data logged into the channel buffers is completely
[all …]
/linux/drivers/pwm/
H A Dpwm-meson.c1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
13 * Setting the duty cycle will disable and re-enable the PWM output.
19 * https://dl.khadas.com/Hardware/VIM2/Datasheet/S912_Datasheet_V0.220170314publicversion-Wesion.pdf
23 * https://dn.odroid.com/S922X/ODROID-N2/Datasheet/S922X_Public_Datasheet_V0.2.pdf
33 #include <linux/clk-provider.h>
119 const struct meson_pwm_data *data; member
137 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm]; in meson_pwm_request() local
141 err = clk_prepare_enable(channel->clk); in meson_pwm_request()
144 __clk_get_name(channel->clk), err); in meson_pwm_request()
154 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm]; in meson_pwm_free() local
[all …]
/linux/include/linux/
H A Drelay.h1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Copyright (C) 2002, 2003 - Tom Zanussi (zanussi@us.ibm.com), IBM Corp
6 * Copyright (C) 1999, 2000, 2001, 2002 - Karim Yaghmour (karim@opersys.com)
48 * Per-cpu relay channel buffer
52 void *start; /* start of channel buffer */
53 void *data; /* start of current sub-buffer */ member
54 size_t offset; /* current offset into sub-buffer */
55 size_t subbufs_produced; /* count of sub-buffers produced */
56 size_t subbufs_consumed; /* count of sub-buffers consumed */
57 struct rchan *chan; /* associated channel */
[all …]

12345678910>>...42