Page MenuHomeFreeBSD

asmc: add support for 10 byte light sensor payloads
ClosedPublic

Authored by adrian on Feb 2 2023, 11:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 3:18 PM
Unknown Object (File)
Oct 9 2024, 12:16 PM
Unknown Object (File)
Sep 24 2024, 1:03 PM
Unknown Object (File)
Sep 24 2024, 1:03 PM
Unknown Object (File)
Sep 24 2024, 1:03 PM
Unknown Object (File)
Sep 24 2024, 1:03 PM
Unknown Object (File)
Sep 24 2024, 1:03 PM
Unknown Object (File)
Sep 24 2024, 12:51 PM
Subscribers

Details

Summary

The later macbook models use a different packet payload for the light sensors:

  • there's only one, done in the camera
  • it's a 4 byte value, not a 2 byte value
  • it's in a 10 byte payload

So, this adds support for that and flips it on for the MacbookAir 6,2.
It also adds support for MacBookAir 6,1 as that now works fine here.

Test Plan

Tested on MacbookAir 6,1 and MacbookAir 6,2

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

adrian added a reviewer: markj.
sys/dev/asmc/asmcvar.h
73

hm, don't need these in this commit, i'll delete em before landing

sys/dev/asmc/asmc.c
160

Extra newline.

1559

10 byte?

1564

v should probably be unsigned?

1576

This can just be v = be32dec(&buf[6]);.

This revision is now accepted and ready to land.Feb 7 2023, 6:20 PM