iio: light: vcnl4000: Add support for Capella CM36686 and CM36672P
Subsystems (2)
cover iio: light: vcnl4000: Add support for Capella CM36686 and CM36672P
Capella CM36686 is a combined ambient light and proximity sensor developed by Capella Microsystems, now a subsidiary of Vishay Intertechnology Inc. It is fully compatible with Vishay VCNL4040 and its driver can be used for Capella CM36686.
Capella CM36672P is a proximity sensor which is fully compatible with CM36686, and in turn, with VCNL4040.
This patch series adds compatibles for cm36686 and cm36672p, as well as disables the light channel for cm36672p.
---
Erikas Bitovtas (2):
dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
iio: light: vcnl4000: add support for Capella CM36686 and CM36672P.../bindings/iio/light/vishay,vcnl4000.yaml | 17 +++++---- drivers/iio/light/vcnl4000.c | 40 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 6 deletions(-)
---
base-commit: 132737e360b4c0daa7f473faf0f55cb04ee3e15c
change-id: 20260210-cm36686-4d328b87b6d2
Best regards,
Signature · 1 line
Erikas Bitovtas <[email protected]>
PATCH 1/2 dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Capella CM36686 is an ambient light and proximity sensor developed by Capella Microsystems, now a subsidiary of Vishay Intertechnology Inc. It has an I2C address of 0x60 and is fully compatible with an existing driver for VCNL4040. Capella CM36672P is a proximity-only sensor that is fully compatible with CM36686, and therefore with VCNL4040. Add compatibles for cm36672p and cm36686, with a fallback for cm36686 of vcnl4040.
--- .../devicetree/bindings/iio/light/vishay,vcnl4000.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml +11 -6
@@ -18,12 +18,17 @@ allOf: properties: compatible: - enum: - - vishay,vcnl4000 - - vishay,vcnl4010 - - vishay,vcnl4020 - - vishay,vcnl4040 - - vishay,vcnl4200 + oneOf: + - enum: + - capella,cm36672p + - vishay,vcnl4000 + - vishay,vcnl4010 + - vishay,vcnl4020 + - vishay,vcnl4040 + - vishay,vcnl4200 + - items: + - const: capella,cm36686 + - const: vishay,vcnl4040 interrupts: maxItems: 1
Signature · 1 line
2.53.0
Re: [PATCH 1/2] dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Quoted 7 lines · Erikas Bitovtas
Capella CM36686 is an ambient light and proximity sensor developed by Capella Microsystems, now a subsidiary of Vishay Intertechnology Inc. It has an I2C address of
0x60and is fully compatible with an existing driver for VCNL4040. Capella CM36672P is a proximity-only sensor that is fully compatible with CM36686, and therefore with VCNL4040. Add compatibles for cm36672p and cm36686, with a fallback for cm36686 of vcnl4040.
There was CM36686 v1 and v2, so I do not understand versioning here. Also, lack of any changelog.
And how is it supposed to work for us? Try yourself:
$ b4 diff [email protected] Could not find lower series to compare against.
Please implement previous feedback.
Best regards,
Krzysztof
Re: [PATCH 1/2] dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Quoted 6 lines · Krzysztof Kozlowski
There was CM36686 v1 and v2, so I do not understand versioning here. Also, lack of any changelog.
And how is it supposed to work for us? Try yourself:
Quoted 8 lines
$ b4 diff [email protected] Could not find lower series to compare against.Please implement previous feedback.
Best regards,
Krzysztof
Since I am making changes to the existing driver instead of creating a new one, I introduced a new patch series. As I mentioned in the cover letter, cm36686 is fully compatible with vcnl4040, so instead of creating a new binding, I create a fallback compatible for the device. I probably should have named this patch series something else.
As for the previous feedback, I added the subject prefix and removed the redundant phrasing.
Re: [PATCH 1/2] dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Quoted 11 lines · Erikas Bitovtas
Quoted 8 lines · Krzysztof Kozlowski
There was CM36686 v1 and v2, so I do not understand versioning here. Also, lack of any changelog.
And how is it supposed to work for us? Try yourself:
$ b4 diff [email protected] Could not find lower series to compare against.
Look here.
Quoted 7 lines
Quoted 6 lines
Please implement previous feedback.
Best regards,
Krzysztof
Quoted 5 lines
Since I am making changes to the existing driver instead of creating a new one, I introduced a new patch series. As I mentioned in the cover letter, cm36686 is fully compatible with vcnl4040, so instead of creating a new binding, I create a fallback compatible for the device. I probably should have named this patch series something else.
That's fine, but that's v3 of previous patches. Your work was to add CM36686 support. How you do it, evolves, but patchset/work is one continuous work. When you rework approach next time, you also start from v1? And then you go back to previous solution of new driver it will jump from v1 to v3?
Quoted 2 lines
As for the previous feedback, I added the subject prefix and removed the redundant phrasing.
And how do I know it if there is no changelog with list of changes? Look how many patches is here:
https://lore.kernel.org/linux-devicetree/
Best regards,
Krzysztof
Re: [PATCH 1/2] dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Quoted 14 lines
Quoted 8 lines
Quoted 7 lines
Please implement previous feedback.
Best regards,
KrzysztofQuoted 5 lines
Since I am making changes to the existing driver instead of creating a new one, I introduced a new patch series. As I mentioned in the cover letter, cm36686 is fully compatible with vcnl4040, so instead of creating a new binding, I create a fallback compatible for the device. I probably should have named this patch series something else.
Quoted 6 lines
That's fine, but that's v3 of previous patches. Your work was to add CM36686 support. How you do it, evolves, but patchset/work is one continuous work. When you rework approach next time, you also start from v1? And then you go back to previous solution of new driver it will jump from v1 to v3?
There has been a misunderstanding. I assumed that since I will no longer be developing that driver, this warrants a new patch series. I apologize for this.
Here is the changelog since v2:
- Remove the previous unnecessary proposed driver and bindings.
- Add a fallback compatible for cm36686 of vcnl4040.
- Add a new compatible for cm36672p.
- Add channel info for cm36672p.
- Remove redundant information in the dt-bindings commit message. Here is the link to v2:
https://lore.kernel.org/linux-iio/[email protected]/
I have received some feedback regarding the changes I made to the existing vcnl4000 driver. Shall I submit the implementation of it as a v3 to that series of patches?
Re: [PATCH 1/2] dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Quoted 27 lines · Erikas Bitovtas
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Please implement previous feedback.
Since I am making changes to the existing driver instead of creating a new one, I introduced a new patch series. As I mentioned in the cover letter, cm36686 is fully compatible with vcnl4040, so instead of creating a new binding, I create a fallback compatible for the device. I probably should have named this patch series something else.
Quoted 6 lines
That's fine, but that's v3 of previous patches. Your work was to add CM36686 support. How you do it, evolves, but patchset/work is one continuous work. When you rework approach next time, you also start from v1? And then you go back to previous solution of new driver it will jump from v1 to v3?
There has been a misunderstanding. I assumed that since I will no longer be developing that driver, this warrants a new patch series. I apologize for this.
Here is the changelog since v2:
- Remove the previous unnecessary proposed driver and bindings.
- Add a fallback compatible for cm36686 of vcnl4040.
- Add a new compatible for cm36672p.
- Add channel info for cm36672p.
- Remove redundant information in the dt-bindings commit message. Here is the link to v2:
https://lore.kernel.org/linux-iio/[email protected]/
Quoted 3 lines
I have received some feedback regarding the changes I made to the existing vcnl4000 driver. Shall I submit the implementation of it as a v3 to that series of patches?
I guess v4 would be better as this is assumed misversioned v3, if I got the situation correctly.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 1/2] dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Quoted 29 lines · Andy Shevchenko
Quoted 27 lines · Erikas Bitovtas
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Please implement previous feedback.
Since I am making changes to the existing driver instead of creating a new one, I introduced a new patch series. As I mentioned in the cover letter, cm36686 is fully compatible with vcnl4040, so instead of creating a new binding, I create a fallback compatible for the device. I probably should have named this patch series something else.
Quoted 6 lines
That's fine, but that's v3 of previous patches. Your work was to add CM36686 support. How you do it, evolves, but patchset/work is one continuous work. When you rework approach next time, you also start from v1? And then you go back to previous solution of new driver it will jump from v1 to v3?
There has been a misunderstanding. I assumed that since I will no longer be developing that driver, this warrants a new patch series. I apologize for this.
Here is the changelog since v2:
- Remove the previous unnecessary proposed driver and bindings.
- Add a fallback compatible for cm36686 of vcnl4040.
- Add a new compatible for cm36672p.
- Add channel info for cm36672p.
- Remove redundant information in the dt-bindings commit message. Here is the link to v2:
https://lore.kernel.org/linux-iio/[email protected]/
Quoted 7 lines
Quoted 3 lines
I have received some feedback regarding the changes I made to the existing vcnl4000 driver. Shall I submit the implementation of it as a v3 to that series of patches?
I guess v4 would be better as this is assumed misversioned v3, if I got the situation correctly.
Yes, I started a new patch series when I should have continued previous one. I will submit an implementation of your feedback as a v4 to the patch series I started initially. Thank you!
Re: [PATCH 1/2] dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P
Quoted 2 lines · Erikas Bitovtas
Quoted 1 line · Andy Shevchenko
On Wed, Feb 11, 2026 at 03:32:41PM +0200, Erikas Bitovtas wrote:
...
Quoted 31 lines
Quoted 31 lines
Quoted 30 lines
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Please implement previous feedback.
Since I am making changes to the existing driver instead of creating a new one, I introduced a new patch series. As I mentioned in the cover letter, cm36686 is fully compatible with vcnl4040, so instead of creating a new binding, I create a fallback compatible for the device. I probably should have named this patch series something else.
Quoted 6 lines
That's fine, but that's v3 of previous patches. Your work was to add CM36686 support. How you do it, evolves, but patchset/work is one continuous work. When you rework approach next time, you also start from v1? And then you go back to previous solution of new driver it will jump from v1 to v3?
There has been a misunderstanding. I assumed that since I will no longer be developing that driver, this warrants a new patch series. I apologize for this.
Here is the changelog since v2:
- Remove the previous unnecessary proposed driver and bindings.
- Add a fallback compatible for cm36686 of vcnl4040.
- Add a new compatible for cm36672p.
- Add channel info for cm36672p.
- Remove redundant information in the dt-bindings commit message. Here is the link to v2:
https://lore.kernel.org/linux-iio/[email protected]/I have received some feedback regarding the changes I made to the existing vcnl4000 driver. Shall I submit the implementation of it as a v3 to that series of patches?
Quoted 6 lines
Quoted 2 lines
I guess v4 would be better as this is assumed misversioned v3, if I got the situation correctly.
Yes, I started a new patch series when I should have continued previous one. I will submit an implementation of your feedback as a v4 to the patch series I started initially. Thank you!
Do not forget to include the _full_ changelog per version
...from v<N>:
...
...from v2:
...
...from v1:
...
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 2/2 iio: light: vcnl4000: add support for Capella CM36686 and CM36672P
In reply to Erikas BitovtasAdd support for Capella's CM36686 and CM36672P sensors. Capella CM36686 is an ambient light and proximity sensor that is fully compatible with VCNL4040 and can be used as is. For CM36672P, which is a proximity-only sensor, also remove the IIO_LIGHT channel.
--- drivers/iio/light/vcnl4000.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
drivers/iio/light/vcnl4000.c +40 -0
@@ -185,6 +185,7 @@ static const int vcnl4040_ps_oversampling_ratio[] = {1, 2, 4, 8};#define VCNL4000_SLEEP_DELAY_MS 2000/* before we enter pm_runtime_suspend */ enum vcnl4000_device_ids { +CM36672P ,VCNL4000 ,VCNL4010 ,VCNL4040 ,
@@ -240,6 +241,8 @@ static const struct i2c_device_id vcnl4000_id[] = { { "vcnl4020", VCNL4010 }, { "vcnl4040", VCNL4040 }, { "vcnl4200", VCNL4200 }, + { "cm36672p", CM36672P }, + { "cm36686", VCNL4040 }, { } };MODULE_DEVICE_TABLE (i2c, vcnl4000_id);
@@ -1842,6 +1845,22 @@ static const struct iio_chan_spec vcnl4040_channels[] = { } }; +static const struct iio_chan_spec cm36672p_channels[] = { + { + .type =IIO_PROXIMITY , + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_INT_TIME ) | +BIT (IIO_CHAN_INFO_OVERSAMPLING_RATIO ) | +BIT (IIO_CHAN_INFO_CALIBBIAS ), + .info_mask_separate_available =BIT (IIO_CHAN_INFO_INT_TIME ) | +BIT (IIO_CHAN_INFO_OVERSAMPLING_RATIO ) | +BIT (IIO_CHAN_INFO_CALIBBIAS ), + .ext_info = vcnl4000_ext_info, + .event_spec = vcnl4040_event_spec, + .num_event_specs =ARRAY_SIZE (vcnl4040_event_spec), + } +}; +static const struct iio_info vcnl4000_info = { .read_raw = vcnl4000_read_raw, };
@@ -1867,6 +1886,19 @@ static const struct iio_info vcnl4040_info = { };static const struct vcnl4000_chip_spec vcnl4000_chip_spec_cfg[] = { + [CM36672P ] = { + .prod ="CM36672P" , + .init = vcnl4200_init, + .measure_proximity = vcnl4200_measure_proximity, + .set_power_state = vcnl4200_set_power_state, + .channels = cm36672p_channels, + .num_channels =ARRAY_SIZE (cm36672p_channels), + .info = &vcnl4040_info, + .irq_thread = vcnl4040_irq_thread, + .int_reg =VCNL4040_INT_FLAGS , + .ps_it_times = &vcnl4040_ps_it_times, + .num_ps_it_times =ARRAY_SIZE (vcnl4040_ps_it_times), + }, [VCNL4000 ] = { .prod ="VCNL4000" , .init = vcnl4000_init,
@@ -2053,6 +2085,14 @@ static const struct of_device_id vcnl_4000_of_match[] = { .compatible = "vishay,vcnl4200", .data = (void *)VCNL4200, }, + { + .compatible = "capella,cm36672p", + .data = (void *)CM36672P, + }, + { + .compatible = "capella,cm36686", + .data = (void *)VCNL4040, + }, { } };MODULE_DEVICE_TABLE (of, vcnl_4000_of_match);
Signature · 1 line
2.53.0
Re: [PATCH 2/2] iio: light: vcnl4000: add support for Capella CM36686 and CM36672P
Quoted 5 lines · Erikas Bitovtas
Add support for Capella's CM36686 and CM36672P sensors. Capella CM36686 is an ambient light and proximity sensor that is fully compatible with VCNL4040 and can be used as is. For CM36672P, which is a proximity-only sensor, also remove the
IIO_LIGHTchannel.
A couple of nit-picks, otherwise LGTM (much better than the first version!), thanks.
...
drivers/iio/light/vcnl4000.c static const struct i2c_device_id vcnl4000_id[] = { · line 245
Quoted 5 lines
{ "vcnl4020", VCNL4010 }, { "vcnl4040", VCNL4040 }, { "vcnl4200", VCNL4200 },drivers/iio/light/vcnl4000.c +2
-0+ { "cm36672p", CM36672P }, + { "cm36686", VCNL4040 },
Keep it ordered by device name (string literal).
...
Quoted 5 lines
drivers/iio/light/vcnl4000.c +5
-0+static const struct iio_chan_spec cm36672p_channels[] = { + { + .type =IIO_PROXIMITY , + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_INT_TIME) |
drivers/iio/light/vcnl4000.c static const struct iio_chan_spec vcnl4040_channels[] = { · line 1861
Quoted 10 lines
drivers/iio/light/vcnl4000.c +9
-0+BIT (IIO_CHAN_INFO_OVERSAMPLING_RATIO ) | + BIT(IIO_CHAN_INFO_CALIBBIAS), + .info_mask_separate_available =BIT (IIO_CHAN_INFO_INT_TIME ) | +BIT (IIO_CHAN_INFO_OVERSAMPLING_RATIO ) | + BIT(IIO_CHAN_INFO_CALIBBIAS), + .ext_info = vcnl4000_ext_info, + .event_spec = vcnl4040_event_spec, + .num_event_specs = ARRAY_SIZE(vcnl4040_event_spec), + }
Keep trailing comma when it's not a terminator entry.
Quoted 1 line
+};
Signature · 2 lines
With Best Regards, Andy Shevchenko