summaryrefslogtreecommitdiff
path: root/zephyr/include/emul/emul_common_i2c.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license boilerplate text in source code filesMike Frysinger2022-09-121-1/+1
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: emul: drop i2c_label from emul configsFabio Baltieri2022-08-051-2/+0
| | | | | | | | | | | | | | | This is not used anywhere and is causing problem with downstreaming since the label is being removed. BRANCH=none BUG=none TEST=zmake testall Cq-Depend: chromium:3813331 Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I1b900670bde540a745648eb72e7801dec74272b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3811111 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: test: Migrate to upstream emulator APIAaron Massey2022-08-011-37/+48
| | | | | | | | | | | | | | | | | Migrate the existing emulators and tests to use the new upstream emulator API. Majority of these changes was the removal of struct i2c_emul usages in favor of direct usages of struct emul. BRANCH=none BUG=b:240291860 TEST=zmake test -a Signed-off-by: Aaron Massey <aaronmassey@google.com> Cq-Depend: chromium:3776856 Change-Id: I09c509ffc34ac3b28fbd4dece0acebcc36cc0932 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3781964 Reviewed-by: Yuval Peress <peress@google.com> Tested-by: Yuval Peress <peress@google.com>
* zephyr/include/emul/emul_common_i2c.h: Format with clang-formatJack Rosenthal2022-06-291-2/+2
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I20af74fb79312c88f91656a2e14f6fc9dfc27610 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730720 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: add a zephyr/ prefix to all zephyr includesFabio Baltieri2022-05-091-3/+3
| | | | | | | | | | | | | | | | | | | This adds a zephyr/ prefix to all #include path pointing to Zephyr header files, so that we could drop LEGACY_INCLUD_PATH once all upstream code has been converted. Generated using something similar to the script in: c7b5b3c419 samples: migrate includes to contain <zephyr/...> prefix BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I5ba2c859fe10a34ea8d3a49a612132ea4d02f2cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3634345 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: emul: use non-deprecated includesAaron Massey2022-01-241-1/+1
| | | | | | | | | | | | | Drop usage of deprecated <emul.h> for <drivers/emul.h> BRANCH=none BUG=none TEST=zmake configute --test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I9e221f44fa3b70305916914c0bbeed21b6a6bed8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3413067 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: test: Add a common i2c_emul_api instanceYuval Peress2021-10-011-0/+3
| | | | | | | | | | | | | | | | Refactor emulators that all set the same i2c_emul_api to use the same common API. BRANCH=none BUG=none TEST=zmake configure --test zephyr/test/drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I6da6df23c77f0710a24bab8d9f0b7fb6fa14dff2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3195201 Reviewed-by: Tomasz Michalec <tm@semihalf.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: emul: i2c: Add device label for better debugYuval Peress2021-09-071-0/+2
| | | | | | | | | | | | | | | | Improve the debug output by including the device label in the common configs. BRANCH=none BUG=none TEST=zmake configure --test zephyr/test/drivers Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ic331e7842efdfae70d3f994a694c7723fdcd9640 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3144313 Reviewed-by: Tomasz Michalec <tm@semihalf.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zephyr: emul: Add common code for I2C emulatorsTomasz Michalec2021-09-031-0/+367
Emulators of I2C devices have similar handling of I2C messages, locking mechanism for multithread code, custom user functions and user triggered failing on specific register. These functionalities are exported to common code which will replace current functions in emulators of I2C devices. BUG=none BRANCH=none TEST=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ib2c1a6596127dad1250d0051a312a837fc03ce20 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3140201 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>