Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3227724imw; Mon, 11 Jul 2022 04:45:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uHBupA84n8ocV+oQ/XeCoN7ynrxj2bsOADk4eEHJ55cFJUegoRZ812NoYfxAaHwPV0IOIa X-Received: by 2002:a17:903:2d0:b0:14d:8a8d:cb1 with SMTP id s16-20020a17090302d000b0014d8a8d0cb1mr18786154plk.50.1657539932980; Mon, 11 Jul 2022 04:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657539932; cv=none; d=google.com; s=arc-20160816; b=0kCxvfOsbUO9r7+DQlDiiTzaLhEsjD8LFd4Xx71EtwDTllhwV94aM2Ho7mrQH3B9ho 132s7kJWfHwtBMcfouUVSqO1IK+RSNbtsOkpqZu3/uZf/TONPg6Dga6Aum2CtpXZ3ELm NI5CYBHn6dY78tUa4IvPYfOIvVj59mLFCz1hgYm4CDuV5kFQino09/qOyPdVQKSem/nt jw1f3qb7NAEGkiDYcMGJIkDMOdz7LvW8WrxXK0owKoy7GVfVVBpqHvGbp8TQMmvl19T4 mocU1M7C0MFkjgmy2X+BL1T8K+1cWpmlLZZn0BIPm67mlBNEK7hUpYZLXmlyV0hviQCK VRjg== 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=/QZOakxOVp29TlSAnYlm8xXA+y3PoUcyJKpXyF7nbYU=; b=qoo0DwA3FjBfrg1Akei0ziOWVhzTkehZxJpNkuuzdtuB3vy7hX2l4tDusaKjq4/xLS 1LsUG32WiIfiF1tvQkreLy4Hr+utWe/7x+0HT0yizwcuWhavd/2Qwqzz3CIWXF/6qCff jQCiFV2XWnwVDY++kf+/00xzoIv0p8UxSyFanvmH0e7sr6TjncebIZx4aQtYw2fKZ62M c3CzWdlUtMfn1E/8wFEQYQiW350F8d8+Xl6gyGLodStX42IDpF9YjXdjiKaJVsgWVvph vzKVRg/ZMIXpmsIrEZ2flJKNRJlwR5HmXqlNLc+eetCd8YTXlWYEGGYTwF6r3vnU7cUH cLxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=G+o6Ga7y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a170903105300b0016c115c7469si8840868plc.9.2022.07.11.04.45.20; Mon, 11 Jul 2022 04:45:32 -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=@collabora.com header.s=mail header.b=G+o6Ga7y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbiGKLlk (ORCPT + 99 others); Mon, 11 Jul 2022 07:41:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbiGKLl1 (ORCPT ); Mon, 11 Jul 2022 07:41:27 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 530C5A2E42; Mon, 11 Jul 2022 04:29:57 -0700 (PDT) Received: from localhost.localdomain (unknown [IPv6:2405:201:10:3153:7fbd:8a7b:29b6:89fb]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: shreeya) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2F44E66019F3; Mon, 11 Jul 2022 12:29:42 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657538995; bh=oEA9geemM6d6f1WCayauCfA/4E7qiOfsIP9LiuJPjkE=; h=From:To:Cc:Subject:Date:From; b=G+o6Ga7ydXDvGIzs2n4XgIiQFyxdYYS15dk7VFPkACY00VdUwTpv88oLiHY6DKiqN x+rii6auyDvaXm/MgnOjC0JG66eSM4j5WxikJNKgR6Cni/1Li9tE9mX4DY9vSZVpQo Y2n2Um4taoFwiNY9TZYvGS4E7iAu70T/VXeT33uhNHoUJNvQDqBWzZPcsCIqraCu8m CPzeQzYP0fq45yA31YHvZD+LRyaUItEFal9C9y5KEvoIcXywSi70f4xQXZBYG1crgG b5hcXX40wxXWfap8MLf1psVsAhCfcg9ihqOHlnSzsvboo7jjWc+wF3+YftuuphxmUM panu4EZOFgsXQ== From: Shreeya Patel To: jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, Zhigang.Shi@liteon.com Cc: krisman@collabora.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, alvaro.soliverez@collabora.com, dmitry.osipenko@collabora.com, andy.shevchenko@gmail.com, Shreeya Patel Subject: [PATCH v7 0/2] Add LTRF216A Driver Date: Mon, 11 Jul 2022 16:58:58 +0530 Message-Id: <20220711112900.61363-1-shreeya.patel@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 patchset adds support for ltrf216a Ambient Light Sensor and documents the DT bindings for the same. Changes in v7 - Add regmap support. - Fix runtime power management implementation. - Fix the ordering of devm and non-devm functions. - Use DEFINE_RUNTIME_DEV_PM_OPS macro - Fix the error reported by kernel test robot for bindings. Changes in v6 - Fix some errors reported by kernel test robot. - Add protocol details for the datasheet link. - Remove useless assignments. - Add unit details for read data delay macro. - Use pm_sleep_ptr(). Changes in v5 - Add power management support. - Add reset functionality. - Use readx_poll_timeout() to get data. - Cleanup some of the redundant code. - Update int_time_fac after I2C write is successful. - Rename mutex to lock. - Use Reverse Xmas tree pattern for all variable definitions. - Improve error handling messages and add error codes. - Add one more MODULE_AUTHOR. - Remove cleardata which was reading data for infrared light. - Remove patch for deprecated vendor prefix [PATCH v4 3/3]. - Remove deprecated string from DT binding document. Changes in v4 - Add more descriptive comment for mutex lock - Fix mutex locking in read_raw() - Use i2c_smbus_read_i2c_block_data() Changes in v3 - Use u16 instead of u8 for int_time_fac - Reorder headers in ltrf216a.c file - Remove int_time_mapping table and use int_time_available - Fix indentation in the bindings file. Changes in v2 - Add support for 25ms and 50ms integration time. - Rename some of the macros as per names given in datasheet - Add a comment for the mutex lock - Use read_avail callback instead of attributes and set the appropriate _available bit. - Use FIELD_PREP() at appropriate places. - Add a constant lookup table for integration time and reg val - Use BIT() macro for magic numbers. - Improve error handling at few places. - Use get_unaligned_le24() and div_u64() - Use probe_new() callback and devm functions - Return errors in probe using dev_err_probe() - Use DEFINE_SIMPLE_DEV_PM_OPS() - Correct the formula for lux to use 0.45 instead of 0.8 - Add interrupt and power supply property in DT bindings - Add vendor prefix name as per the alphabetical order. Shreeya Patel (2): dt-bindings: Document ltrf216a light sensor bindings iio: light: Add support for ltrf216a sensor .../bindings/iio/light/liteon,ltrf216a.yaml | 49 ++ drivers/iio/light/Kconfig | 11 + drivers/iio/light/Makefile | 1 + drivers/iio/light/ltrf216a.c | 423 ++++++++++++++++++ 4 files changed, 484 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml create mode 100644 drivers/iio/light/ltrf216a.c -- 2.30.2