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)
Tue, Mar 18, 7:31 AM
Unknown Object (File)
Mon, Mar 17, 3:31 AM
Unknown Object (File)
Fri, Mar 14, 6:01 AM
Unknown Object (File)
Feb 26 2025, 6:37 PM
Unknown Object (File)
Feb 20 2025, 4:10 AM
Unknown Object (File)
Feb 3 2025, 6:02 AM
Unknown Object (File)
Jan 10 2025, 2:02 PM
Unknown Object (File)
Jan 10 2025, 7:21 AM
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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

adrian added a reviewer: markj.
sys/dev/asmc/asmcvar.h
73 ↗(On Diff #116376)

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