forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 182
io: light: tcs3472: Add TMD3782 proximity support #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
playday3008
wants to merge
15
commits into
msm8916-mainline:msm8916/6.12.1
Choose a base branch
from
playday3008:wip/msm8916/6.12.1/tmd3782
base: msm8916/6.12.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
89e4977
dt-bindings: iio: light: Add amstaos,tcs3472.yaml
4c74878
iio: light: tcs3472: Add OF match table and regulator support
7807ea1
iio: light: tcs3472: Introduce chip_info for per-variant support
468d008
iio: light: tcs3472: Add TMD3782 register definitions and chip ID
72c833d
iio: light: tcs3472: Add TMD3782 proximity channel and events
3933b71
iio: light: tcs3472: Add direct-mode and buffer proximity reads
236f640
arm64: dts: qcom: msm8916-samsung-a5u-eur: Add proximity/light sensor
8798788
arm64: dts: qcom: msm8939-samsung-a7: Add proximity/light sensor
3a0037b
iio: light: tcs3472: Rename PDRIVE mask with TMD3782 prefix
a2db347
iio: light: tcs3472: Use standalone chip_info structs instead of enum…
4847c29
iio: light: tcs3472: Clear ALS and proximity interrupts independently
64e92da
dt-bindings: iio: light: amstaos,tcs3472: Add TMD3782 datasheet link
db0ca81
iio: light: tcs3472: Convert to guard(mutex) for automatic lock manag…
97ec522
iio: light: tcs3472: Expose LED drive current via IIO CALIBBIAS attri…
9a0b423
iio: light: tcs3472: Expose pulse count via IIO OVERSAMPLING_RATIO at…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
Documentation/devicetree/bindings/iio/light/amstaos,tcs3472.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/iio/light/amstaos,tcs3472.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: AMS/TAOS TCS3472/TMD3782 Color Light and Proximity Sensor | ||
|
|
||
| maintainers: | ||
| - Peter Meerwald <pmeerw@pmeerw.net> | ||
|
|
||
| description: | | ||
| RGBC color light-to-digital converter with optional proximity detection. | ||
| TCS3472 provides 4-channel RGBC sensing. TMD3782 adds an integrated | ||
| proximity detector with IR LED driver. The TMD3782 family also includes | ||
| TMD37825/TMD37827 variants at I2C address 0x29 (same die, untested). | ||
|
|
||
| TCS3472 datasheet: | ||
| https://ams.com/documents/20143/36005/TCS3472_DS000190_1-00.pdf | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - amstaos,tcs3472 | ||
| - amstaos,tmd3782 | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| interrupts: | ||
| maxItems: 1 | ||
|
|
||
| vdd-supply: | ||
| description: Regulator that provides power to the sensor | ||
|
|
||
| vddio-supply: | ||
| description: Regulator that provides power to the I2C bus | ||
|
|
||
| vled-supply: | ||
| description: Regulator that provides power to the proximity IR LED | ||
|
|
||
| led-max-microamp: | ||
|
playday3008 marked this conversation as resolved.
Outdated
|
||
| description: Maximum proximity LED drive current in microamps | ||
| enum: | ||
| - 12500 | ||
| - 25000 | ||
| - 50000 | ||
| - 100000 | ||
|
|
||
| amstaos,proximity-pulse-count: | ||
|
playday3008 marked this conversation as resolved.
Outdated
|
||
| description: | ||
| Number of proximity IR LED pulses per measurement cycle. | ||
| Higher values increase signal strength at the cost of power. | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| minimum: 1 | ||
| maximum: 255 | ||
| default: 8 | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| #include <dt-bindings/interrupt-controller/irq.h> | ||
|
|
||
| i2c { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| light-sensor@39 { | ||
| compatible = "amstaos,tmd3782"; | ||
| reg = <0x39>; | ||
| interrupts = <113 IRQ_TYPE_LEVEL_LOW>; | ||
| vdd-supply = <®_prox_vdd>; | ||
| vddio-supply = <&pm8916_l5>; | ||
| vled-supply = <®_prox_led>; | ||
| led-max-microamp = <100000>; | ||
| amstaos,proximity-pulse-count = <6>; | ||
| }; | ||
| }; | ||
| ... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.