Skip to content

Commit 413a103

Browse files
committed
Merge tag 'tag-chrome-platform-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
Pull chrome platform updates from Benson Leung: cros-usbpd-notify and cros_ec_typec: - Add a new notification driver that handles and dispatches USB PD related events to other drivers. - Add a Type C connector class driver for cros_ec CrOS EC: - Introduce a new cros_ec_cmd_xfer_status helper Sensors/iio: - A series from Gwendal that adds Cros EC sensor hub FIFO support Wilco EC: - Fix a build warning. - Platform data shouldn't include kernel.h Misc: - i2c api conversion complete, with i2c_new_client_device instead of i2c_new_device in chromeos_laptop. - Replace zero-length array with flexible-array member in cros_ec_chardev and wilco_ec - Update new structure for SPI transfer delays in cros_ec_spi * tag 'tag-chrome-platform-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (34 commits) platform/chrome: cros_ec_spi: Wait for USECS, not NSECS iio: cros_ec: Use Hertz as unit for sampling frequency iio: cros_ec: Report hwfifo_watermark_max iio: cros_ec: Expose hwfifo_timeout iio: cros_ec: Remove pm function iio: cros_ec: Register to cros_ec_sensorhub when EC supports FIFO iio: expose iio_device_set_clock iio: cros_ec: Move function description to .c file platform/chrome: cros_ec_sensorhub: Add median filter platform/chrome: cros_ec_sensorhub: Add code to spread timestmap platform/chrome: cros_ec_sensorhub: Add FIFO support platform/chrome: cros_ec_sensorhub: Add the number of sensors in sensorhub platform/chrome: chromeos_laptop: make I2C API conversion complete platform/chrome: wilco_ec: event: Replace zero-length array with flexible-array member platform/chrome: cros_ec_chardev: Replace zero-length array with flexible-array member platform/chrome: cros_ec_typec: Update port info from EC platform/chrome: Add Type C connector class driver platform/chrome: cros_usbpd_notify: Pull PD_HOST_EVENT status platform/chrome: cros_usbpd_notify: Amend ACPI driver to plat platform/chrome: cros_usbpd_notify: Add driver data struct ...
2 parents 9b06860 + a463877 commit 413a103

33 files changed

+2466
-342
lines changed

drivers/iio/accel/cros_ec_accel_legacy.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ static int cros_ec_accel_legacy_probe(struct platform_device *pdev)
170170
if (!indio_dev)
171171
return -ENOMEM;
172172

173-
ret = cros_ec_sensors_core_init(pdev, indio_dev, true);
173+
ret = cros_ec_sensors_core_init(pdev, indio_dev, true,
174+
cros_ec_sensors_capture, NULL);
174175
if (ret)
175176
return ret;
176177

@@ -190,11 +191,6 @@ static int cros_ec_accel_legacy_probe(struct platform_device *pdev)
190191
state->sign[CROS_EC_SENSOR_Z] = -1;
191192
}
192193

193-
ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,
194-
cros_ec_sensors_capture, NULL);
195-
if (ret)
196-
return ret;
197-
198194
return devm_iio_device_register(dev, indio_dev);
199195
}
200196

drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int cros_ec_lid_angle_probe(struct platform_device *pdev)
9797
if (!indio_dev)
9898
return -ENOMEM;
9999

100-
ret = cros_ec_sensors_core_init(pdev, indio_dev, false);
100+
ret = cros_ec_sensors_core_init(pdev, indio_dev, false, NULL, NULL);
101101
if (ret)
102102
return ret;
103103

@@ -127,7 +127,6 @@ MODULE_DEVICE_TABLE(platform, cros_ec_lid_angle_ids);
127127
static struct platform_driver cros_ec_lid_angle_platform_driver = {
128128
.driver = {
129129
.name = DRV_NAME,
130-
.pm = &cros_ec_sensors_pm_ops,
131130
},
132131
.probe = cros_ec_lid_angle_probe,
133132
.id_table = cros_ec_lid_angle_ids,

drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,14 @@ static int cros_ec_sensors_probe(struct platform_device *pdev)
230230
if (!indio_dev)
231231
return -ENOMEM;
232232

233-
ret = cros_ec_sensors_core_init(pdev, indio_dev, true);
233+
ret = cros_ec_sensors_core_init(pdev, indio_dev, true,
234+
cros_ec_sensors_capture,
235+
cros_ec_sensors_push_data);
234236
if (ret)
235237
return ret;
236238

239+
iio_buffer_set_attrs(indio_dev->buffer, cros_ec_sensor_fifo_attributes);
240+
237241
indio_dev->info = &ec_sensors_info;
238242
state = iio_priv(indio_dev);
239243
for (channel = state->channels, i = CROS_EC_SENSOR_X;
@@ -245,7 +249,6 @@ static int cros_ec_sensors_probe(struct platform_device *pdev)
245249
BIT(IIO_CHAN_INFO_CALIBSCALE);
246250
channel->info_mask_shared_by_all =
247251
BIT(IIO_CHAN_INFO_SCALE) |
248-
BIT(IIO_CHAN_INFO_FREQUENCY) |
249252
BIT(IIO_CHAN_INFO_SAMP_FREQ);
250253
channel->info_mask_shared_by_all_available =
251254
BIT(IIO_CHAN_INFO_SAMP_FREQ);
@@ -292,11 +295,6 @@ static int cros_ec_sensors_probe(struct platform_device *pdev)
292295
else
293296
state->core.read_ec_sensors_data = cros_ec_sensors_read_cmd;
294297

295-
ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,
296-
cros_ec_sensors_capture, NULL);
297-
if (ret)
298-
return ret;
299-
300298
return devm_iio_device_register(dev, indio_dev);
301299
}
302300

@@ -317,7 +315,6 @@ MODULE_DEVICE_TABLE(platform, cros_ec_sensors_ids);
317315
static struct platform_driver cros_ec_sensors_platform_driver = {
318316
.driver = {
319317
.name = "cros-ec-sensors",
320-
.pm = &cros_ec_sensors_pm_ops,
321318
},
322319
.probe = cros_ec_sensors_probe,
323320
.id_table = cros_ec_sensors_ids,

0 commit comments

Comments
 (0)