devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] iio: chemical: Add Sharp GP2Y1010AU0F dust sensor support
@ 2025-06-12 10:07 surajsonawane0215
  2025-06-12 10:07 ` [PATCH v2 1/3] iio: Add IIO_DENSITY channel type surajsonawane0215
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: surajsonawane0215 @ 2025-06-12 10:07 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree,
	linux-kernel, surajsonawane0215

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=yes, Size: 2570 bytes --]

From: Suraj Sonawane <surajsonawane0215@gmail.com>

This patch series adds support for the Sharp GP2Y1010AU0F optical
dust sensor, which measures airborne particulate matter concentration
in grams per cubic meter (g/m³). The implementation includes:

1. A new IIO_DENSITY channel type for particulate sensors (Patch 1)
2. Device tree bindings documentation (Patch 2)
3. The driver implementation (Patch 3)

The sensor requires:
- One GPIO for device enable control
- One ADC channel for analog output measurement
- Optional LED trigger for synchronized sampling

Tested on BeagleBone Black with:
- P8_12 (GPIO_44) for LED control
- P9_39 (AIN0) for analog output

Changes since v1:
- Added new IIO_DENSITY channel type (Patch 1)
- Documented ABI for density measurements (g/m³) in sysfs-bus-iio
- Updated timing properties to match datasheet:
  * sharp,led-on-delay-us: 280μs (from 40μs)
  * sharp,measurement-window-us: 280μs (from 200μs)
- Added reg property for multi-sensor support
- Moved datasheet reference to tags block
- Hardware Interface:
  * Replaced manual power management with devm_regulator_get_enabled()
  * Consolidated LED timing into single delay operation
  * Improved error handling in read sequence
- Removed unnecessary IIO_BUFFER dependencies
- Alphabetized Makefile entry and header includes
- Replaced extend_name with proper label callback
- Standardized on pdev->dev for all device logging
- Applied IIO formatting conventions ({ } spacing)
- Changed IIO_VOLTAGE → IIO_DENSITY channel type
- Updated all timing values to datasheet specifications

V1: [PATCH 1/2] https://lore.kernel.org/lkml/20250425215149.49068-1-surajsonawane0215@gmail.com/
    [PATCH 2/2] https://lore.kernel.org/lkml/20250425221214.50255-1-surajsonawane0215@gmail.com/

Thanks!
Suraj Sonawane

Suraj Sonawane (3):
  iio: Add IIO_DENSITY channel type
  dt-bindings: iio: chemical: Add sharp,gp2y1010au0f
  iio: chemical: Add driver for Sharp GP2Y1010AU0F

 Documentation/ABI/testing/sysfs-bus-iio       |   8 ++
 .../iio/chemical/sharp,gp2y1010au0f.yaml      |  78 +++++++++++
 MAINTAINERS                                   |   7 +
 drivers/iio/chemical/Kconfig                  |  10 ++
 drivers/iio/chemical/Makefile                 |   1 +
 drivers/iio/chemical/gp2y1010.c               | 126 ++++++++++++++++++
 include/uapi/linux/iio/types.h                |   1 +
 7 files changed, 231 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/chemical/sharp,gp2y1010au0f.yaml
 create mode 100644 drivers/iio/chemical/gp2y1010.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-06-14 12:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12 10:07 [PATCH v2 0/3] iio: chemical: Add Sharp GP2Y1010AU0F dust sensor support surajsonawane0215
2025-06-12 10:07 ` [PATCH v2 1/3] iio: Add IIO_DENSITY channel type surajsonawane0215
2025-06-12 12:58   ` Andy Shevchenko
2025-06-12 16:23   ` David Lechner
2025-06-12 10:07 ` [PATCH v2 2/3] dt-bindings: iio: chemical: Add sharp,gp2y1010au0f surajsonawane0215
2025-06-12 10:23   ` Krzysztof Kozlowski
2025-06-12 16:37   ` David Lechner
2025-06-12 10:07 ` [PATCH v2 3/3] iio: chemical: Add driver for Sharp GP2Y1010AU0F surajsonawane0215
2025-06-12 13:15   ` Andy Shevchenko
2025-06-12 18:24   ` David Lechner
2025-06-14 12:33   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).