Lines Matching full:ec
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-mag"; in cros_ec_sensorhub_register()
104 name = "cros-ec-prox"; in cros_ec_sensorhub_register()
107 name = "cros-ec-light"; in cros_ec_sensorhub_register()
110 name = "cros-ec-activity"; in cros_ec_sensorhub_register()
126 ec->has_kb_wake_angle = true; in cros_ec_sensorhub_register()
128 if (cros_ec_check_features(ec, in cros_ec_sensorhub_register()
131 "cros-ec-lid-angle", in cros_ec_sensorhub_register()
143 struct cros_ec_dev *ec = dev_get_drvdata(dev->parent); in cros_ec_sensorhub_probe() local
150 ec->ec_dev->max_response), GFP_KERNEL); in cros_ec_sensorhub_probe()
154 msg->command = EC_CMD_MOTION_SENSE_CMD + ec->cmd_offset; in cros_ec_sensorhub_probe()
163 data->ec = ec; in cros_ec_sensorhub_probe()
170 /* Check whether this EC is a sensor hub. */ in cros_ec_sensorhub_probe()
171 if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE)) { in cros_ec_sensorhub_probe()
172 sensor_num = cros_ec_get_sensor_count(ec); in cros_ec_sensorhub_probe()
189 if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE_FIFO)) { in cros_ec_sensorhub_probe()
201 * When the EC does not have a FIFO, the sensors will query in cros_ec_sensorhub_probe()
204 if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE_FIFO)) { in cros_ec_sensorhub_probe()
225 "cros-ec-accel-legacy", i); in cros_ec_sensorhub_probe()
237 * When the EC is suspending, we must stop sending interrupt,
239 * Tell the EC to stop sending non-interrupt event on the iio ring.
244 struct cros_ec_dev *ec = sensorhub->ec; in cros_ec_sensorhub_suspend() local
246 if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE_FIFO)) in cros_ec_sensorhub_suspend()
254 struct cros_ec_dev *ec = sensorhub->ec; in cros_ec_sensorhub_resume() local
256 if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE_FIFO)) in cros_ec_sensorhub_resume()
284 MODULE_DESCRIPTION("ChromeOS EC MEMS Sensor Hub Driver");