Home
last modified time | relevance | path

Searched full:ec (Results 1 – 25 of 845) sorted by relevance

12345678910>>...34

/kernel/linux/linux-5.10/drivers/misc/echo/
Decho.c106 static inline void lms_adapt_bg(struct oslec_state *ec, int clean, int shift) in lms_adapt_bg() argument
122 offset2 = ec->curr_pos; in lms_adapt_bg()
123 offset1 = ec->taps - offset2; in lms_adapt_bg()
125 for (i = ec->taps - 1; i >= offset1; i--) { in lms_adapt_bg()
126 exp = (ec->fir_state_bg.history[i - offset1] * factor); in lms_adapt_bg()
127 ec->fir_taps16[1][i] += (int16_t) ((exp + (1 << 14)) >> 15); in lms_adapt_bg()
130 exp = (ec->fir_state_bg.history[i + offset2] * factor); in lms_adapt_bg()
131 ec->fir_taps16[1][i] += (int16_t) ((exp + (1 << 14)) >> 15); in lms_adapt_bg()
145 struct oslec_state *ec; in oslec_create() local
149 ec = kzalloc(sizeof(*ec), GFP_KERNEL); in oslec_create()
[all …]
/kernel/linux/linux-4.19/drivers/misc/echo/
Decho.c118 static inline void lms_adapt_bg(struct oslec_state *ec, int clean, int shift) in lms_adapt_bg() argument
134 offset2 = ec->curr_pos; in lms_adapt_bg()
135 offset1 = ec->taps - offset2; in lms_adapt_bg()
137 for (i = ec->taps - 1; i >= offset1; i--) { in lms_adapt_bg()
138 exp = (ec->fir_state_bg.history[i - offset1] * factor); in lms_adapt_bg()
139 ec->fir_taps16[1][i] += (int16_t) ((exp + (1 << 14)) >> 15); in lms_adapt_bg()
142 exp = (ec->fir_state_bg.history[i + offset2] * factor); in lms_adapt_bg()
143 ec->fir_taps16[1][i] += (int16_t) ((exp + (1 << 14)) >> 15); in lms_adapt_bg()
157 struct oslec_state *ec; in oslec_create() local
161 ec = kzalloc(sizeof(*ec), GFP_KERNEL); in oslec_create()
[all …]
/kernel/linux/linux-5.10/drivers/acpi/
Dec.c3 * ec.c - ACPI Embedded Controller Driver (v3)
17 #define pr_fmt(fmt) "ACPI: EC: " fmt
38 /* EC status register */
43 #define ACPI_EC_FLAG_SCI 0x20 /* EC-SCI occurred */
47 * This leads to lots of practical timing issues for the host EC driver.
48 * The following variations are defined (from the target EC firmware's
57 * kind of EC firmware has implemented an event queue and will
77 /* EC commands */
86 #define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */
88 #define ACPI_EC_UDELAY_POLL 550 /* Wait 1ms for EC transaction polling */
[all …]
/kernel/linux/linux-5.10/arch/arm/mach-rpc/
Decard.c58 ecard_t *ec; member
70 void (*init)(ecard_t *ec);
77 static void atomwide_3p_quirk(ecard_t *ec);
121 struct expansion_card *ec = req->ec; in ecard_task_reset() local
124 res = ec->slot_no == 8 in ecard_task_reset()
125 ? &ec->resource[ECARD_RES_MEMC] in ecard_task_reset()
126 : ec->easi in ecard_task_reset()
127 ? &ec->resource[ECARD_RES_EASI] in ecard_task_reset()
128 : &ec->resource[ECARD_RES_IOCSYNC]; in ecard_task_reset()
130 ecard_loader_reset(res->start, ec->loader); in ecard_task_reset()
[all …]
/kernel/linux/linux-4.19/arch/arm/mach-rpc/
Decard.c61 ecard_t *ec; member
120 struct expansion_card *ec = req->ec; in ecard_task_reset() local
123 res = ec->slot_no == 8 in ecard_task_reset()
124 ? &ec->resource[ECARD_RES_MEMC] in ecard_task_reset()
125 : ec->easi in ecard_task_reset()
126 ? &ec->resource[ECARD_RES_EASI] in ecard_task_reset()
127 : &ec->resource[ECARD_RES_IOCSYNC]; in ecard_task_reset()
129 ecard_loader_reset(res->start, ec->loader); in ecard_task_reset()
134 struct expansion_card *ec = req->ec; in ecard_task_readbytes() local
139 if (ec->slot_no == 8) { in ecard_task_readbytes()
[all …]
/kernel/linux/linux-4.19/drivers/acpi/
Dec.c2 * ec.c - ACPI Embedded Controller Driver (v3)
30 #define pr_fmt(fmt) "ACPI: EC: " fmt
51 /* EC status register */
56 #define ACPI_EC_FLAG_SCI 0x20 /* EC-SCI occurred */
60 * This leads to lots of practical timing issues for the host EC driver.
61 * The following variations are defined (from the target EC firmware's
70 * kind of EC firmware has implemented an event queue and will
90 /* EC commands */
99 #define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */
101 #define ACPI_EC_UDELAY_POLL 550 /* Wait 1ms for EC transaction polling */
[all …]
/kernel/linux/linux-5.10/drivers/md/
Ddm-ebs-target.c36 static inline sector_t __sector_to_block(struct ebs_c *ec, sector_t sector) in __sector_to_block() argument
38 return sector >> ec->block_shift; in __sector_to_block()
47 static inline unsigned int __nr_blocks(struct ebs_c *ec, struct bio *bio) in __nr_blocks() argument
49 sector_t end_sector = __block_mod(bio->bi_iter.bi_sector, ec->u_bs) + bio_sectors(bio); in __nr_blocks()
51 return __sector_to_block(ec, end_sector) + (__block_mod(end_sector, ec->u_bs) ? 1 : 0); in __nr_blocks()
64 static int __ebs_rw_bvec(struct ebs_c *ec, int rw, struct bio_vec *bv, struct bvec_iter *iter) in __ebs_rw_bvec() argument
70 unsigned int buf_off = to_bytes(__block_mod(iter->bi_sector, ec->u_bs)); in __ebs_rw_bvec()
71 sector_t block = __sector_to_block(ec, iter->bi_sector); in __ebs_rw_bvec()
81 cur_len = min(dm_bufio_get_block_size(ec->bufio) - buf_off, bv_len); in __ebs_rw_bvec()
84 if (rw == READ || buf_off || bv_len < dm_bufio_get_block_size(ec->bufio)) in __ebs_rw_bvec()
[all …]
/kernel/linux/linux-5.10/drivers/platform/chrome/wilco_ec/
Dcore.c7 * This is the entry point for the drivers that control the Wilco EC.
14 #include <linux/platform_data/wilco-ec.h>
19 #define DRV_NAME "wilco-ec"
40 struct wilco_ec_device *ec; in wilco_ec_probe() local
43 ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL); in wilco_ec_probe()
44 if (!ec) in wilco_ec_probe()
47 platform_set_drvdata(pdev, ec); in wilco_ec_probe()
48 ec->dev = dev; in wilco_ec_probe()
49 mutex_init(&ec->mailbox_lock); in wilco_ec_probe()
51 ec->data_size = sizeof(struct wilco_ec_response) + EC_MAILBOX_DATA_SIZE; in wilco_ec_probe()
[all …]
Dmailbox.c7 * The Wilco EC is similar to a typical ChromeOS embedded controller.
9 * protocol, but with some important differences. The EC firmware does
21 #include <linux/platform_data/wilco-ec.h>
32 /* Version of EC protocol */
41 /* EC response flags */
43 #define EC_CMDR_PENDING BIT(1) /* Write pending to EC */
44 #define EC_CMDR_BUSY BIT(2) /* EC is busy processing a command */
48 * wilco_ec_response_timed_out() - Wait for EC response.
49 * @ec: EC device.
51 * Return: true if EC timed out, false if EC did not time out.
[all …]
Dkeyboard_leds.c7 * Since the EC will never change the backlight level of its own accord,
14 #include <linux/platform_data/wilco-ec.h>
22 struct wilco_ec_device *ec; member
33 * struct wilco_keyboard_leds_msg - Message to/from EC for keyboard LED control.
35 * @status: Set by EC to 0 on success, 0xFF on failure.
55 static int send_kbbl_msg(struct wilco_ec_device *ec, in send_kbbl_msg() argument
69 ret = wilco_ec_mailbox(ec, &msg); in send_kbbl_msg()
71 dev_err(ec->dev, in send_kbbl_msg()
79 static int set_kbbl(struct wilco_ec_device *ec, enum led_brightness brightness) in set_kbbl() argument
91 ret = send_kbbl_msg(ec, &request, &response); in set_kbbl()
[all …]
/kernel/linux/linux-4.19/drivers/mfd/
Dcros_ec_dev.c31 #define DRV_NAME "cros-ec-dev"
51 static int ec_get_version(struct cros_ec_dev *ec, char *str, int maxlen) in ec_get_version() argument
65 msg->command = EC_CMD_GET_VERSION + ec->cmd_offset; in ec_get_version()
69 ret = cros_ec_cmd_xfer(ec->ec_dev, msg); in ec_get_version()
75 "%s\nUnknown EC version: EC returned %d\n", in ec_get_version()
95 static int cros_ec_check_features(struct cros_ec_dev *ec, int feature) in cros_ec_check_features() argument
100 if (ec->features[0] == -1U && ec->features[1] == -1U) { in cros_ec_check_features()
103 msg = kmalloc(sizeof(*msg) + sizeof(ec->features), GFP_KERNEL); in cros_ec_check_features()
108 msg->command = EC_CMD_GET_FEATURES + ec->cmd_offset; in cros_ec_check_features()
109 msg->insize = sizeof(ec->features); in cros_ec_check_features()
[all …]
/kernel/linux/linux-5.10/drivers/platform/olpc/
Dolpc-ec.c19 #include <linux/olpc-ec.h>
43 /* Pending EC commands */
50 * EC event mask to be applied during suspend (defining wakeup
56 * Running an EC command while suspending means we don't always finish
57 * the command before the machine suspends. This means that the EC
59 * of time (while the OS is asleep) the EC times out and restarts its
62 * the EC... and everyone's uphappy.
80 struct olpc_ec_priv *ec = container_of(w, struct olpc_ec_priv, worker); in olpc_ec_worker() local
85 spin_lock_irqsave(&ec->cmd_q_lock, flags); in olpc_ec_worker()
86 if (!list_empty(&ec->cmd_q)) { in olpc_ec_worker()
[all …]
/kernel/linux/linux-5.10/drivers/mfd/
Dcros_ec_dev.c19 #define DRV_NAME "cros-ec-dev"
74 { .name = "cros-ec-cec", },
78 { .name = "cros-ec-rtc", },
82 { .name = "cros-ec-sensorhub", },
113 { .name = "cros-ec-chardev", },
114 { .name = "cros-ec-debugfs", },
115 { .name = "cros-ec-lightbar", },
116 { .name = "cros-ec-sysfs", },
120 { .name = "cros-ec-vbc", }
134 struct cros_ec_dev *ec = kzalloc(sizeof(*ec), GFP_KERNEL); in ec_device_probe() local
[all …]
/kernel/linux/linux-4.19/drivers/platform/olpc/
Dolpc-ec.c19 #include <linux/olpc-ec.h>
39 /* Pending EC commands */
46 * Running an EC command while suspending means we don't always finish
47 * the command before the machine suspends. This means that the EC
49 * of time (while the OS is asleep) the EC times out and restarts its
52 * the EC... and everyone's uphappy.
70 struct olpc_ec_priv *ec = container_of(w, struct olpc_ec_priv, worker); in olpc_ec_worker() local
75 spin_lock_irqsave(&ec->cmd_q_lock, flags); in olpc_ec_worker()
76 if (!list_empty(&ec->cmd_q)) { in olpc_ec_worker()
77 desc = list_first_entry(&ec->cmd_q, struct ec_cmd_desc, node); in olpc_ec_worker()
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/mfd/
Dgoogle,cros-ec.yaml4 $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml#
15 Google's ChromeOS EC is a microcontroller which talks to the AP and
17 The EC can be connected through various interfaces (I2C, SPI, and others)
24 For implementations of the EC is connected through I2C.
25 const: google,cros-ec-i2c
27 For implementations of the EC is connected through SPI.
28 const: google,cros-ec-spi
30 For implementations of the EC is connected through RPMSG.
31 const: google,cros-ec-rpmsg
38 google,cros-ec-spi-pre-delay:
[all …]
/kernel/linux/linux-5.10/drivers/ide/
Dicside.c85 /* Prototype: icside_irqenable_arcin_v5 (struct expansion_card *ec, int irqnr)
88 static void icside_irqenable_arcin_v5 (struct expansion_card *ec, int irqnr) in icside_irqenable_arcin_v5() argument
90 struct icside_state *state = ec->irq_data; in icside_irqenable_arcin_v5()
95 /* Prototype: icside_irqdisable_arcin_v5 (struct expansion_card *ec, int irqnr)
98 static void icside_irqdisable_arcin_v5 (struct expansion_card *ec, int irqnr) in icside_irqdisable_arcin_v5() argument
100 struct icside_state *state = ec->irq_data; in icside_irqdisable_arcin_v5()
112 /* Prototype: icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr)
115 static void icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr) in icside_irqenable_arcin_v6() argument
117 struct icside_state *state = ec->irq_data; in icside_irqenable_arcin_v6()
134 /* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr)
[all …]
/kernel/linux/linux-4.19/drivers/ide/
Dicside.c84 /* Prototype: icside_irqenable_arcin_v5 (struct expansion_card *ec, int irqnr)
87 static void icside_irqenable_arcin_v5 (struct expansion_card *ec, int irqnr) in icside_irqenable_arcin_v5() argument
89 struct icside_state *state = ec->irq_data; in icside_irqenable_arcin_v5()
94 /* Prototype: icside_irqdisable_arcin_v5 (struct expansion_card *ec, int irqnr)
97 static void icside_irqdisable_arcin_v5 (struct expansion_card *ec, int irqnr) in icside_irqdisable_arcin_v5() argument
99 struct icside_state *state = ec->irq_data; in icside_irqdisable_arcin_v5()
111 /* Prototype: icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr)
114 static void icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr) in icside_irqenable_arcin_v6() argument
116 struct icside_state *state = ec->irq_data; in icside_irqenable_arcin_v6()
133 /* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr)
[all …]
/kernel/linux/linux-4.19/include/linux/mfd/
Dcros_ec.h2 * ChromeOS EC multi-function device
29 * The EC is unresponsive for a time after a reboot command. Add a
45 * Command interface between EC and AP, for LPC, I2C and SPI interfaces.
65 * @insize: Max number of bytes to accept from EC
66 * @result: EC's response to the command (separate from communication failure)
67 * @data: Where to put the incoming data from EC and outgoing data to EC
79 * struct cros_ec_device - Information about a ChromeOS EC device
85 * @cmd_readmem: direct read of the EC memory-mapped region, if supported
95 * @din: input buffer (for data from EC)
96 * @dout: output buffer (for data to EC)
[all …]
/kernel/linux/linux-5.10/drivers/platform/chrome/
Dcros_ec_sensorhub.c19 #define DRV_NAME "cros-ec-sensorhub"
54 struct cros_ec_dev *ec = sensorhub->ec; in cros_ec_sensorhub_register() local
67 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in cros_ec_sensorhub_register()
69 dev_warn(dev, "no info for EC sensor %d : %d/%d\n", in cros_ec_sensorhub_register()
76 name = "cros-ec-accel"; in cros_ec_sensorhub_register()
79 name = "cros-ec-baro"; in cros_ec_sensorhub_register()
82 name = "cros-ec-gyro"; in cros_ec_sensorhub_register()
85 name = "cros-ec-mag"; in cros_ec_sensorhub_register()
88 name = "cros-ec-prox"; in cros_ec_sensorhub_register()
91 name = "cros-ec-light"; in cros_ec_sensorhub_register()
[all …]
Dcros_ec_debugfs.c2 // Debug logs for the ChromeOS EC
20 #define DRV_NAME "cros-ec-debugfs"
29 * struct cros_ec_debugfs - EC debugging information.
31 * @ec: EC device this debugfs information belongs to
34 * @read_msg: preallocated EC command and buffer to read console log
37 * @log_poll_work: recurring task to poll EC for new console log data
41 struct cros_ec_dev *ec; member
43 /* EC log */
49 /* EC panicinfo */
54 * We need to make sure that the EC log buffer on the UART is large enough,
[all …]
/kernel/linux/linux-4.19/drivers/platform/chrome/
Dcros_ec_debugfs.c2 * cros_ec_debugfs - debug logs for Chrome OS EC
38 /* struct cros_ec_debugfs - ChromeOS EC debugging information
40 * @ec: EC device this debugfs information belongs to
43 * @read_msg: preallocated EC command and buffer to read console log
46 * @log_poll_work: recurring task to poll EC for new console log data
50 struct cros_ec_dev *ec; member
52 /* EC log */
58 /* EC panicinfo */
63 * We need to make sure that the EC log buffer on the UART is large enough,
72 struct cros_ec_dev *ec = debug_info->ec; in cros_ec_console_log_work() local
[all …]
/kernel/linux/linux-5.10/include/linux/platform_data/
Dwilco-ec.h15 #define WILCO_EC_FLAG_NO_RESPONSE BIT(0) /* EC does not respond */
31 * @data_buffer: Buffer used for EC communication. The same buffer
33 * @data_size: Size of the data buffer used for EC communication.
75 * @result: Result code from the EC. Non-zero indicates an error.
91 * @WILCO_EC_MSG_LEGACY: Legacy EC messages for standard EC behavior.
92 * @WILCO_EC_MSG_PROPERTY: Get/Set/Sync EC controlled NVRAM property.
93 * @WILCO_EC_MSG_TELEMETRY: Request telemetry data from the EC.
105 * @request_size: Number of bytes to send to the EC.
107 * @response_size: Number of bytes to read from EC.
121 * wilco_ec_mailbox() - Send request to the EC and receive the response.
[all …]
/kernel/linux/linux-5.10/crypto/
Dsm2.c63 static int sm2_ec_ctx_init(struct mpi_ec_ctx *ec) in sm2_ec_ctx_init() argument
83 ec->Q = mpi_point_new(0); in sm2_ec_ctx_init()
84 if (!ec->Q) in sm2_ec_ctx_init()
88 ec->G = mpi_point_new(0); in sm2_ec_ctx_init()
89 if (!ec->G) { in sm2_ec_ctx_init()
90 mpi_point_release(ec->Q); in sm2_ec_ctx_init()
94 mpi_set(ec->G->x, x); in sm2_ec_ctx_init()
95 mpi_set(ec->G->y, y); in sm2_ec_ctx_init()
96 mpi_set_ui(ec->G->z, 1); in sm2_ec_ctx_init()
99 ec->n = mpi_scanval(ecp->n); in sm2_ec_ctx_init()
[all …]
Djitterentropy.c131 * @ec [in] Reference to entropy collector
133 static void jent_apt_reset(struct rand_data *ec, unsigned int delta_masked) in jent_apt_reset() argument
136 ec->apt_count = 0; in jent_apt_reset()
137 ec->apt_base = delta_masked; in jent_apt_reset()
138 ec->apt_observations = 0; in jent_apt_reset()
144 * @ec [in] Reference to entropy collector
147 static void jent_apt_insert(struct rand_data *ec, unsigned int delta_masked) in jent_apt_insert() argument
150 if (!ec->apt_base_set) { in jent_apt_insert()
151 ec->apt_base = delta_masked; in jent_apt_insert()
152 ec->apt_base_set = 1; in jent_apt_insert()
[all …]
/kernel/linux/linux-4.19/drivers/edac/
Dmce_amd.c309 static bool f12h_mc0_mce(u16 ec, u8 xec) in f12h_mc0_mce() argument
313 if (MEM_ERROR(ec)) { in f12h_mc0_mce()
314 u8 ll = LL(ec); in f12h_mc0_mce()
320 pr_cont("Data/Tag %s error.\n", R4_MSG(ec)); in f12h_mc0_mce()
327 static bool f10h_mc0_mce(u16 ec, u8 xec) in f10h_mc0_mce() argument
329 if (R4(ec) == R4_GEN && LL(ec) == LL_L1) { in f10h_mc0_mce()
333 return f12h_mc0_mce(ec, xec); in f10h_mc0_mce()
336 static bool k8_mc0_mce(u16 ec, u8 xec) in k8_mc0_mce() argument
338 if (BUS_ERROR(ec)) { in k8_mc0_mce()
343 return f10h_mc0_mce(ec, xec); in k8_mc0_mce()
[all …]

12345678910>>...34