/openbmc/linux/drivers/misc/echo/ |
H A D | echo.c | 106 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 …]
|
/openbmc/linux/drivers/acpi/ |
H A D | ec.c | 168 struct acpi_ec *ec; member 171 static int acpi_ec_submit_query(struct acpi_ec *ec); 172 static void advance_transaction(struct acpi_ec *ec, bool interrupt); 228 #define ec_dbg_ref(ec, fmt, ...) \ argument 229 ec_dbg_raw("%lu: " fmt, ec->reference_count, ## __VA_ARGS__) 235 static bool acpi_ec_started(struct acpi_ec *ec) in acpi_ec_started() argument 237 return test_bit(EC_FLAGS_STARTED, &ec->flags) && in acpi_ec_started() 238 !test_bit(EC_FLAGS_STOPPED, &ec->flags); in acpi_ec_started() 241 static bool acpi_ec_event_enabled(struct acpi_ec *ec) in acpi_ec_event_enabled() argument 248 if (!test_bit(EC_FLAGS_QUERY_ENABLED, &ec->flags)) in acpi_ec_event_enabled() [all …]
|
/openbmc/linux/arch/arm/mach-rpc/ |
H A D | ecard.c | 58 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 …]
|
/openbmc/linux/crypto/ |
H A D | jitterentropy.c | 155 static void jent_apt_reset(struct rand_data *ec, unsigned int delta_masked) in jent_apt_reset() argument 158 ec->apt_count = 0; in jent_apt_reset() 159 ec->apt_base = delta_masked; in jent_apt_reset() 160 ec->apt_observations = 0; in jent_apt_reset() 169 static void jent_apt_insert(struct rand_data *ec, unsigned int delta_masked) in jent_apt_insert() argument 172 if (!ec->apt_base_set) { in jent_apt_insert() 173 ec->apt_base = delta_masked; in jent_apt_insert() 174 ec->apt_base_set = 1; in jent_apt_insert() 178 if (delta_masked == ec->apt_base) in jent_apt_insert() 179 ec->apt_count++; in jent_apt_insert() [all …]
|
H A D | sm2.c | 66 static int __sm2_set_pub_key(struct mpi_ec_ctx *ec, 69 static int sm2_ec_ctx_init(struct mpi_ec_ctx *ec) in sm2_ec_ctx_init() argument 89 ec->Q = mpi_point_new(0); in sm2_ec_ctx_init() 90 if (!ec->Q) in sm2_ec_ctx_init() 94 ec->G = mpi_point_new(0); in sm2_ec_ctx_init() 95 if (!ec->G) { in sm2_ec_ctx_init() 96 mpi_point_release(ec->Q); in sm2_ec_ctx_init() 100 mpi_set(ec->G->x, x); in sm2_ec_ctx_init() 101 mpi_set(ec->G->y, y); in sm2_ec_ctx_init() 102 mpi_set_ui(ec->G->z, 1); in sm2_ec_ctx_init() [all …]
|
/openbmc/linux/drivers/md/ |
H A D | dm-ebs-target.c | 37 static inline sector_t __sector_to_block(struct ebs_c *ec, sector_t sector) in __sector_to_block() argument 39 return sector >> ec->block_shift; in __sector_to_block() 48 static inline unsigned int __nr_blocks(struct ebs_c *ec, struct bio *bio) in __nr_blocks() argument 50 sector_t end_sector = __block_mod(bio->bi_iter.bi_sector, ec->u_bs) + bio_sectors(bio); in __nr_blocks() 52 return __sector_to_block(ec, end_sector) + (__block_mod(end_sector, ec->u_bs) ? 1 : 0); in __nr_blocks() 65 static int __ebs_rw_bvec(struct ebs_c *ec, enum req_op op, struct bio_vec *bv, in __ebs_rw_bvec() argument 72 unsigned int buf_off = to_bytes(__block_mod(iter->bi_sector, ec->u_bs)); in __ebs_rw_bvec() 73 sector_t block = __sector_to_block(ec, iter->bi_sector); in __ebs_rw_bvec() 83 cur_len = min(dm_bufio_get_block_size(ec->bufio) - buf_off, bv_len); in __ebs_rw_bvec() 86 if (op == REQ_OP_READ || buf_off || bv_len < dm_bufio_get_block_size(ec->bufio)) in __ebs_rw_bvec() [all …]
|
/openbmc/linux/drivers/platform/chrome/wilco_ec/ |
H A D | core.c | 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() 52 ec->data_buffer = devm_kzalloc(dev, ec->data_size, GFP_KERNEL); in wilco_ec_probe() 53 if (!ec->data_buffer) in wilco_ec_probe() 57 ec->io_data = wilco_get_resource(pdev, 0); /* Host Data */ in wilco_ec_probe() [all …]
|
H A D | keyboard_leds.c | 22 struct wilco_ec_device *ec; member 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() 96 dev_err(ec->dev, in set_kbbl() 105 static int kbbl_exist(struct wilco_ec_device *ec, bool *exists) in kbbl_exist() argument 115 ret = send_kbbl_msg(ec, &request, &response); in kbbl_exist() 134 static int kbbl_init(struct wilco_ec_device *ec) in kbbl_init() argument [all …]
|
H A D | mailbox.c | 53 static bool wilco_ec_response_timed_out(struct wilco_ec_device *ec) in wilco_ec_response_timed_out() argument 58 if (!(inb(ec->io_command->start) & in wilco_ec_response_timed_out() 115 static int wilco_ec_transfer(struct wilco_ec_device *ec, in wilco_ec_transfer() argument 129 outb(EC_MAILBOX_START_COMMAND, ec->io_command->start); in wilco_ec_transfer() 133 dev_dbg(ec->dev, "EC does not respond to this command\n"); in wilco_ec_transfer() 138 if (wilco_ec_response_timed_out(ec)) { in wilco_ec_transfer() 139 dev_dbg(ec->dev, "response timed out\n"); in wilco_ec_transfer() 144 flag = inb(ec->io_data->start); in wilco_ec_transfer() 146 dev_dbg(ec->dev, "bad response: 0x%02x\n", flag); in wilco_ec_transfer() 151 rs = ec->data_buffer; in wilco_ec_transfer() [all …]
|
/openbmc/u-boot/drivers/misc/ |
H A D | cros_ec_sandbox.c | 99 struct ec_state *ec = &s_state; in cros_ec_read_state() local 104 ec->current_image = EC_IMAGE_RO; in cros_ec_read_state() 109 ec->current_image = fdtdec_get_int(blob, node, "current-image", in cros_ec_read_state() 112 if (prop && len == sizeof(ec->vbnv_context)) in cros_ec_read_state() 113 memcpy(ec->vbnv_context, prop, len); in cros_ec_read_state() 117 ec->flash_data_len = len; in cros_ec_read_state() 118 ec->flash_data = os_malloc(len); in cros_ec_read_state() 119 if (!ec->flash_data) in cros_ec_read_state() 121 memcpy(ec->flash_data, prop, len); in cros_ec_read_state() 139 struct ec_state *ec = g_state; in cros_ec_write_state() local [all …]
|
/openbmc/linux/drivers/platform/olpc/ |
H A D | olpc-ec.c | 79 struct olpc_ec_priv *ec = container_of(w, struct olpc_ec_priv, worker); in olpc_ec_worker() local 84 spin_lock_irqsave(&ec->cmd_q_lock, flags); in olpc_ec_worker() 85 if (!list_empty(&ec->cmd_q)) { in olpc_ec_worker() 86 desc = list_first_entry(&ec->cmd_q, struct ec_cmd_desc, node); in olpc_ec_worker() 89 spin_unlock_irqrestore(&ec->cmd_q_lock, flags); in olpc_ec_worker() 96 mutex_lock(&ec->cmd_lock); in olpc_ec_worker() 99 mutex_unlock(&ec->cmd_lock); in olpc_ec_worker() 105 schedule_work(&ec->worker); in olpc_ec_worker() 113 struct olpc_ec_priv *ec) in queue_ec_descriptor() argument 119 spin_lock_irqsave(&ec->cmd_q_lock, flags); in queue_ec_descriptor() [all …]
|
/openbmc/linux/drivers/edac/ |
H A D | mce_amd.c | 622 static bool f12h_mc0_mce(u16 ec, u8 xec) in f12h_mc0_mce() argument 626 if (MEM_ERROR(ec)) { in f12h_mc0_mce() 627 u8 ll = LL(ec); in f12h_mc0_mce() 633 pr_cont("Data/Tag %s error.\n", R4_MSG(ec)); in f12h_mc0_mce() 640 static bool f10h_mc0_mce(u16 ec, u8 xec) in f10h_mc0_mce() argument 642 if (R4(ec) == R4_GEN && LL(ec) == LL_L1) { in f10h_mc0_mce() 646 return f12h_mc0_mce(ec, xec); in f10h_mc0_mce() 649 static bool k8_mc0_mce(u16 ec, u8 xec) in k8_mc0_mce() argument 651 if (BUS_ERROR(ec)) { in k8_mc0_mce() 656 return f10h_mc0_mce(ec, xec); in k8_mc0_mce() [all …]
|
/openbmc/linux/drivers/mfd/ |
H A D | cros_ec_dev.c | 141 struct cros_ec_dev *ec = kzalloc(sizeof(*ec), GFP_KERNEL); in ec_device_probe() local 145 if (!ec) in ec_device_probe() 148 dev_set_drvdata(dev, ec); in ec_device_probe() 149 ec->ec_dev = dev_get_drvdata(dev->parent); in ec_device_probe() 150 ec->dev = dev; in ec_device_probe() 151 ec->cmd_offset = ec_platform->cmd_offset; in ec_device_probe() 152 ec->features.flags[0] = -1U; /* Not cached yet */ in ec_device_probe() 153 ec->features.flags[1] = -1U; /* Not cached yet */ in ec_device_probe() 154 device_initialize(&ec->class_dev); in ec_device_probe() 161 if (cros_ec_check_features(ec, cros_mcu_devices[i].id)) { in ec_device_probe() [all …]
|
H A D | ntxec.c | 150 struct ntxec *ec; in ntxec_probe() local 156 ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL); in ntxec_probe() 157 if (!ec) in ntxec_probe() 160 ec->dev = &client->dev; in ntxec_probe() 162 ec->regmap = devm_regmap_init_i2c(client, ®map_config); in ntxec_probe() 163 if (IS_ERR(ec->regmap)) { in ntxec_probe() 164 dev_err(ec->dev, "Failed to set up regmap for device\n"); in ntxec_probe() 165 return PTR_ERR(ec->regmap); in ntxec_probe() 169 res = regmap_read(ec->regmap, NTXEC_REG_VERSION, &version); in ntxec_probe() 171 dev_err(ec->dev, "Failed to read firmware version number\n"); in ntxec_probe() [all …]
|
/openbmc/service-config-manager/src/ |
H A D | utils.cpp | 18 void checkAndThrowInternalFailure(boost::system::error_code& ec, in checkAndThrowInternalFailure() argument 21 if (ec) in checkAndThrowInternalFailure() 23 std::string msgToLog = ec.message() + (msg.empty() ? "" : " - " + msg); in checkAndThrowInternalFailure() 35 boost::system::error_code ec; in systemdDaemonReload() local 36 conn->yield_method_call<>(yield, ec, sysdService, sysdObjPath, sysdMgrIntf, in systemdDaemonReload() 38 checkAndThrowInternalFailure(ec, "daemon-reload operation failed"); in systemdDaemonReload() 59 boost::system::error_code ec; in systemdUnitAction() local 61 yield, ec, sysdService, sysdObjPath, sysdMgrIntf, actionMethod, in systemdUnitAction() 63 checkAndThrowInternalFailure(ec, in systemdUnitAction() 71 ec.clear(); in systemdUnitAction() [all …]
|
/openbmc/linux/arch/arm/include/asm/ |
H A D | ecard.h | 113 void (*irqenable)(ecard_t *ec, int irqnr); 114 void (*irqdisable)(ecard_t *ec, int irqnr); 115 int (*irqpending)(ecard_t *ec); 116 void (*fiqenable)(ecard_t *ec, int fiqnr); 117 void (*fiqdisable)(ecard_t *ec, int fiqnr); 118 int (*fiqpending)(ecard_t *ec); 130 #define ecard_resource_start(ec,nr) ((ec)->resource[nr].start) argument 131 #define ecard_resource_end(ec,nr) ((ec)->resource[nr].end) argument 132 #define ecard_resource_len(ec,nr) ((ec)->resource[nr].end - \ argument 133 (ec)->resource[nr].start + 1) [all …]
|
/openbmc/linux/drivers/ata/ |
H A D | pata_icside.c | 64 struct expansion_card *ec; member 86 static void pata_icside_irqenable_arcin_v5 (struct expansion_card *ec, int irqnr) in pata_icside_irqenable_arcin_v5() argument 88 struct pata_icside_state *state = ec->irq_data; in pata_icside_irqenable_arcin_v5() 96 static void pata_icside_irqdisable_arcin_v5 (struct expansion_card *ec, int irqnr) in pata_icside_irqdisable_arcin_v5() argument 98 struct pata_icside_state *state = ec->irq_data; in pata_icside_irqdisable_arcin_v5() 113 static void pata_icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr) in pata_icside_irqenable_arcin_v6() argument 115 struct pata_icside_state *state = ec->irq_data; in pata_icside_irqenable_arcin_v6() 127 static void pata_icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr) in pata_icside_irqdisable_arcin_v6() argument 129 struct pata_icside_state *state = ec->irq_data; in pata_icside_irqdisable_arcin_v6() 138 static int pata_icside_irqpending_arcin_v6(struct expansion_card *ec) in pata_icside_irqpending_arcin_v6() argument [all …]
|
/openbmc/linux/drivers/scsi/arm/ |
H A D | powertec.c | 62 struct expansion_card *ec; member 74 powertecscsi_irqenable(struct expansion_card *ec, int irqnr) in powertecscsi_irqenable() argument 76 struct powertec_info *info = ec->irq_data; in powertecscsi_irqenable() 86 powertecscsi_irqdisable(struct expansion_card *ec, int irqnr) in powertecscsi_irqdisable() argument 88 struct powertec_info *info = ec->irq_data; in powertecscsi_irqdisable() 193 host->hostt->name, info->info.scsi.type, info->ec->slot_no, in powertecscsi_info() 260 struct expansion_card *ec = ECARD_DEV(dev); in powertecscsi_show_term() local 261 struct Scsi_Host *host = ecard_get_drvdata(ec); in powertecscsi_show_term() 270 struct expansion_card *ec = ECARD_DEV(dev); in powertecscsi_store_term() local 271 struct Scsi_Host *host = ecard_get_drvdata(ec); in powertecscsi_store_term() [all …]
|
/openbmc/sdbusplus/example/ |
H A D | asio-example.cpp | 30 boost::system::error_code ec; in fooYield() local 33 yield, ec, "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test", in fooYield() 35 if (ec || testCount != (test + 1)) in fooYield() 37 std::cout << "call to foo failed: ec = " << ec << '\n'; in fooYield() 61 boost::system::error_code ec; in do_start_async_method_call_one() local 64 yield, ec, "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test", in do_start_async_method_call_one() 68 yield, ec, "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test", in do_start_async_method_call_one() 71 if (!ec && std::get<int>(testValue) == 24) in do_start_async_method_call_one() 77 std::cout << "ec = " << ec << ": " << std::get<int>(testValue) << "\n"; in do_start_async_method_call_one() 80 yield, ec, "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test", in do_start_async_method_call_one() [all …]
|
/openbmc/telemetry/tests/src/ |
H A D | test_trigger_manager.cpp | 39 [&addTriggerPromise](boost::system::error_code ec, in addTrigger() 41 addTriggerPromise.set_value({ec, path}); in addTrigger() 84 auto [ec, path] = addTrigger(TriggerParams()); in TEST_F() 85 EXPECT_THAT(ec.value(), Eq(boost::system::errc::success)); in TEST_F() 99 auto [ec, path] = addTrigger(triggerParamsDiscrete); in TEST_F() 100 EXPECT_THAT(ec.value(), Eq(boost::system::errc::success)); in TEST_F() 111 auto [ec, path] = addTrigger(triggerParamsDiscrete); in TEST_F() 112 EXPECT_THAT(ec.value(), Eq(boost::system::errc::success)); in TEST_F() 123 auto [ec, path] = addTrigger(TriggerParams()); in TEST_F() 124 EXPECT_THAT(ec.value(), Eq(boost::system::errc::file_exists)); in TEST_F() [all …]
|
/openbmc/phosphor-bmc-code-mgmt/bmc/ |
H A D | serialize.cpp | 28 std::error_code ec; in storePriority() local 30 if (!fs::is_directory(path, ec)) in storePriority() 32 if (fs::exists(path, ec)) in storePriority() 36 fs::remove_all(path, ec); in storePriority() 38 fs::create_directories(path, ec); in storePriority() 49 std::error_code ec; in storePurpose() local 51 if (!fs::is_directory(path, ec)) in storePurpose() 53 if (fs::exists(path, ec)) in storePurpose() 57 fs::remove_all(path, ec); in storePurpose() 59 fs::create_directories(path, ec); in storePurpose() [all …]
|
/openbmc/linux/drivers/platform/chrome/ |
H A D | cros_ec_sensorhub.c | 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() 110 ec->has_kb_wake_angle = true; in cros_ec_sensorhub_register() 112 if (cros_ec_check_features(ec, in cros_ec_sensorhub_register() 127 struct cros_ec_dev *ec = dev_get_drvdata(dev->parent); in cros_ec_sensorhub_probe() local 134 ec->ec_dev->max_response), GFP_KERNEL); in cros_ec_sensorhub_probe() 138 msg->command = EC_CMD_MOTION_SENSE_CMD + ec->cmd_offset; in cros_ec_sensorhub_probe() 147 data->ec = ec; in cros_ec_sensorhub_probe() 155 if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE)) { in cros_ec_sensorhub_probe() 156 sensor_num = cros_ec_get_sensor_count(ec); in cros_ec_sensorhub_probe() [all …]
|
H A D | cros_ec_debugfs.c | 45 struct cros_ec_dev *ec; member 67 struct cros_ec_dev *ec = debug_info->ec; in cros_ec_console_log_work() local 70 .command = EC_CMD_CONSOLE_SNAPSHOT + ec->cmd_offset, in cros_ec_console_log_work() 80 ret = cros_ec_cmd_xfer_status(ec->ec_dev, &snapshot_msg); in cros_ec_console_log_work() 90 dev_info_once(ec->dev, in cros_ec_console_log_work() 97 ret = cros_ec_cmd_xfer_status(ec->ec_dev, in cros_ec_console_log_work() 204 struct cros_ec_device *ec_dev = debug_info->ec->ec_dev; in cros_ec_pdinfo_read() 272 struct cros_ec_device *ec_dev = debug_info->ec->ec_dev; in cros_ec_uptime_read() 319 static int ec_read_version_supported(struct cros_ec_dev *ec) in ec_read_version_supported() argument 333 msg->command = EC_CMD_GET_CMD_VERSIONS + ec->cmd_offset; in ec_read_version_supported() [all …]
|
/openbmc/bmcweb/redfish-core/lib/ |
H A D | power_supply.hpp | 69 const std::string& chassisId, const boost::system::error_code& ec, in doPowerSupplyCollection() argument 72 if (ec) in doPowerSupplyCollection() 74 if (ec.value() != EBADR) in doPowerSupplyCollection() 76 BMCWEB_LOG_ERROR("DBUS response error{}", ec.value()); in doPowerSupplyCollection() 142 const boost::system::error_code& ec, in handlePowerSupplyCollectionGet() 144 doPowerSupplyCollection(asyncResp, chassisId, ec, subtreePaths); in handlePowerSupplyCollectionGet() 163 const std::string& powerSupplyId, const boost::system::error_code& ec, in afterGetValidPowerSupplyPath() argument 168 if (ec) in afterGetValidPowerSupplyPath() 170 if (ec.value() != EBADR) in afterGetValidPowerSupplyPath() 172 BMCWEB_LOG_ERROR("DBUS response error{}", ec.value()); in afterGetValidPowerSupplyPath() [all …]
|
/openbmc/linux/drivers/iio/proximity/ |
H A D | cros_ec_mkbp_proximity.c | 27 struct cros_ec_device *ec; member 103 struct cros_ec_device *ec = data->ec; in cros_ec_mkbp_proximity_push_event() local 108 timestamp = ktime_to_ns(ec->last_event_time); in cros_ec_mkbp_proximity_push_event() 127 struct cros_ec_device *ec = _ec; in cros_ec_mkbp_proximity_notify() local 128 u8 event_type = ec->event_data.event_type & EC_MKBP_EVENT_TYPE_MASK; in cros_ec_mkbp_proximity_notify() 136 switches = &ec->event_data.data.switches; in cros_ec_mkbp_proximity_notify() 149 struct cros_ec_device *ec = data->ec; in cros_ec_mkbp_proximity_read_raw() local 152 return cros_ec_mkbp_proximity_query(ec, val); in cros_ec_mkbp_proximity_read_raw() 190 struct cros_ec_device *ec = data->ec; in cros_ec_mkbp_proximity_resume() local 193 ret = cros_ec_mkbp_proximity_query(ec, &state); in cros_ec_mkbp_proximity_resume() [all …]
|