mbox series

[v4,0/5] Add support for ToF sensor on Yoshino platform

Message ID 20220512191334.61804-1-markuss.broks@gmail.com
Headers show
Series Add support for ToF sensor on Yoshino platform | expand

Message

Markuss Broks May 12, 2022, 7:13 p.m. UTC
This series adds support for the ToF proximity sensor installed on
Yoshino devices. As part of this series, support handling the reset
GPIO and VDD supply by the VL53L0X driver. Also stop hardcoding the
interrupt type, since on Yoshino devices it seems that edge triggering
doesn't work properly.

Tested on Sony Xperia XZ1 (poplar).

Cc: Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>

v2:
- Fix a nasty issue: turns out grouping the pinctrl makes it not apply,
which was the main cause of edge interrupts not working correctly and
having to use level interrupts, which caused a large amount of false
detections.
- handle the irq type more gracefully: if it's not provided, default
to falling edge, but if it's provided, then use the provided one.
v3:
- add irq.h header (forgot to commit)
- reword commit message (already initialized -> pre-initialized)
v4:
- reorder powering on and power off action (Jonathan)
- sort pinctrls by GPIO number (Konrad)

Markuss Broks (5):
  dt-bindings: proximity: vl53l0x: Document optional supply and GPIO
    properties
  proximity: vl53l0x: Get interrupt type from DT
  proximity: vl53l0x: Handle the VDD regulator
  proximity: vl53l0x: Handle the reset GPIO
  arm64: dts: qcom: msm8998-xperia: Introduce ToF sensor support

 .../bindings/iio/proximity/st,vl53l0x.yaml    |  5 ++
 .../dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 34 +++++++++++++
 drivers/iio/proximity/vl53l0x-i2c.c           | 50 ++++++++++++++++++-
 3 files changed, 88 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski May 13, 2022, 8:56 a.m. UTC | #1
On 12/05/2022 21:13, Markuss Broks wrote:
> This patch adds the optional properties for the VL53L0X ToF sensor to the
> device-tree binding.
> 
> Signed-off-by: Markuss Broks <markuss.broks@gmail.com>

Wait, two days and three versions? Please give some time before
resending entire patchset.

Same comments apply as for v2 and v3...


Best regards,
Krzysztof
Jonathan Cameron May 14, 2022, 2:29 p.m. UTC | #2
On Fri, 13 May 2022 10:56:50 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 12/05/2022 21:13, Markuss Broks wrote:
> > This patch adds the optional properties for the VL53L0X ToF sensor to the
> > device-tree binding.
> > 
> > Signed-off-by: Markuss Broks <markuss.broks@gmail.com>  
> 
> Wait, two days and three versions? Please give some time before
> resending entire patchset.

Yeah, several instances of this on the IIO list this week. Please
let things sit for at least a few days between versions even if
the requested changes are fairly minor.

> 
> Same comments apply as for v2 and v3...
>
I 'could' fix this up, but given you've not responded to Krzysztof
I think I'd prefer you send a v5 in the second half of next week or
later (to give time for other review) with the patch description
change Krzysztof suggested made.

Code wise the series looks fine to me.

Jonathan



> 
> Best regards,
> Krzysztof
Markuss Broks May 14, 2022, 4:33 p.m. UTC | #3
Hi Jonathan,

On 5/14/22 17:29, Jonathan Cameron wrote:
> On Fri, 13 May 2022 10:56:50 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
>> On 12/05/2022 21:13, Markuss Broks wrote:
>>> This patch adds the optional properties for the VL53L0X ToF sensor to the
>>> device-tree binding.
>>>
>>> Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
>> Wait, two days and three versions? Please give some time before
>> resending entire patchset.
> Yeah, several instances of this on the IIO list this week. Please
> let things sit for at least a few days between versions even if
> the requested changes are fairly minor.
>
>> Same comments apply as for v2 and v3...
>>
> I 'could' fix this up, but given you've not responded to Krzysztof
> I think I'd prefer you send a v5 in the second half of next week or
> later (to give time for other review) with the patch description
> change Krzysztof suggested made.
OK, good. I will give this version some time to settle and send a 
version with those fixes some time next week.
>
> Code wise the series looks fine to me.
>
> Jonathan
>
>
>
>> Best regards,
>> Krzysztof
- Markuss