Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp291402lql; Mon, 11 Mar 2024 02:52:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXCKim+urzMwrKd8A8um92Bol50H/2SbmSklUXUViW9615ccnvsGuMlsLEIUoah6sBjlMAl4V7F+GXd9CASnCDDgdiJtg2rEoZS9uyRMA== X-Google-Smtp-Source: AGHT+IE8k2V3fyuTlKOrafkUrqOScreaw2HyP6MZg1Urn6twmERkkfC3FGJorNeZSm6GiDTTNVVW X-Received: by 2002:a05:622a:118f:b0:42e:e19a:cb5a with SMTP id m15-20020a05622a118f00b0042ee19acb5amr8075946qtk.47.1710150738250; Mon, 11 Mar 2024 02:52:18 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g3-20020ac85d43000000b0042f0f696a38si5166699qtx.148.2024.03.11.02.52.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 02:52:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=bF5k4Zi7; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-98652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98652-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F1C641C211AF for ; Mon, 11 Mar 2024 09:52:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0ABED20B00; Mon, 11 Mar 2024 09:52:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bF5k4Zi7" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8219617561; Mon, 11 Mar 2024 09:52:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710150729; cv=none; b=X4t25kHsqTbFW6Z70qzkJ7FznUCcIJfQB95mOT37/1XJ/DjEsKamQN2q6XfI9KOZMGYEK6o3FrhF4uyD8FeX6JcWAFuMIglBwK3mY+/dmkURjERTONLgAIXIIs/uHXdbERZsHqoF/QjMci3eLpjw2hjuY0w8EYQs2Xw8lBvrGQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710150729; c=relaxed/simple; bh=kHqGNEG12eLe3S/obPhPqU/Qc/8vK1W84077+sxQovU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lTlWQYnur3YpzO8mnQeBbL4dc26mEGAWgguao2pfqbEgVevN4nHVLxcZQQNiOHbRHtYJOlPGNtH0MjoOE9iL+aXkV1OUzlMONTH8m4o3F6AB9l4Kh4osVjsNqSo47ZESBCJZq0jMPL/lpQlNFXob6nno8Q2j5jTYMOLkeZMVLwk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bF5k4Zi7; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710150728; x=1741686728; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=kHqGNEG12eLe3S/obPhPqU/Qc/8vK1W84077+sxQovU=; b=bF5k4Zi7MyLC0sjzcpebHrvt13p7mYKzLvEYv/FxH2lF2VF2Wd+7eARK fYdLTisO24exmDrXsSwDlUlXP+XdWUFKffrOpjlpyvrI3akpcIRA+LXII FX7J8KLwzwqymNRvFHWmQqwHO2uJ5R9ZilWTD4maAKLwhrkZIi8/fBg93 8/RJyJ8U5DiHo06kqGyJKEYh/8ylWLv6eLFTGRN2enxUFOe0rnG7isV79 SjDdIo8JhCCEo91ZROoCHqJzLh5IzaveuKdke8UtOO4Fb0rC/kcdaNsFa x0kZW9GcpebXvAtmRkQvxfEFqoJnsu+MkyIic3gI0PDBByB6vV6tFQ0xk w==; X-IronPort-AV: E=McAfee;i="6600,9927,11009"; a="8619483" X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="8619483" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2024 02:52:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11009"; a="914354296" X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="914354296" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2024 02:52:03 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rjcK8-0000000BaI1-2XGg; Mon, 11 Mar 2024 11:52:00 +0200 Date: Mon, 11 Mar 2024 11:52:00 +0200 From: Andy Shevchenko To: Subhajit Ghosh Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matti Vaittinen , Marek Vasut , Anshul Dalal , Javier Carrasco , Matt Ranostay , Stefan Windfeldt-Prytz , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 0/5] Support for Avago APDS9306 Ambient Light Sensor Message-ID: References: <20240309105031.10313-1-subhajit.ghosh@tweaklogic.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240309105031.10313-1-subhajit.ghosh@tweaklogic.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Sat, Mar 09, 2024 at 09:20:26PM +1030, Subhajit Ghosh wrote: > Support for Avago APDS9306 Ambient Light Sensor. > > Driver support for Avago (Broadcom) APDS9306 Ambient Light Sensor. > It has two channels - ALS and CLEAR. The ALS (Ambient Light Sensor) > channel approximates the response of the human-eye providing direct > read out where the output count is proportional to ambient light levels. > It is internally temperature compensated and rejects 50Hz and 60Hz flicker > caused by artificial light sources. Hardware interrupt configuration is > optional. It is a low power device with 20 bit resolution and has > configurable adaptive interrupt mode and interrupt persistence mode. > The device also features inbuilt hardware gain, multiple integration time > selection options and sampling frequency selection options. > > This driver also uses the IIO GTS (Gain Time Scale) Helpers Namespace for > Scales, Gains and Integration time implementation. > > Link: https://docs.broadcom.com/doc/AV02-4755EN .. > - Removed 'ret' from iio_gts_find_new_gain_by_old_gain_time() > as it is not used. The current implementaion of the above > function passes all my tests of changing integration times, > scales and gains from userspace. This is weird. I believe we have to fix the API first before adding / dropping the return value from it. This odd API which makes everybody confused. -- With Best Regards, Andy Shevchenko