Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4833459rwl; Mon, 10 Apr 2023 18:14:25 -0700 (PDT) X-Google-Smtp-Source: AKy350ZfHlhBU6Tkokx9YrZ5FgSlAR0bZiCYT5cCu53pfmvUqjsWGra8YABChHF5xqFMZTLaeAf9 X-Received: by 2002:a17:906:c7c8:b0:94a:7da3:53ed with SMTP id dc8-20020a170906c7c800b0094a7da353edmr782817ejb.21.1681175665554; Mon, 10 Apr 2023 18:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681175665; cv=none; d=google.com; s=arc-20160816; b=Cma1UEdgioaWjCEo9CCdIPOoylvJYSOOFD8QT4CxlaN6mHO0V05dg5QKOlucMbS7O9 9DENEeEWC+TJZxAuYeMaLKy/M4umrlb8jqEyK8iGd655er/hiDwITI7toK5Chak+kDAh YV+haDGCveHE5gOD2nnIRFjlphicjgoCEfX2bfjGxPFhlWT/+5yXXCqD503gUQ9RnBN7 hJ/wI27dbHgugGEmh/I1v2o5e3GDuzZMGgmGcqAyHkq+Vqn05xFQSPL/pA87d+eaIEpT UbgajfAP38i+OtJMx4IVnMdrnaqwYX8ko35xClNKp/+SlLOHQ29utfp8xxTseWjK50a5 J/wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/RniW0EaX9rcvwsouXvZAHmibtnb+Rd+T7KCE24nNCY=; b=Ce9KYIbcujpa7UE3oVNkaZeRcS2X7ceebr7JwYMeW8ReLFpmi9DUk3ECpj1B8+nyOm xZEFLnw955RRx3GX65dUhaADgBAWtnM83vQoqLt3BcHC1JkQoPFsmtmPIQ12z9HmmIj2 ZbFL6Ejyc8vd5I94xH5S0+4f73jY0+Sb8xjGh7XbFN9+kAO8WF4gNYPhMXc7aBPfS2+m CFb5nCwP/moqJQpnn3xjKeofmkFwrWVDSXUYEwxpqUKOLCM5r4LzPimm4ZJaisoB4UvS cXv4LmGkwJ31qBN/PlqQfwJvlkaAjIVDgrQVh9+79rLbNiw2r5ftZDNx4MYqyIUjjmFF llkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tweaklogic.com header.s=google header.b=gpsiyl3t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a50ed82000000b005049e90c154si4556668edr.611.2023.04.10.18.14.00; Mon, 10 Apr 2023 18:14:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tweaklogic.com header.s=google header.b=gpsiyl3t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbjDKBMs (ORCPT + 99 others); Mon, 10 Apr 2023 21:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbjDKBMr (ORCPT ); Mon, 10 Apr 2023 21:12:47 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92482269E for ; Mon, 10 Apr 2023 18:12:45 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id g3so7613373pja.2 for ; Mon, 10 Apr 2023 18:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tweaklogic.com; s=google; t=1681175565; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/RniW0EaX9rcvwsouXvZAHmibtnb+Rd+T7KCE24nNCY=; b=gpsiyl3tfNAOPR0m9cBJ/TsIQ63Y4mPkjCNTA+VYKozlxBjFWEzvd64Aq70fLCazDa 1uyMQ+AZ3/ALLk2DY+vvAv/Buhv9+pgp4yyGF5lGMopZ/TUxbu+5Gvk1nwhksrGswrXO RVRIKItN+5FVk9g1akwV0E1bRqgaxvQIZpRcBTanTr3oAebtOIUl1lkE8gqeA0CiYfJu vKrMXKqTVKF+ZSLSaZLa5UVX/SV+ePk7mFlrb7qMPsw83dCiT/l5I2SWnf88TnZmW5vu 3wnhO57QQRFkwuYqs8GXtUV8PBMKdNg3bHN9zlDFv4wFW0QMue6O/55nO9EPhrefKRFB Om0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681175565; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/RniW0EaX9rcvwsouXvZAHmibtnb+Rd+T7KCE24nNCY=; b=men5vTjZrAkaQPgcUhlg4xXxn7IeI8HJseNIT/HHlw4XhQ5YcE26vvIe0plOsHNYIK 0xtOqEEYvC5Xl5WotS0dQSuozLR9p0OLXnYfBmt0Nn5mq4gRkEQZNlC6kxindvTyA0vN NOfX56S2jdIUXL16TzvzZd9y825N97nemSNtvVIAypKC2bbD8v63EQG7FXltSzHvw7Ih 734XSwwpoWy7X63NBJgENZ5zkJrozUc+XoVtw5dtWqX/s9FFj55N/zUELpTFpKQHdVlo FEMGr7eqfz3T8WP5RaKjidWz2xMdLUu803E28VZ2xGU6Um0tNDDl9L/Slrl0vNK0u8Ho P2uA== X-Gm-Message-State: AAQBX9dvvWE8VjYaMXpAQoQ8NCvXW7udCoazm8HKquyT3t7hqeX1CG+Z vD0V5i0BzQJFIUIBWgSjLV/7Jw== X-Received: by 2002:a17:90a:e114:b0:246:cade:8725 with SMTP id c20-20020a17090ae11400b00246cade8725mr2719986pjz.22.1681175564941; Mon, 10 Apr 2023 18:12:44 -0700 (PDT) Received: from subhajit-ThinkPad-Yoga-370.. ([124.148.71.115]) by smtp.gmail.com with ESMTPSA id k91-20020a17090a4ce400b00246b1b4a3ffsm2220957pjh.0.2023.04.10.18.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 18:12:44 -0700 (PDT) From: Subhajit Ghosh To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski Cc: Subhajit Ghosh , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Shreeya Patel , Paul Gazzillo , Zhigang Shi , Dmitry Osipenko Subject: [RFC PATCH 0/2] Support for Avago APDS9306 Ambient Light Sensor Date: Tue, 11 Apr 2023 09:12:01 +0800 Message-Id: <20230411011203.5013-1-subhajit.ghosh@tweaklogic.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds support for Avago (Broadcom) APDS9306 Ambient Light Sensor. Datasheet: https://docs.broadcom.com/doc/AV02-4755EN Following features are supported: - I2C interface - 2 channels - als and clear - Up to 20 bit resolution - 20 bit data register for each channel - Common Configurable items for both channels - Integration Time - Measurement Frequency - Scale - High and Low threshold interrupts for each channel - Selection of interrupt channel - als or clear - Selection of interrupt mode - threshold or adaptive - Level selection for adaptive threshold interrupts - Persistence (Period) level selection for interrupts Signed-off-by: Subhajit Ghosh Subhajit Ghosh (2): dt-bindings: Document APDS9306 Light Sensor bindings iio: light: Add support for APDS9306 Light Sensor .../bindings/iio/light/avago,apds9306.yaml | 47 + drivers/iio/light/Kconfig | 11 + drivers/iio/light/Makefile | 1 + drivers/iio/light/apds9306.c | 1146 +++++++++++++++++ 4 files changed, 1205 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9306.yaml create mode 100644 drivers/iio/light/apds9306.c base-commit: 0d3eb744aed40ffce820cded61d7eac515199165 -- 2.34.1