Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp33330839rwd; Sat, 8 Jul 2023 09:26:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfdj2Qbk1h/yXsuhynRhMkuO1uZit6YAuwTor340veuWqlM4HM+x9vAgp4D+bb/GedwltW X-Received: by 2002:a05:6a20:9383:b0:12e:c5fb:757 with SMTP id x3-20020a056a20938300b0012ec5fb0757mr15899055pzh.5.1688833594177; Sat, 08 Jul 2023 09:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688833594; cv=none; d=google.com; s=arc-20160816; b=zHhDmN29FNaum+Tqg/sEW/eD57i/rFaPRG7sJQqq4btgoFodtu/pKjJQzxldaNuL4y MF4HpR7jnhFAQfmYPodpdZQsox77KHkWM4gsO08qKp5dBvy87z6UwYa2V9YKfjMjdLYH KBXJMU6tLuMJIOFpOkbfDt/E4c6oCZ4UVZkI5ynnyZ8JVcqnXMlPP/vq9lshJljf2suI xD14IPtLk4LERqhghShTb4dYLJqsSmpWU05wo9Rv/Yl3Ym9pIrldcyQEUe+HrgkGJ1qb UKYSnGJ0oPQoNEnWg4XNVwhD9TLyWU2Gibh9Bh7lw6tvOpPcbQmrDI1rJlQupYWisj9m D+kg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=N1c3cBqUEMdcCbn3YXOVMIomrT23ZT80n59v7mpGLSc=; fh=6A/yyIjJm4kp5YlbsOunyTQi+bLFloivqrjLm2ZCMvc=; b=G6V+fL26JZ0Aw1wmACn/VLc7Wlo6PMg1lQdKu6kTZ/M2RxGek6HFXRnD+Xv3rQ1HpD hyWQFqCV35Mozhm6WpGUHgCdzD1RMamNiU0ICMO2ChTODY9ane5Dt7c1m8Bj+iTVDtyq kcM+up/gNjuDjBvz+kTOK0JqUaJ/taOAifYJTkGGCGjoROB7xU+m6FGVpPmbQnaxkyvK /ZoPzZsEGD4AX3UXNsyPSsPAo0eMOEfqe0KJfT5U2fFyMl23KzmMMY60d69LJ7uu61/A aevi4u0or1KQ/hWqF/R/O7rn/sJ/6QG57n5QrtLNFTdGgnj6UjReD4+kPv+Sxry1jAZL GUaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P0OGSgT8; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l191-20020a6391c8000000b0055ac5fed58dsi6272747pge.363.2023.07.08.09.26.22; Sat, 08 Jul 2023 09:26:34 -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=@kernel.org header.s=k20201202 header.b=P0OGSgT8; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229761AbjGHQG7 (ORCPT + 99 others); Sat, 8 Jul 2023 12:06:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjGHQG6 (ORCPT ); Sat, 8 Jul 2023 12:06:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C85981BB; Sat, 8 Jul 2023 09:06:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 62D6160D54; Sat, 8 Jul 2023 16:06:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5AFCC433C7; Sat, 8 Jul 2023 16:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688832416; bh=bfacAi1qvYjJDVjtB0AN9xWgrygw2bgt1Va270A9l+k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P0OGSgT8d5FK4EdEr0Y8Z0a9vcRtzXqRE3O0M/DlDMfPKKPlqMjBoNO+wiUeGeESL W4BxHZl2QIZQfNNOkE5z7Kp2rfbB+gtBqWqWaZre7kYKEZX4wmYq91k2Yv/5/iB3XT YypWkWQETZ4BEyFB7uiG/9od8xBYy3nIpUnl2cgxE2FDKpBfxRuUGfNLuuRKBjirfi YccOlW67qmQ/tgvw3BxE/alWlY1NsXpC6lPycYjmT9kpgwTF6E6KNhkkdmyeqyLvKz Z3iLDbLkpgSrjZTO3/i30beU202/Fh0HkzOcesgkX74MVj8aBNb1+B0y8yh480klJF 3TVJWXGPmXpQQ== Date: Sat, 8 Jul 2023 17:06:49 +0100 From: Jonathan Cameron To: Matti Vaittinen Cc: Matti Vaittinen , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] Support ROHM BU27010 RGBC sensor Message-ID: <20230708170649.6bdccc62@jic23-huawei> In-Reply-To: References: X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Fri, 7 Jul 2023 14:22:14 +0300 Matti Vaittinen wrote: > Support ROHM BU27010 RGBC + flickering sensor. > > Following description copied from commit log: > > > The ROHM BU27010 is an RGBC sensor with a flickering detection FIFO. The > > RGBC+IR sensor functionality is largely similar to what the BU27008 has. > > There are some notable things though: > > - gain setting is once again new and exotic. Now, there is 6bit gain > > setting where 4 of the bits are common to all channels and 2 bits > > can be configured separately for each channel. The BU27010 has > > similar "1X on other channels vs 2X on IR when selector is 0x0" > > gain design as BU27008 had. So, we use same gain setting policy for > > BU27010 as we did for BU27008 - driver sets same gain selector for > > all channels but shows the gains separately for all channels so users > > can (at least in theory) detect this 1X vs 2X madness... > > - BU27010 has suffled all the control register bitfields to new > > addresses and bit positions while still keeping the register naming > > same. > > - Some more power/reset control is added. > > - FIFO for "flickering detection" is added. > > > > The control register suffling made this slightly nasty. Still, it is > > easier for maintenance perspective to add the BU27010 support in BU27008 > > driver because - even though the bit positions/addresses were changed - > > most of the driver structure can be re-used. Writing own driver for > > BU27010 would mean plenty of duplicate code albeit a tad more clarity. > > This series is done on top of the iio-for-6.5a + this fix-up series: > https://lore.kernel.org/all/cover.1686648422.git.mazziesaccount@gmail.com/ > > I didn't spot these fixups from iio git although I think I saw mail > stating they were applied. They are now on the fixes-togreg branch of iio. Things are sometimes fiddly around the merge window. That tree may well be rebased again after rc1 is available. This series is going to have to wait to be applied until those fixes are in my upstream for the togreg branch. Thanks, Jonathan > > Revision history: > > v1 => v2: > - make vdd-supply required binding. > - Some re-ordering for struct member init. > - Some re-ordering for code to get rid of function declarations. > - Tidy up the mess from patch 2/3. > - Refactor parts from 3/3 to 2/3. > - Clean-up commented out code and tidy things in general. > > Please note: I'll be mostly away from the computer during July. Please, > take your time reviewing and forgive me if sending follow-up revisions > is delayed. > > --- > > Matti Vaittinen (3): > dt-bindings: iio: ROHM BU27010 RGBC + flickering sensor > iio: light: bu27008: add chip info > iio: light: bd27008: Support BD27010 RGB > > .../bindings/iio/light/rohm,bu27010.yaml | 49 ++ > drivers/iio/light/rohm-bu27008.c | 622 ++++++++++++++---- > 2 files changed, 556 insertions(+), 115 deletions(-) > create mode 100644 Documentation/devicetree/bindings/iio/light/rohm,bu27010.yaml >