Re: [PATCH v3 RESEND] Added AMS tsl2591 driver implementation
From: Rob Herring
Date: Wed Feb 17 2021 - 15:25:43 EST
On Sat, 13 Feb 2021 13:22:41 +0000, Joe Sandom wrote:
> Driver implementation for AMS/TAOS tsl2591 ambient light sensor.
>
> This driver supports configuration via device tree and sysfs.
> Supported channels for raw infrared light, raw visible light,
> raw combined light and combined lux value.
> The driver additionally supports iio events on lower and
> upper thresholds.
>
> This is a very-high sensitivity light-to-digital converter that
> transforms light intensity into a digital signal.
>
> Datasheet Available at: https://ams.com/tsl25911
>
> Signed-off-by: Joe Sandom <joe.g.sandom@xxxxxxxxx>
> ---
> Changes in v3:
> - Cleaned up descriptions in binding file and Kconfig
> - Changed macros to be uppercase
> - Cleaned up comment formatting for capitalisation and block comments
> - Changed tsl2591_settings to tsl2591_als_settings as settings only
> related to als
> - Return -EINVAL directly in default case to save some lines
> - Consistent use of const in "compatible" check functions
> - Removed mutex use in _show functions as not necessary
> - Removed print's which contribute little value/have little meaning
>
> NOTES;
> - Where spaces are seen at the end of some lines, it looks like gmail
> has mangled things slightly.
> - checkpatch.pl --strict remarks that mutex definition should have a
> comment above it. I agree it has little meaning, but just added it to
> satisfy checkpatch.pl :)
> - For sysfs functions e.g. "in_illuminance_*", they're not currently
> prefixed with "tsl2591" because I wanted to keep things consistent
> with the other light drivers. Is this something we're looking to
> change with the other drivers too?
>
> REASON FOR RESEND;
> - Mailing lists were rejecting my outlook email, so switched to gmail as
> mailing lists seem to accept without issues.
>
> .../bindings/iio/light/amstaos,tsl2591.yaml | 50 +
> drivers/iio/light/Kconfig | 11 +
> drivers/iio/light/Makefile | 1 +
> drivers/iio/light/tsl2591.c | 1220 +++++++++++++++++
> 4 files changed, 1282 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/amstaos,tsl2591.yaml
> create mode 100644 drivers/iio/light/tsl2591.c
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/iio/light/amstaos,tsl2591.yaml: $id: relative path/filename doesn't match actual path or filename
expected: http://devicetree.org/schemas/iio/light/amstaos,tsl2591.yaml#
See https://patchwork.ozlabs.org/patch/1440199
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.