Update the logic to find the i2c bus number to use either the named i2c
devices or the static i2c bus numbers. This allows us to support both
cases -- v5.10 uses i2c-<devname> while v6.1 uses <i2c-bus#>-<reg>.
Bug: 291606723
Test: verify no errors from the usb services with v5.10 and v6.1
Change-Id: Ia68c424a3b6579457be6cfd0d07788e9da44a86e
Update the i2c bus numbers to use the statically assigned numbers
configured in the kernel device tree. In addition, use ueventd to set
the ACL for the i2c devices.
Bug: 291606723
Test: performance boot testing
Test: verify selinux labelling with ls -Z on the modified device nodes
Change-Id: I579143fa38bc2e9b3bf7dc618b10e63001263e2e
This reverts commit b8a0da464b.
Reason for revert: Increased jank reported, especially on the Pixel tablet
Bug: 301846142
Bug: 298975477
Change-Id: I8aa4f335cd61ef2800238424aeac2cedd6dcfb67
This change needs to be merged with the corresponding kernel change that
sets the i2c bus aliases correctly to match the existing v5.10 bus
probe ordering.
To verify the sepolicy labeling doesn't change, run the below commands
and diff the stdout on builds with and without the changes. For extra
credit, verify the nodes are labeled the same when upgrading the kernel
to v6.1 (with the correct i2c aliases to match the existing policy):
acpm_bus_array=("acpm_mfd_bus@17500000" "acpm_mfd_bus@17510000")
for bus in ${acpm_bus_array[@]}; do
adb shell ls -ZR /sys/devices/platform/${bus}/i2c-*;
done
bus_array=("10960000" "10970000" "10d50000" "10900000")
for bus in ${bus_array[@]}; do
adb shell ls -ZR /sys/devices/platform/${bus}.hsi2c/i2c-*;
done
Test: verify on r4
Bug: 291606723
Change-Id: Id5b9021cdbf4b9d3578d5e9ee655463ab62dcd12
Many host applications expect and ask for lower resolution streams when
streaming from a USB webcam. To support those applications, this CL
adds support for 640x480 and 640x360 streams.
Bug: 301170431
Test: Manually tested that the resolution is advertised and streamed.
Change-Id: I78e9f97575784996aac94e576c7f23b0874a8d09
If Usb.cpp cannot write a zero value to the USB_DATA_PATH file, display
the message of "Not able to turn off usb connection notification".
Test: refactoring CL. Existing tests still pass.
Bug: 301016122
Change-Id: I0c5b7c4dc5bfe21ba17058536b5014eb5d69d1f3
Indicate to the kernel that the usb gadget is pulled up
by writing to `update_sdp_enum_timeout` sysfs node. Write
to this node will inform the kernel that it can lower the SDP
timeout alarm value which is used to detect an SDP port
vs a DCP.
ported from c5c5b127a7ed0db559d286284fe77b656bef6945
Bug: 275687235
Test: Check `update_sdp_enum_timeout` is written into after usb
gadget is pulled up. Verify that the alarm timeout lowers.
Change-Id: Id3ae7e7a20b236cec6604414a7f81860e868bdd0
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Write to /sys/class/typec/port<...>/device/update_sdp_enum_timeout
to reduce SDP enumeration timeout value when device is in charger
mode. This will enable faster detection of a DCP port.
ported from 6710e31a629f81cf308e1099f75a01c82db6d006
Test: Validate (in charger mode) that the sysfs attribute is 1
(meaning lower sdp timeout value is being used). Read dmesg to
see print showing timeout value is 5000ms.
Bug: 275687235
Change-Id: I1bc872911d7f1eab26e62fe6f12fba05608e0f83
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
There are some regression reports. Disable them completely for now.
Bug: 297496375
Change-Id: I2a2b4d13366d3173c441e8ccad456a67ddd3a16b
Signed-off-by: Qais Yousef <qyousef@google.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: I533006b40e96b2d1d7cc8bff0591e2c33e0542e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: I0b8d04a7cd046a7fcd76d2fd06345922aa530299
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: I40a235b0baaf9b4ebc1076a7dd5882a00e1538ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: I1a06945bf1b20abf63cbefc425e823acc242810e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: I8fbbaacca0bfac26c62a0066dab8ba9c5e975a8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: Iac1344cac7c018817540e5a8772b68b24db9c6ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: I19d9164d09f38c3c587a3381180887d374953265
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: Ie650e0ecfaf8ab928dfbf624c10f5106a7a7f339
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: I401cabee30646852b1b4336631ad9bdac8b3f2ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I48441749de4eb1de90ce5a307b1d47ae3cb9592d with SHA-1 3770a8a19c is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/2752329
Change-Id: Ic15f340b025047af3342514397c8c14eeedd8200
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>