Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: Remove support for the legacy event config interface

Now that all drivers have been converted to the new event config interface we
can remove for the legacy event config interface. Also drop the '_new' suffix
for the event config interface callbacks, since those are the only callbacks
now.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
cb955852 bb7f9d90

+97 -235
+4 -4
drivers/iio/adc/max1363.c
··· 1039 1039 }; 1040 1040 1041 1041 static const struct iio_info max1363_info = { 1042 - .read_event_value_new = &max1363_read_thresh, 1043 - .write_event_value_new = &max1363_write_thresh, 1044 - .read_event_config_new = &max1363_read_event_config, 1045 - .write_event_config_new = &max1363_write_event_config, 1042 + .read_event_value = &max1363_read_thresh, 1043 + .write_event_value = &max1363_write_thresh, 1044 + .read_event_config = &max1363_read_event_config, 1045 + .write_event_config = &max1363_write_event_config, 1046 1046 .read_raw = &max1363_read_raw, 1047 1047 .update_scan_mode = &max1363_update_scan_mode, 1048 1048 .driver_module = THIS_MODULE,
+3 -3
drivers/iio/dac/ad5421.c
··· 458 458 static const struct iio_info ad5421_info = { 459 459 .read_raw = ad5421_read_raw, 460 460 .write_raw = ad5421_write_raw, 461 - .read_event_config_new = ad5421_read_event_config, 462 - .write_event_config_new = ad5421_write_event_config, 463 - .read_event_value_new = ad5421_read_event_value, 461 + .read_event_config = ad5421_read_event_config, 462 + .write_event_config = ad5421_write_event_config, 463 + .read_event_value = ad5421_read_event_value, 464 464 .driver_module = THIS_MODULE, 465 465 }; 466 466
+22 -132
drivers/iio/industrialio-event.c
··· 242 242 if (ret < 0) 243 243 return ret; 244 244 245 - if (indio_dev->info->write_event_config) 246 - ret = indio_dev->info->write_event_config(indio_dev, 247 - this_attr->address, val); 248 - else 249 - ret = indio_dev->info->write_event_config_new(indio_dev, 250 - this_attr->c, iio_ev_attr_type(this_attr), 251 - iio_ev_attr_dir(this_attr), val); 245 + ret = indio_dev->info->write_event_config(indio_dev, 246 + this_attr->c, iio_ev_attr_type(this_attr), 247 + iio_ev_attr_dir(this_attr), val); 252 248 253 249 return (ret < 0) ? ret : len; 254 250 } ··· 257 261 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 258 262 int val; 259 263 260 - if (indio_dev->info->read_event_config) 261 - val = indio_dev->info->read_event_config(indio_dev, 262 - this_attr->address); 263 - else 264 - val = indio_dev->info->read_event_config_new(indio_dev, 265 - this_attr->c, iio_ev_attr_type(this_attr), 266 - iio_ev_attr_dir(this_attr)); 264 + val = indio_dev->info->read_event_config(indio_dev, 265 + this_attr->c, iio_ev_attr_type(this_attr), 266 + iio_ev_attr_dir(this_attr)); 267 267 if (val < 0) 268 268 return val; 269 269 else ··· 275 283 int val, val2; 276 284 int ret; 277 285 278 - if (indio_dev->info->read_event_value) { 279 - ret = indio_dev->info->read_event_value(indio_dev, 280 - this_attr->address, &val); 281 - if (ret < 0) 282 - return ret; 283 - return sprintf(buf, "%d\n", val); 284 - } else { 285 - ret = indio_dev->info->read_event_value_new(indio_dev, 286 - this_attr->c, iio_ev_attr_type(this_attr), 287 - iio_ev_attr_dir(this_attr), iio_ev_attr_info(this_attr), 288 - &val, &val2); 289 - if (ret < 0) 290 - return ret; 291 - return iio_format_value(buf, ret, val, val2); 292 - } 286 + ret = indio_dev->info->read_event_value(indio_dev, 287 + this_attr->c, iio_ev_attr_type(this_attr), 288 + iio_ev_attr_dir(this_attr), iio_ev_attr_info(this_attr), 289 + &val, &val2); 290 + if (ret < 0) 291 + return ret; 292 + return iio_format_value(buf, ret, val, val2); 293 293 } 294 294 295 295 static ssize_t iio_ev_value_store(struct device *dev, ··· 294 310 int val, val2; 295 311 int ret; 296 312 297 - if (!indio_dev->info->write_event_value && 298 - !indio_dev->info->write_event_value_new) 313 + if (!indio_dev->info->write_event_value) 299 314 return -EINVAL; 300 315 301 - if (indio_dev->info->write_event_value) { 302 - ret = kstrtoint(buf, 10, &val); 303 - if (ret) 304 - return ret; 305 - ret = indio_dev->info->write_event_value(indio_dev, 306 - this_attr->address, val); 307 - } else { 308 - ret = iio_str_to_fixpoint(buf, 100000, &val, &val2); 309 - if (ret) 310 - return ret; 311 - ret = indio_dev->info->write_event_value_new(indio_dev, 312 - this_attr->c, iio_ev_attr_type(this_attr), 313 - iio_ev_attr_dir(this_attr), iio_ev_attr_info(this_attr), 314 - val, val2); 315 - } 316 + ret = iio_str_to_fixpoint(buf, 100000, &val, &val2); 317 + if (ret) 318 + return ret; 319 + ret = indio_dev->info->write_event_value(indio_dev, 320 + this_attr->c, iio_ev_attr_type(this_attr), 321 + iio_ev_attr_dir(this_attr), iio_ev_attr_info(this_attr), 322 + val, val2); 316 323 if (ret < 0) 317 324 return ret; 318 325 ··· 352 377 return attrcount; 353 378 } 354 379 355 - static int iio_device_add_event_sysfs_new(struct iio_dev *indio_dev, 380 + static int iio_device_add_event_sysfs(struct iio_dev *indio_dev, 356 381 struct iio_chan_spec const *chan) 357 382 { 358 383 int ret = 0, i, attrcount = 0; ··· 395 420 return ret; 396 421 } 397 422 398 - static int iio_device_add_event_sysfs_old(struct iio_dev *indio_dev, 399 - struct iio_chan_spec const *chan) 400 - { 401 - int ret = 0, i, attrcount = 0; 402 - u64 mask = 0; 403 - char *postfix; 404 - if (!chan->event_mask) 405 - return 0; 406 - 407 - for_each_set_bit(i, &chan->event_mask, sizeof(chan->event_mask)*8) { 408 - postfix = kasprintf(GFP_KERNEL, "%s_%s_en", 409 - iio_ev_type_text[i/IIO_EV_DIR_MAX], 410 - iio_ev_dir_text[i%IIO_EV_DIR_MAX]); 411 - if (postfix == NULL) { 412 - ret = -ENOMEM; 413 - goto error_ret; 414 - } 415 - if (chan->modified) 416 - mask = IIO_MOD_EVENT_CODE(chan->type, 0, chan->channel2, 417 - i/IIO_EV_DIR_MAX, 418 - i%IIO_EV_DIR_MAX); 419 - else if (chan->differential) 420 - mask = IIO_EVENT_CODE(chan->type, 421 - 0, 0, 422 - i%IIO_EV_DIR_MAX, 423 - i/IIO_EV_DIR_MAX, 424 - 0, 425 - chan->channel, 426 - chan->channel2); 427 - else 428 - mask = IIO_UNMOD_EVENT_CODE(chan->type, 429 - chan->channel, 430 - i/IIO_EV_DIR_MAX, 431 - i%IIO_EV_DIR_MAX); 432 - 433 - ret = __iio_add_chan_devattr(postfix, 434 - chan, 435 - &iio_ev_state_show, 436 - iio_ev_state_store, 437 - mask, 438 - 0, 439 - &indio_dev->dev, 440 - &indio_dev->event_interface-> 441 - dev_attr_list); 442 - kfree(postfix); 443 - if (ret) 444 - goto error_ret; 445 - attrcount++; 446 - postfix = kasprintf(GFP_KERNEL, "%s_%s_value", 447 - iio_ev_type_text[i/IIO_EV_DIR_MAX], 448 - iio_ev_dir_text[i%IIO_EV_DIR_MAX]); 449 - if (postfix == NULL) { 450 - ret = -ENOMEM; 451 - goto error_ret; 452 - } 453 - ret = __iio_add_chan_devattr(postfix, chan, 454 - iio_ev_value_show, 455 - iio_ev_value_store, 456 - mask, 457 - 0, 458 - &indio_dev->dev, 459 - &indio_dev->event_interface-> 460 - dev_attr_list); 461 - kfree(postfix); 462 - if (ret) 463 - goto error_ret; 464 - attrcount++; 465 - } 466 - ret = attrcount; 467 - error_ret: 468 - return ret; 469 - } 470 - 471 - 472 - static int iio_device_add_event_sysfs(struct iio_dev *indio_dev, 473 - struct iio_chan_spec const *chan) 474 - { 475 - if (chan->event_mask) 476 - return iio_device_add_event_sysfs_old(indio_dev, chan); 477 - else 478 - return iio_device_add_event_sysfs_new(indio_dev, chan); 479 - } 480 - 481 423 static inline int __iio_add_event_config_attrs(struct iio_dev *indio_dev) 482 424 { 483 425 int j, ret, attrcount = 0; ··· 415 523 int j; 416 524 417 525 for (j = 0; j < indio_dev->num_channels; j++) { 418 - if (indio_dev->channels[j].event_mask != 0) 419 - return true; 420 526 if (indio_dev->channels[j].num_event_specs != 0) 421 527 return true; 422 528 }
+4 -4
drivers/iio/light/apds9300.c
··· 344 344 static const struct iio_info apds9300_info = { 345 345 .driver_module = THIS_MODULE, 346 346 .read_raw = apds9300_read_raw, 347 - .read_event_value_new = apds9300_read_thresh, 348 - .write_event_value_new = apds9300_write_thresh, 349 - .read_event_config_new = apds9300_read_interrupt_config, 350 - .write_event_config_new = apds9300_write_interrupt_config, 347 + .read_event_value = apds9300_read_thresh, 348 + .write_event_value = apds9300_write_thresh, 349 + .read_event_config = apds9300_read_interrupt_config, 350 + .write_event_config = apds9300_write_interrupt_config, 351 351 }; 352 352 353 353 static const struct iio_event_spec apds9300_event_spec[] = {
+4 -4
drivers/iio/light/cm36651.c
··· 614 614 .driver_module = THIS_MODULE, 615 615 .read_raw = &cm36651_read_raw, 616 616 .write_raw = &cm36651_write_raw, 617 - .read_event_value_new = &cm36651_read_prox_thresh, 618 - .write_event_value_new = &cm36651_write_prox_thresh, 619 - .read_event_config_new = &cm36651_read_prox_event_config, 620 - .write_event_config_new = &cm36651_write_prox_event_config, 617 + .read_event_value = &cm36651_read_prox_thresh, 618 + .write_event_value = &cm36651_write_prox_thresh, 619 + .read_event_config = &cm36651_read_prox_event_config, 620 + .write_event_config = &cm36651_write_prox_event_config, 621 621 .attrs = &cm36651_attribute_group, 622 622 }; 623 623
+4 -4
drivers/iio/light/gp2ap020a00f.c
··· 1388 1388 1389 1389 static const struct iio_info gp2ap020a00f_info = { 1390 1390 .read_raw = &gp2ap020a00f_read_raw, 1391 - .read_event_value_new = &gp2ap020a00f_read_event_val, 1392 - .read_event_config_new = &gp2ap020a00f_read_event_config, 1393 - .write_event_value_new = &gp2ap020a00f_write_event_val, 1394 - .write_event_config_new = &gp2ap020a00f_write_event_config, 1391 + .read_event_value = &gp2ap020a00f_read_event_val, 1392 + .read_event_config = &gp2ap020a00f_read_event_config, 1393 + .write_event_value = &gp2ap020a00f_write_event_val, 1394 + .write_event_config = &gp2ap020a00f_write_event_config, 1395 1395 .driver_module = THIS_MODULE, 1396 1396 }; 1397 1397
+4 -4
drivers/iio/light/tsl2563.c
··· 702 702 .driver_module = THIS_MODULE, 703 703 .read_raw = &tsl2563_read_raw, 704 704 .write_raw = &tsl2563_write_raw, 705 - .read_event_value_new = &tsl2563_read_thresh, 706 - .write_event_value_new = &tsl2563_write_thresh, 707 - .read_event_config_new = &tsl2563_read_interrupt_config, 708 - .write_event_config_new = &tsl2563_write_interrupt_config, 705 + .read_event_value = &tsl2563_read_thresh, 706 + .write_event_value = &tsl2563_write_thresh, 707 + .read_event_config = &tsl2563_read_interrupt_config, 708 + .write_event_config = &tsl2563_write_interrupt_config, 709 709 }; 710 710 711 711 static int tsl2563_probe(struct i2c_client *client,
+4 -4
drivers/staging/iio/accel/lis3l02dq_core.c
··· 676 676 static const struct iio_info lis3l02dq_info = { 677 677 .read_raw = &lis3l02dq_read_raw, 678 678 .write_raw = &lis3l02dq_write_raw, 679 - .read_event_value_new = &lis3l02dq_read_thresh, 680 - .write_event_value_new = &lis3l02dq_write_thresh, 681 - .write_event_config_new = &lis3l02dq_write_event_config, 682 - .read_event_config_new = &lis3l02dq_read_event_config, 679 + .read_event_value = &lis3l02dq_read_thresh, 680 + .write_event_value = &lis3l02dq_write_thresh, 681 + .write_event_config = &lis3l02dq_write_event_config, 682 + .read_event_config = &lis3l02dq_read_event_config, 683 683 .driver_module = THIS_MODULE, 684 684 .attrs = &lis3l02dq_attribute_group, 685 685 };
+8 -8
drivers/staging/iio/accel/sca3000_core.c
··· 1126 1126 .attrs = &sca3000_attribute_group, 1127 1127 .read_raw = &sca3000_read_raw, 1128 1128 .event_attrs = &sca3000_event_attribute_group, 1129 - .read_event_value_new = &sca3000_read_thresh, 1130 - .write_event_value_new = &sca3000_write_thresh, 1131 - .read_event_config_new = &sca3000_read_event_config, 1132 - .write_event_config_new = &sca3000_write_event_config, 1129 + .read_event_value = &sca3000_read_thresh, 1130 + .write_event_value = &sca3000_write_thresh, 1131 + .read_event_config = &sca3000_read_event_config, 1132 + .write_event_config = &sca3000_write_event_config, 1133 1133 .driver_module = THIS_MODULE, 1134 1134 }; 1135 1135 1136 1136 static const struct iio_info sca3000_info_with_temp = { 1137 1137 .attrs = &sca3000_attribute_group_with_temp, 1138 1138 .read_raw = &sca3000_read_raw, 1139 - .read_event_value_new = &sca3000_read_thresh, 1140 - .write_event_value_new = &sca3000_write_thresh, 1141 - .read_event_config_new = &sca3000_read_event_config, 1142 - .write_event_config_new = &sca3000_write_event_config, 1139 + .read_event_value = &sca3000_read_thresh, 1140 + .write_event_value = &sca3000_write_thresh, 1141 + .read_event_config = &sca3000_read_event_config, 1142 + .write_event_config = &sca3000_write_event_config, 1143 1143 .driver_module = THIS_MODULE, 1144 1144 }; 1145 1145
+4 -4
drivers/staging/iio/adc/ad7291.c
··· 452 452 453 453 static const struct iio_info ad7291_info = { 454 454 .read_raw = &ad7291_read_raw, 455 - .read_event_config_new = &ad7291_read_event_config, 456 - .write_event_config_new = &ad7291_write_event_config, 457 - .read_event_value_new = &ad7291_read_event_value, 458 - .write_event_value_new = &ad7291_write_event_value, 455 + .read_event_config = &ad7291_read_event_config, 456 + .write_event_config = &ad7291_write_event_config, 457 + .read_event_value = &ad7291_read_event_value, 458 + .write_event_value = &ad7291_write_event_value, 459 459 .driver_module = THIS_MODULE, 460 460 }; 461 461
+3 -3
drivers/staging/iio/adc/ad799x_core.c
··· 377 377 static const struct iio_info ad7993_4_7_8_info = { 378 378 .read_raw = &ad799x_read_raw, 379 379 .event_attrs = &ad799x_event_attrs_group, 380 - .read_event_config_new = &ad799x_read_event_config, 381 - .read_event_value_new = &ad799x_read_event_value, 382 - .write_event_value_new = &ad799x_write_event_value, 380 + .read_event_config = &ad799x_read_event_config, 381 + .read_event_value = &ad799x_read_event_value, 382 + .write_event_value = &ad799x_write_event_value, 383 383 .driver_module = THIS_MODULE, 384 384 .update_scan_mode = ad7997_8_update_scan_mode, 385 385 };
+4 -4
drivers/staging/iio/cdc/ad7150.c
··· 576 576 .event_attrs = &ad7150_event_attribute_group, 577 577 .driver_module = THIS_MODULE, 578 578 .read_raw = &ad7150_read_raw, 579 - .read_event_config_new = &ad7150_read_event_config, 580 - .write_event_config_new = &ad7150_write_event_config, 581 - .read_event_value_new = &ad7150_read_event_value, 582 - .write_event_value_new = &ad7150_write_event_value, 579 + .read_event_config = &ad7150_read_event_config, 580 + .write_event_config = &ad7150_write_event_config, 581 + .read_event_value = &ad7150_read_event_value, 582 + .write_event_value = &ad7150_write_event_value, 583 583 }; 584 584 585 585 /*
+4 -4
drivers/staging/iio/iio_simple_dummy.c
··· 370 370 .read_raw = &iio_dummy_read_raw, 371 371 .write_raw = &iio_dummy_write_raw, 372 372 #ifdef CONFIG_IIO_SIMPLE_DUMMY_EVENTS 373 - .read_event_config_new = &iio_simple_dummy_read_event_config, 374 - .write_event_config_new = &iio_simple_dummy_write_event_config, 375 - .read_event_value_new = &iio_simple_dummy_read_event_value, 376 - .write_event_value_new = &iio_simple_dummy_write_event_value, 373 + .read_event_config = &iio_simple_dummy_read_event_config, 374 + .write_event_config = &iio_simple_dummy_write_event_config, 375 + .read_event_value = &iio_simple_dummy_read_event_value, 376 + .write_event_value = &iio_simple_dummy_write_event_value, 377 377 #endif /* CONFIG_IIO_SIMPLE_DUMMY_EVENTS */ 378 378 }; 379 379
+20 -20
drivers/staging/iio/light/tsl2x7x_core.c
··· 1672 1672 .driver_module = THIS_MODULE, 1673 1673 .read_raw = &tsl2x7x_read_raw, 1674 1674 .write_raw = &tsl2x7x_write_raw, 1675 - .read_event_value_new = &tsl2x7x_read_thresh, 1676 - .write_event_value_new = &tsl2x7x_write_thresh, 1677 - .read_event_config_new = &tsl2x7x_read_interrupt_config, 1678 - .write_event_config_new = &tsl2x7x_write_interrupt_config, 1675 + .read_event_value = &tsl2x7x_read_thresh, 1676 + .write_event_value = &tsl2x7x_write_thresh, 1677 + .read_event_config = &tsl2x7x_read_interrupt_config, 1678 + .write_event_config = &tsl2x7x_write_interrupt_config, 1679 1679 }, 1680 1680 [PRX] = { 1681 1681 .attrs = &tsl2X7X_device_attr_group_tbl[PRX], ··· 1683 1683 .driver_module = THIS_MODULE, 1684 1684 .read_raw = &tsl2x7x_read_raw, 1685 1685 .write_raw = &tsl2x7x_write_raw, 1686 - .read_event_value_new = &tsl2x7x_read_thresh, 1687 - .write_event_value_new = &tsl2x7x_write_thresh, 1688 - .read_event_config_new = &tsl2x7x_read_interrupt_config, 1689 - .write_event_config_new = &tsl2x7x_write_interrupt_config, 1686 + .read_event_value = &tsl2x7x_read_thresh, 1687 + .write_event_value = &tsl2x7x_write_thresh, 1688 + .read_event_config = &tsl2x7x_read_interrupt_config, 1689 + .write_event_config = &tsl2x7x_write_interrupt_config, 1690 1690 }, 1691 1691 [ALSPRX] = { 1692 1692 .attrs = &tsl2X7X_device_attr_group_tbl[ALSPRX], ··· 1694 1694 .driver_module = THIS_MODULE, 1695 1695 .read_raw = &tsl2x7x_read_raw, 1696 1696 .write_raw = &tsl2x7x_write_raw, 1697 - .read_event_value_new = &tsl2x7x_read_thresh, 1698 - .write_event_value_new = &tsl2x7x_write_thresh, 1699 - .read_event_config_new = &tsl2x7x_read_interrupt_config, 1700 - .write_event_config_new = &tsl2x7x_write_interrupt_config, 1697 + .read_event_value = &tsl2x7x_read_thresh, 1698 + .write_event_value = &tsl2x7x_write_thresh, 1699 + .read_event_config = &tsl2x7x_read_interrupt_config, 1700 + .write_event_config = &tsl2x7x_write_interrupt_config, 1701 1701 }, 1702 1702 [PRX2] = { 1703 1703 .attrs = &tsl2X7X_device_attr_group_tbl[PRX2], ··· 1705 1705 .driver_module = THIS_MODULE, 1706 1706 .read_raw = &tsl2x7x_read_raw, 1707 1707 .write_raw = &tsl2x7x_write_raw, 1708 - .read_event_value_new = &tsl2x7x_read_thresh, 1709 - .write_event_value_new = &tsl2x7x_write_thresh, 1710 - .read_event_config_new = &tsl2x7x_read_interrupt_config, 1711 - .write_event_config_new = &tsl2x7x_write_interrupt_config, 1708 + .read_event_value = &tsl2x7x_read_thresh, 1709 + .write_event_value = &tsl2x7x_write_thresh, 1710 + .read_event_config = &tsl2x7x_read_interrupt_config, 1711 + .write_event_config = &tsl2x7x_write_interrupt_config, 1712 1712 }, 1713 1713 [ALSPRX2] = { 1714 1714 .attrs = &tsl2X7X_device_attr_group_tbl[ALSPRX2], ··· 1716 1716 .driver_module = THIS_MODULE, 1717 1717 .read_raw = &tsl2x7x_read_raw, 1718 1718 .write_raw = &tsl2x7x_write_raw, 1719 - .read_event_value_new = &tsl2x7x_read_thresh, 1720 - .write_event_value_new = &tsl2x7x_write_thresh, 1721 - .read_event_config_new = &tsl2x7x_read_interrupt_config, 1722 - .write_event_config_new = &tsl2x7x_write_interrupt_config, 1719 + .read_event_value = &tsl2x7x_read_thresh, 1720 + .write_event_value = &tsl2x7x_write_thresh, 1721 + .read_event_config = &tsl2x7x_read_interrupt_config, 1722 + .write_event_config = &tsl2x7x_write_interrupt_config, 1723 1723 }, 1724 1724 }; 1725 1725
-4
include/linux/iio/events.h
··· 46 46 ((u16)chan)) 47 47 48 48 49 - #define IIO_EV_DIR_MAX 4 50 - #define IIO_EV_BIT(type, direction) \ 51 - (1 << (type*IIO_EV_DIR_MAX + direction)) 52 - 53 49 /** 54 50 * IIO_MOD_EVENT_CODE() - create event identifier for modified channels 55 51 * @chan_type: Type of the channel. Should be one of enum iio_chan_type.
+5 -29
include/linux/iio/iio.h
··· 185 185 * by all channels of the same direction. 186 186 * @info_mask_shared_by_all: What information is to be exported that is shared 187 187 * by all channels. 188 - * @event_mask: What events can this channel produce. 189 188 * @event_spec: Array of events which should be registered for this 190 189 * channel. 191 190 * @num_event_specs: Size of the event_spec array. ··· 225 226 long info_mask_shared_by_type; 226 227 long info_mask_shared_by_dir; 227 228 long info_mask_shared_by_all; 228 - long event_mask; 229 229 const struct iio_event_spec *event_spec; 230 230 unsigned int num_event_specs; 231 231 const struct iio_chan_spec_ext_info *ext_info; ··· 305 307 * returns IIO_VAL_INT_PLUS_MICRO. 306 308 * @read_event_config: find out if the event is enabled. 307 309 * @write_event_config: set if the event is enabled. 308 - * @read_event_value: read a value associated with the event. Meaning 309 - * is event dependant. event_code specifies which event. 310 - * @write_event_value: write the value associated with the event. 311 - * Meaning is event dependent. 312 - * @read_event_config_new: find out if the event is enabled. New style interface. 313 - * @write_event_config_new: set if the event is enabled. New style interface. 314 - * @read_event_value_new: read a configuration value associated with the event. 315 - * New style interface. 316 - * @write_event_value_new: write a configuration value for the event. New style 317 - * interface. 310 + * @read_event_value: read a configuration value associated with the event. 311 + * @write_event_value: write a configuration value for the event. 318 312 * @validate_trigger: function to validate the trigger when the 319 313 * current trigger gets changed. 320 314 * @update_scan_mode: function to configure device and scan buffer when ··· 335 345 long mask); 336 346 337 347 int (*read_event_config)(struct iio_dev *indio_dev, 338 - u64 event_code); 339 - 340 - int (*write_event_config)(struct iio_dev *indio_dev, 341 - u64 event_code, 342 - int state); 343 - 344 - int (*read_event_value)(struct iio_dev *indio_dev, 345 - u64 event_code, 346 - int *val); 347 - int (*write_event_value)(struct iio_dev *indio_dev, 348 - u64 event_code, 349 - int val); 350 - 351 - int (*read_event_config_new)(struct iio_dev *indio_dev, 352 348 const struct iio_chan_spec *chan, 353 349 enum iio_event_type type, 354 350 enum iio_event_direction dir); 355 351 356 - int (*write_event_config_new)(struct iio_dev *indio_dev, 352 + int (*write_event_config)(struct iio_dev *indio_dev, 357 353 const struct iio_chan_spec *chan, 358 354 enum iio_event_type type, 359 355 enum iio_event_direction dir, 360 356 int state); 361 357 362 - int (*read_event_value_new)(struct iio_dev *indio_dev, 358 + int (*read_event_value)(struct iio_dev *indio_dev, 363 359 const struct iio_chan_spec *chan, 364 360 enum iio_event_type type, 365 361 enum iio_event_direction dir, 366 362 enum iio_event_info info, int *val, int *val2); 367 363 368 - int (*write_event_value_new)(struct iio_dev *indio_dev, 364 + int (*write_event_value)(struct iio_dev *indio_dev, 369 365 const struct iio_chan_spec *chan, 370 366 enum iio_event_type type, 371 367 enum iio_event_direction dir,