Home
last modified time | relevance | path

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

12345678910>>...47

/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 Dmax6639.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * max6639.c - Support for Maxim MAX6639
5 * 2-Channel Temperature Monitor with Dual PWM Fan-Speed Controller
19 #include <linux/hwmon-sysfs.h>
28 /* The MAX6639 registers, valid channel numbers: 0, 1 */
74 * Client data (each client gets its own)
88 static int max6639_temp_read_input(struct device *dev, int channel, long *temp) in max6639_temp_read_input() argument
90 u32 regs[2] = { MAX6639_REG_TEMP_EXT(channel), MAX6639_REG_TEMP(channel) }; in max6639_temp_read_input()
91 struct max6639_data *data = dev_get_drvdata(dev); in max6639_temp_read_input() local
95 res = regmap_multi_reg_read(data->regmap, regs, regvals, 2); in max6639_temp_read_input()
[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 Dw83627ehf.c1 // 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 …]
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/rpmsg/
H A Dqcom_smd.c1 // 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 …]
/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/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/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/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/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/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/drivers/w1/masters/
H A Dds2482.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * ds2482.c - provides i2c to w1-master bridge(s)
7 * It is a I2C to 1-wire bridge.
8 * There are two variations: -100 and -800, which have 1 or 8 1-wir
104 u8 channel; global() member
117 u8 channel; global() member
237 ds2482_set_channel(struct ds2482_data * pdev,u8 channel) ds2482_set_channel() argument
260 ds2482_w1_touch_bit(void * data,u8 bit) ds2482_w1_touch_bit() argument
292 ds2482_w1_triplet(void * data,u8 dbit) ds2482_w1_triplet() argument
322 ds2482_w1_write_byte(void * data,u8 byte) ds2482_w1_write_byte() argument
346 ds2482_w1_read_byte(void * data) ds2482_w1_read_byte() argument
383 ds2482_w1_reset_bus(void * data) ds2482_w1_reset_bus() argument
415 ds2482_w1_set_pullup(void * data,int delay) ds2482_w1_set_pullup() argument
444 struct ds2482_data *data; ds2482_probe() local
527 struct ds2482_data *data = i2c_get_clientdata(client); ds2482_remove() local
[all...]

12345678910>>...47