/linux/drivers/acpi/ |
H A D | ec.c | 3 * ec.c - ACPI Embedded Controller Driver (v3) 17 #define pr_fmt(fmt) "ACPI: EC: " fmt 40 /* EC status register */ 45 #define ACPI_EC_FLAG_SCI 0x20 /* EC-SCI occurred */ 49 * This leads to lots of practical timing issues for the host EC driver. 50 * The following variations are defined (from the target EC firmware's 59 * kind of EC firmware has implemented an event queue and will 79 /* EC commands */ 88 #define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */ 90 #define ACPI_EC_UDELAY_POLL 550 /* Wait 1ms for EC transaction polling */ [all …]
|
/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 in ecard_task_reset() 135 struct expansion_card *ec = req->ec; ecard_task_readbytes() local 312 ecard_readbytes(void * addr,ecard_t * ec,int off,int len,int useld) ecard_readbytes() argument 326 ecard_readchunk(struct in_chunk_dir * cd,ecard_t * ec,int id,int num) ecard_readchunk() argument 385 ecard_def_irq_enable(ecard_t * ec,int irqnr) ecard_def_irq_enable() argument 389 ecard_def_irq_disable(ecard_t * ec,int irqnr) ecard_def_irq_disable() argument 393 ecard_def_irq_pending(ecard_t * ec) ecard_def_irq_pending() argument 398 ecard_def_fiq_enable(ecard_t * ec,int fiqnr) ecard_def_fiq_enable() argument 403 ecard_def_fiq_disable(ecard_t * ec,int fiqnr) ecard_def_fiq_disable() argument 408 ecard_def_fiq_pending(ecard_t * ec) ecard_def_fiq_pending() argument 430 ecard_t *ec = irq_data_get_irq_chip_data(d); ecard_irq_unmask() local 446 ecard_t *ec = irq_data_get_irq_chip_data(d); ecard_irq_mask() local 466 ecard_t *ec = slot_to_ecard(fiqnr); ecard_enablefiq() local 482 ecard_t *ec = slot_to_ecard(fiqnr); ecard_disablefiq() local 495 ecard_t *ec; ecard_dump_irq_state() local 558 ecard_t *ec; ecard_irq_handler() local 584 __ecard_address(ecard_t * ec,card_type_t type,card_speed_t speed) __ecard_address() argument 625 ecard_prints(struct seq_file * m,ecard_t * ec) ecard_prints() argument 652 ecard_t *ec = cards; ecard_devices_proc_show() local 670 ec_set_resource(ec,nr,st,sz) global() argument 678 ecard_free_card(struct expansion_card * ec) ecard_free_card() argument 691 struct expansion_card *ec; ecard_alloc_card() local 755 struct expansion_card *ec = ECARD_DEV(dev); irq_show() local 762 struct expansion_card *ec = ECARD_DEV(dev); dma_show() local 769 struct expansion_card *ec = ECARD_DEV(dev); resource_show() local 785 struct expansion_card *ec = ECARD_DEV(dev); vendor_show() local 792 struct expansion_card *ec = ECARD_DEV(dev); device_show() local 799 struct expansion_card *ec = ECARD_DEV(dev); type_show() local 815 ecard_request_resources(struct expansion_card * ec) ecard_request_resources() argument 839 ecard_release_resources(struct expansion_card * ec) ecard_release_resources() argument 850 ecard_setirq(struct expansion_card * ec,const struct expansion_card_ops * ops,void * irq_data) ecard_setirq() argument 858 ecardm_iomap(struct expansion_card * ec,unsigned int res,unsigned long offset,unsigned long maxsize) ecardm_iomap() argument 875 atomwide_3p_quirk(ecard_t * ec) atomwide_3p_quirk() argument 894 ecard_t *ec; ecard_probe() local 1027 ecard_match_device(const struct ecard_id * ids,struct expansion_card * ec) ecard_match_device() argument 1041 struct expansion_card *ec = ECARD_DEV(dev); ecard_drv_probe() local 1057 struct expansion_card *ec = ECARD_DEV(dev); ecard_drv_remove() local 1080 struct expansion_card *ec = ECARD_DEV(dev); ecard_drv_shutdown() local 1114 struct expansion_card *ec = ECARD_DEV(_dev); ecard_match() local [all...] |
/linux/drivers/platform/chrome/wilco_ec/ |
H A D | core.c | 7 * This is the entry point for the drivers that control the Wilco EC. 15 #include <linux/platform_data/wilco-ec.h> 20 #define DRV_NAME "wilco-ec" 41 struct wilco_ec_device *ec; in wilco_ec_probe() local 44 ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL); in wilco_ec_probe() 45 if (!ec) in wilco_ec_probe() 48 platform_set_drvdata(pdev, ec); in wilco_ec_probe() 49 ec->dev = dev; in wilco_ec_probe() 50 mutex_init(&ec in wilco_ec_probe() 138 struct wilco_ec_device *ec = platform_get_drvdata(pdev); wilco_ec_remove() local [all...] |
H A D | mailbox.c | 7 * 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 devic 53 wilco_ec_response_timed_out(struct wilco_ec_device * ec) wilco_ec_response_timed_out() argument 115 wilco_ec_transfer(struct wilco_ec_device * ec,struct wilco_ec_message * msg,struct wilco_ec_request * rq) wilco_ec_transfer() argument 202 wilco_ec_mailbox(struct wilco_ec_device * ec,struct wilco_ec_message * msg) wilco_ec_mailbox() argument [all...] |
H A D | keyboard_leds.c | 7 * 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, in set_kbbl() 105 kbbl_exist(struct wilco_ec_device * ec,bool * exists) kbbl_exist() argument 134 kbbl_init(struct wilco_ec_device * ec) kbbl_init() argument 173 wilco_keyboard_leds_init(struct wilco_ec_device * ec) wilco_keyboard_leds_init() argument [all...] |
/linux/drivers/platform/arm64/ |
H A D | lenovo-yoga-c630.c | 38 static int yoga_c630_ec_request(struct yoga_c630_ec *ec, u8 *req, size_t req_len, in yoga_c630_ec_request() argument 43 lockdep_assert_held(&ec->lock); in yoga_c630_ec_request() 45 ret = i2c_smbus_write_i2c_block_data(ec->client, LENOVO_EC_REQUEST_REG, in yoga_c630_ec_request() 50 return i2c_smbus_read_i2c_block_data(ec->client, LENOVO_EC_RESPONSE_REG, in yoga_c630_ec_request() 54 int yoga_c630_ec_read8(struct yoga_c630_ec *ec, u8 addr) in yoga_c630_ec_read8() argument 60 guard(mutex)(&ec->lock); in yoga_c630_ec_read8() 63 ret = yoga_c630_ec_request(ec, req, sizeof(req), &val, 1); in yoga_c630_ec_read8() 71 int yoga_c630_ec_read16(struct yoga_c630_ec *ec, u8 addr) in yoga_c630_ec_read16() argument 82 guard(mutex)(&ec->lock); in yoga_c630_ec_read16() 85 ret = yoga_c630_ec_request(ec, re in yoga_c630_ec_read16() 98 yoga_c630_ec_ucsi_get_version(struct yoga_c630_ec * ec) yoga_c630_ec_ucsi_get_version() argument 121 yoga_c630_ec_ucsi_write(struct yoga_c630_ec * ec,const u8 req[YOGA_C630_UCSI_WRITE_SIZE]) yoga_c630_ec_ucsi_write() argument 135 yoga_c630_ec_ucsi_read(struct yoga_c630_ec * ec,u8 resp[YOGA_C630_UCSI_READ_SIZE]) yoga_c630_ec_ucsi_read() argument 152 struct yoga_c630_ec *ec = data; yoga_c630_ec_thread_intr() local 174 yoga_c630_ec_register_notify(struct yoga_c630_ec * ec,struct notifier_block * nb) yoga_c630_ec_register_notify() argument 188 yoga_c630_ec_unregister_notify(struct yoga_c630_ec * ec,struct notifier_block * nb) yoga_c630_ec_unregister_notify() argument 195 yoga_c630_aux_init(struct device * parent,const char * name,struct yoga_c630_ec * ec) yoga_c630_aux_init() argument 209 struct yoga_c630_ec *ec; yoga_c630_ec_probe() local [all...] |
H A D | huawei-gaokun-ec.c | 3 * huawei-gaokun-ec - An EC driver for HUAWEI Matebook E Go 19 #include <linux/platform_data/huawei-gaokun-ec.h> 118 struct mutex lock; /* EC transaction lock */ 125 static int gaokun_ec_request(struct gaokun_ec *ec, const u8 *req, in gaokun_ec_request() argument 128 struct i2c_client *client = ec->client; in gaokun_ec_request() 144 guard(mutex)(&ec->lock); in gaokun_ec_request() 153 dev_err(&client->dev, "EC transaction error %d\n", ret); in gaokun_ec_request() 165 * gaokun_ec_read - Read from EC 166 * @ec 182 gaokun_ec_read(struct gaokun_ec * ec,const u8 * req,size_t resp_len,u8 * resp) gaokun_ec_read() argument 199 gaokun_ec_write(struct gaokun_ec * ec,const u8 * req) gaokun_ec_write() argument 207 gaokun_ec_read_byte(struct gaokun_ec * ec,const u8 * req,u8 * byte) gaokun_ec_read_byte() argument 226 gaokun_ec_register_notify(struct gaokun_ec * ec,struct notifier_block * nb) gaokun_ec_register_notify() argument 240 gaokun_ec_unregister_notify(struct gaokun_ec * ec,struct notifier_block * nb) gaokun_ec_unregister_notify() argument 258 gaokun_ec_psy_multi_read(struct gaokun_ec * ec,u8 reg,size_t resp_len,u8 * resp) gaokun_ec_psy_multi_read() argument 286 gaokun_ec_psy_get_smart_charge(struct gaokun_ec * ec,u8 resp[GAOKUN_SMART_CHARGE_DATA_SIZE]) gaokun_ec_psy_get_smart_charge() argument 316 gaokun_ec_psy_set_smart_charge(struct gaokun_ec * ec,const u8 req[GAOKUN_SMART_CHARGE_DATA_SIZE]) gaokun_ec_psy_set_smart_charge() argument 341 gaokun_ec_psy_get_smart_charge_enable(struct gaokun_ec * ec,bool * on) gaokun_ec_psy_get_smart_charge_enable() argument 365 gaokun_ec_psy_set_smart_charge_enable(struct gaokun_ec * ec,bool on) gaokun_ec_psy_set_smart_charge_enable() argument 386 gaokun_ec_ucsi_read(struct gaokun_ec * ec,u8 resp[GAOKUN_UCSI_READ_SIZE]) gaokun_ec_ucsi_read() argument 411 gaokun_ec_ucsi_write(struct gaokun_ec * ec,const u8 req[GAOKUN_UCSI_WRITE_SIZE]) gaokun_ec_ucsi_write() argument 431 gaokun_ec_ucsi_get_reg(struct gaokun_ec * ec,struct gaokun_ucsi_reg * ureg) gaokun_ec_ucsi_get_reg() argument 456 gaokun_ec_ucsi_pan_ack(struct gaokun_ec * ec,int port_id) gaokun_ec_ucsi_pan_ack() argument 474 gaokun_ec_get_fn_lock(struct gaokun_ec * ec,bool * on) gaokun_ec_get_fn_lock() argument 495 gaokun_ec_set_fn_lock(struct gaokun_ec * ec,bool on) gaokun_ec_set_fn_lock() argument 508 struct gaokun_ec *ec = dev_get_drvdata(dev); fn_lock_show() local 523 struct gaokun_ec *ec = dev_get_drvdata(dev); fn_lock_store() local 555 gaokun_ec_get_temp(struct gaokun_ec * ec,u8 idx,long * temp) gaokun_ec_get_temp() argument 584 struct gaokun_ec *ec = dev_get_drvdata(dev); gaokun_ec_hwmon_read() local 622 struct gaokun_ec *ec = dev_get_drvdata(dev); gaokun_ec_suspend() local 640 struct gaokun_ec *ec = dev_get_drvdata(dev); gaokun_ec_resume() local 678 gaokun_aux_init(struct device * parent,const char * name,struct gaokun_ec * ec) gaokun_aux_init() argument 716 struct gaokun_ec *ec = data; gaokun_ec_irq_handler() local 746 struct gaokun_ec *ec; gaokun_ec_probe() local [all...] |
H A D | acer-aspire1-ec.c | 94 struct aspire_ec *ec = data; in aspire_ec_irq_handler() local 108 id = i2c_smbus_read_byte_data(ec->client, ASPIRE_EC_EVENT); in aspire_ec_irq_handler() 110 dev_err(&ec->client->dev, "Failed to read event id: %pe\n", ERR_PTR(id)); in aspire_ec_irq_handler() 124 aspire_ec_ram_read(ec->client, ASPIRE_EC_RAM_WATCHDOG, &tmp, sizeof(tmp)); in aspire_ec_irq_handler() 126 aspire_ec_ram_write(ec->client, ASPIRE_EC_RAM_WATCHDOG, tmp); in aspire_ec_irq_handler() 131 input_report_switch(ec->idev, SW_LID, 1); in aspire_ec_irq_handler() 132 input_sync(ec->idev); in aspire_ec_irq_handler() 137 input_report_switch(ec->idev, SW_LID, 0); in aspire_ec_irq_handler() 138 input_sync(ec->idev); in aspire_ec_irq_handler() 146 power_supply_changed(ec in aspire_ec_irq_handler() 234 struct aspire_ec *ec = power_supply_get_drvdata(psy); aspire_ec_bat_psy_get_property() local 337 struct aspire_ec *ec = power_supply_get_drvdata(psy); aspire_ec_adp_psy_get_property() local 377 struct aspire_ec *ec = container_of(work, struct aspire_ec, work); aspire_ec_bridge_update_hpd_work() local 389 struct aspire_ec *ec = container_of(bridge, struct aspire_ec, bridge); aspire_ec_bridge_hpd_enable() local 405 struct aspire_ec *ec = i2c_get_clientdata(to_i2c_client(dev)); fn_lock_show() local 416 struct aspire_ec *ec = i2c_get_clientdata(to_i2c_client(dev)); fn_lock_store() local 451 struct aspire_ec *ec; aspire_ec_probe() local 524 struct aspire_ec *ec = i2c_get_clientdata(to_i2c_client(dev)); aspire_ec_resume() local [all...] |
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | google,cros-ec.yaml | 4 $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# 14 Google's ChromeOS EC is a microcontroller which talks to the AP and 16 The EC can be connected through various interfaces (I2C, SPI, and others) 23 For implementations of the EC connected through I2C. 24 const: google,cros-ec-i2c 26 For implementations of the EC connected through SPI. 27 const: google,cros-ec-spi 31 - const: google,cros-ec-fp 32 - const: google,cros-ec-spi 34 For implementations of the EC connecte [all...] |
/linux/drivers/mfd/ |
H A D | cros_ec_dev.c | 20 #define DRV_NAME "cros-ec-dev" 74 { .name = "cros-ec-cec", }, 78 { .name = "cros-ec-gpio", }, 82 { .name = "cros-ec-rtc", }, 86 { .name = "cros-ec-sensorhub", }, 99 { .name = "cros-ec-wdt", } 103 { .name = "cros-ec-led", }, 162 { .name = "cros-ec-chardev", }, 163 { .name = "cros-ec-debugfs", }, 164 { .name = "cros-ec 191 struct cros_ec_dev *ec = kzalloc(sizeof(*ec), GFP_KERNEL); ec_device_probe() local 358 struct cros_ec_dev *ec = dev_get_drvdata(&pdev->dev); ec_device_remove() local [all...] |
/linux/drivers/platform/chrome/ |
H A D | cros_ec_sensorhub.c | 21 #define DRV_NAME "cros-ec-sensorhub" 57 struct cros_ec_dev *ec = sensorhub->ec; in cros_ec_sensorhub_register() local 72 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in cros_ec_sensorhub_register() 74 /* The EC is still busy initializing sensors. */ in cros_ec_sensorhub_register() 81 dev_err(dev, "no info for EC sensor %d : %d/%d\n", in cros_ec_sensorhub_register() 92 name = "cros-ec-accel"; in cros_ec_sensorhub_register() 95 name = "cros-ec-baro"; in cros_ec_sensorhub_register() 98 name = "cros-ec-gyro"; in cros_ec_sensorhub_register() 101 name = "cros-ec in cros_ec_sensorhub_register() 143 struct cros_ec_dev *ec = dev_get_drvdata(dev->parent); cros_ec_sensorhub_probe() local 244 struct cros_ec_dev *ec = sensorhub->ec; cros_ec_sensorhub_suspend() local 254 struct cros_ec_dev *ec = sensorhub->ec; cros_ec_sensorhub_resume() local [all...] |
H A D | cros_ec_proto.c | 2 // ChromeOS EC communication protocol helper functions 116 int (*xfer_fxn)(struct cros_ec_device *ec, struct cros_ec_command *msg); in cros_ec_xfer_command() 126 * the EC is trying to use protocol v2, on an underlying in cros_ec_xfer_command() 129 dev_err_once(ec_dev->dev, "missing EC transfer API, cannot send command\n"); in cros_ec_xfer_command() 153 /* Query the EC's status until it's no longer busy or we encounter an error. */ in cros_ec_wait_until_complete() 197 * This is used by all ChromeOS EC drivers to prepare the outgoing message 214 * @ec_dev: EC device. 217 * This is used by ChromeOS EC drivers to check the ec_msg->result for 248 * @ec_dev: EC device to call 321 * is not supported or EC i in cros_ec_rwsig_continue() 959 cros_ec_check_features(struct cros_ec_dev * ec,int feature) cros_ec_check_features() argument 988 cros_ec_get_sensor_count(struct cros_ec_dev * ec) cros_ec_get_sensor_count() argument [all...] |
H A D | cros_ec.c | 3 * ChromeOS EC multi-function device 7 * The ChromeOS EC multi function device is used to mux all the requests 8 * to the EC device for its multiple features: keyboard controller, 50 * cros_ec_handle_event() - process and forward pending events on EC 53 * Call this function in a loop when the kernel is notified that the EC has 145 "EC detected sleep transition timeout. Total sleep transitions: %d", in cros_ec_sleep_event() 172 * cros_ec_register() - Register a new ChromeOS EC, using the provided info. 191 ec_dev->ec = NULL; in cros_ec_register() 214 dev_err(dev, "Cannot identify the EC: error %d\n", err); in cros_ec_register() 223 "chromeos-ec", ec_de in cros_ec_register() [all...] |
/linux/crypto/ |
H A D | jitterentropy.c | 183 static void jent_apt_init(struct rand_data *ec, unsigned int osr) in jent_apt_init() argument 190 ec->apt_cutoff = jent_apt_cutoff_lookup[ in jent_apt_init() 192 ec->apt_cutoff_permanent = jent_apt_cutoff_permanent_lookup[ in jent_apt_init() 195 ec->apt_cutoff = jent_apt_cutoff_lookup[osr - 1]; in jent_apt_init() 196 ec->apt_cutoff_permanent = in jent_apt_init() 203 * @ec [in] Reference to entropy collector 205 static void jent_apt_reset(struct rand_data *ec, unsigned int delta_masked) in jent_apt_reset() argument 208 ec->apt_count = 0; in jent_apt_reset() 209 ec->apt_base = delta_masked; in jent_apt_reset() 210 ec in jent_apt_reset() 219 jent_apt_insert(struct rand_data * ec,unsigned int delta_masked) jent_apt_insert() argument 266 jent_rct_insert(struct rand_data * ec,int stuck) jent_rct_insert() argument 322 jent_stuck(struct rand_data * ec,__u64 current_delta) jent_stuck() argument 360 jent_health_failure(struct rand_data * ec) jent_health_failure() argument 423 jent_condition_data(struct rand_data * ec,__u64 time,int stuck) jent_condition_data() argument 466 jent_memaccess(struct rand_data * ec,__u64 loop_cnt) jent_memaccess() argument 520 jent_measure_jitter(struct rand_data * ec,__u64 * ret_current_delta) jent_measure_jitter() argument 557 jent_gen_entropy(struct rand_data * ec) jent_gen_entropy() argument 604 jent_read_entropy(struct rand_data * ec,unsigned char * data,unsigned int len) jent_read_entropy() argument 715 struct rand_data *ec = p_ec; jent_entropy_init() local [all...] |
/linux/Documentation/ABI/testing/ |
H A D | debugfs-cros-ec | 1 What: /sys/kernel/debug/<cros-ec-device>/console_log 5 If the EC supports the CONSOLE_READ command type, this file 6 can be used to grab the EC logs. The kernel polls for the log 10 What: /sys/kernel/debug/<cros-ec-device>/panicinfo 14 This file dumps the EC panic information from the previous 16 type is supported by the EC. 18 What: /sys/kernel/debug/<cros-ec-device>/pdinfo 27 What: /sys/kernel/debug/<cros-ec-device>/uptime 31 A u32 providing the time since EC booted in ms. This is 32 is used for synchronizing the AP host time with the EC [all...] |
/linux/include/linux/platform_data/ |
H A D | wilco-ec.h | 15 #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 [all...] |
H A D | cros_ec_proto.h | 29 * The EC is unresponsive for a time after a reboot command. Add a 50 * EC panic is not covered by the standard (0-F) ACPI notify values. 51 * Arbitrarily choosing B0 to notify ec panic, which is in the 84-BF 57 * Command interface between EC and AP, for LPC, I2C and SPI interfaces. 74 * struct cros_ec_command - Information about a ChromeOS EC command. 78 * @insize: Max number of bytes to accept from the EC. 79 * @result: EC's response to the command (separate from communication failure). 80 * @data: Where to put the incoming data from EC and outgoing data to EC. 92 * struct cros_ec_device - Information about a ChromeOS EC devic 202 struct platform_device *ec; global() member [all...] |
H A D | huawei-gaokun-ec.h | 33 int gaokun_ec_register_notify(struct gaokun_ec *ec, 35 void gaokun_ec_unregister_notify(struct gaokun_ec *ec, 38 int gaokun_ec_read(struct gaokun_ec *ec, const u8 *req, 40 int gaokun_ec_write(struct gaokun_ec *ec, const u8 *req); 41 int gaokun_ec_read_byte(struct gaokun_ec *ec, const u8 *req, u8 *byte); 46 int gaokun_ec_psy_multi_read(struct gaokun_ec *ec, u8 reg, 49 static inline int gaokun_ec_psy_read_byte(struct gaokun_ec *ec, in gaokun_ec_psy_read_byte() argument 52 return gaokun_ec_psy_multi_read(ec, reg, sizeof(*byte), byte); in gaokun_ec_psy_read_byte() 55 static inline int gaokun_ec_psy_read_word(struct gaokun_ec *ec, in gaokun_ec_psy_read_word() argument 58 return gaokun_ec_psy_multi_read(ec, re in gaokun_ec_psy_read_word() [all...] |
/linux/drivers/edac/ |
H A D | mce_amd.c | 147 static bool f12h_mc0_mce(u16 ec, u8 xec) in f12h_mc0_mce() argument 151 if (MEM_ERROR(ec)) { in f12h_mc0_mce() 152 u8 ll = LL(ec); in f12h_mc0_mce() 158 pr_cont("Data/Tag %s error.\n", R4_MSG(ec)); in f12h_mc0_mce() 165 static bool f10h_mc0_mce(u16 ec, u8 xec) in f10h_mc0_mce() argument 167 if (R4(ec) == R4_GEN && LL(ec) == LL_L1) { in f10h_mc0_mce() 171 return f12h_mc0_mce(ec, xec); in f10h_mc0_mce() 174 static bool k8_mc0_mce(u16 ec, u8 xec) in k8_mc0_mce() argument 176 if (BUS_ERROR(ec)) { in k8_mc0_mce() 184 cat_mc0_mce(u16 ec,u8 xec) cat_mc0_mce() argument 236 f15h_mc0_mce(u16 ec,u8 xec) f15h_mc0_mce() argument 291 u16 ec = EC(m->status); decode_mc0_mce() local 310 k8_mc1_mce(u16 ec,u8 xec) k8_mc1_mce() argument 344 cat_mc1_mce(u16 ec,u8 xec) cat_mc1_mce() argument 369 f15h_mc1_mce(u16 ec,u8 xec) f15h_mc1_mce() argument 401 u16 ec = EC(m->status); decode_mc1_mce() local 429 k8_mc2_mce(u16 ec,u8 xec) k8_mc2_mce() argument 465 f15h_mc2_mce(u16 ec,u8 xec) f15h_mc2_mce() argument 504 f16h_mc2_mce(u16 ec,u8 xec) f16h_mc2_mce() argument 547 u16 ec = EC(m->status); decode_mc2_mce() local 558 u16 ec = EC(m->status); decode_mc3_mce() local 589 u16 ec = EC(m->status); decode_mc4_mce() local 646 u16 ec = EC(m->status); decode_mc5_mce() local 753 amd_decode_err_code(u16 ec) amd_decode_err_code() argument [all...] |
/linux/drivers/ata/ |
H A D | pata_icside.c | 64 struct expansion_card *ec; member 83 /* Prototype: pata_icside_irqenable_arcin_v5 (struct expansion_card *ec, int irqnr) 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() 93 /* Prototype: pata_icside_irqdisable_arcin_v5 (struct expansion_card *ec, int irqnr) 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() 110 /* Prototype: pata_icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr) 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 in pata_icside_irqenable_arcin_v6() 127 pata_icside_irqdisable_arcin_v6(struct expansion_card * ec,int irqnr) pata_icside_irqdisable_arcin_v6() argument 138 pata_icside_irqpending_arcin_v6(struct expansion_card * ec) pata_icside_irqpending_arcin_v6() argument 284 struct expansion_card *ec = info->ec; icside_dma_init() local 400 struct expansion_card *ec = info->ec; pata_icside_register_v6() local 442 struct expansion_card *ec = info->ec; pata_icside_add_ports() local 480 pata_icside_probe(struct expansion_card * ec,const struct ecard_id * id) pata_icside_probe() argument 555 pata_icside_shutdown(struct expansion_card * ec) pata_icside_shutdown() argument 581 pata_icside_remove(struct expansion_card * ec) pata_icside_remove() argument [all...] |
/linux/drivers/pwm/ |
H A D | pwm-cros-ec.c | 3 * Expose a PWM controlled by the ChromeOS EC to the host processor. 19 * struct cros_ec_pwm_device - Driver data for EC PWM 21 * @ec: Pointer to EC device 25 struct cros_ec_device *ec; member 51 struct cros_ec_device *ec = ec_pwm->ec; in cros_ec_pwm_set_duty() local 72 dev_err(ec->dev, "Invalid PWM type index: %d\n", index); in cros_ec_pwm_set_duty() 81 return cros_ec_cmd_xfer_status(ec, msg); in cros_ec_pwm_set_duty() 84 static int cros_ec_pwm_get_duty(struct cros_ec_device *ec, boo argument 181 cros_ec_num_pwms(struct cros_ec_device * ec) cros_ec_num_pwms() argument 215 struct cros_ec_device *ec = dev_get_drvdata(pdev->dev.parent); cros_ec_pwm_probe() local [all...] |
/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) argument 132 ecard_resource_len(ec,nr) global() argument 134 ecard_resource_flags(ec,nr) global() argument 213 ecard_set_drvdata(ec,data) global() argument 214 ecard_get_drvdata(ec) global() argument [all...] |
/linux/drivers/scsi/arm/ |
H A D | powertec.c | 62 struct expansion_card *ec; member 68 /* Prototype: void powertecscsi_irqenable(ec, irqnr) 70 * Params : ec - expansion card structure 74 powertecscsi_irqenable(struct expansion_card *ec, int irqnr) in powertecscsi_irqenable() argument 76 struct powertec_info *info = ec->irq_data; in powertecscsi_irqenable() 80 /* Prototype: void powertecscsi_irqdisable(ec, irqnr) 82 * Params : ec - expansion card structure 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 in powertecscsi_info() 260 struct expansion_card *ec = ECARD_DEV(dev); powertecscsi_show_term() local 270 struct expansion_card *ec = ECARD_DEV(dev); powertecscsi_store_term() local 302 powertecscsi_probe(struct expansion_card * ec,const struct ecard_id * id) powertecscsi_probe() argument 402 powertecscsi_remove(struct expansion_card * ec) powertecscsi_remove() argument [all...] |
/linux/arch/x86/platform/olpc/ |
H A D | olpc.c | 3 * Support for the OLPC DCON and OLPC EC access 19 #include <linux/olpc-ec.h> 32 /* the timeout that bugs in the EC might force us to actually use */ 39 printk(KERN_ERR "olpc-ec: invalid argument to " in olpc_ec_timeout_set() 42 printk(KERN_DEBUG "olpc-ec: using %d ms delay for EC commands.\n", in olpc_ec_timeout_set() 75 printk(KERN_WARNING "olpc-ec: %d: waited %u ms for IBF!\n", in __wait_on_ibf() 95 printk(KERN_WARNING "olpc-ec: %d: waited %u ms for OBF!\n", in __wait_on_obf() 103 * This allows the kernel to run Embedded Controller commands. The EC is 105 * available EC command [all...] |
/linux/Documentation/devicetree/bindings/sound/ |
H A D | google,cros-ec-codec.yaml | 4 $id: http://devicetree.org/schemas/sound/google,cros-ec-codec.yaml# 7 title: Audio codec controlled by ChromeOS EC 14 Google's ChromeOS EC codec is a digital mic codec provided by the 15 Embedded Controller (EC) and is controlled via a host-command 16 interface. An EC codec node should only be found inside the "codecs" 17 subnode of a cros-ec node. 18 (see Documentation/devicetree/bindings/mfd/google,cros-ec.yaml). 25 const: google,cros-ec-codec 33 Physical base address and length of shared memory region from EC. 41 Shared memory region to EC [all...] |