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)
Sun, Apr 7, 11:27 PM
Unknown Object (File)
Jan 31 2024, 4:26 AM
Unknown Object (File)
Jan 31 2024, 4:26 AM
Unknown Object (File)
Jan 27 2024, 5:40 PM
Unknown Object (File)
Dec 22 2023, 11:37 PM
Unknown Object (File)
Dec 6 2023, 2:39 AM
Unknown Object (File)
Nov 28 2023, 8:19 AM
Unknown Object (File)
Nov 28 2023, 8:19 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