From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QuQ3qJbg" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F6921A7; Mon, 27 Nov 2023 08:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701101596; x=1732637596; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=F/1Z6F/qkdvf+ShW0L/YhA3CPDTmDttQCk27xrnwW8A=; b=QuQ3qJbgZzwVMaJBPKDXjCneHvzKBfFSCLIA2shqlHURVmjnjjXI9dgX yKXkqsYdm9xiCsT/P692u2WprvqC/3VRG92f+5zbwSukzOHLeCS0/n2U7 /Wpei0Yi1Fw7fJQz0rMQWQ0qsdnxjSVp7H5U5MiDIwt5/D01gYLGFwlhG w5klOta+sGYxiWvk5YTUBRKgWYTwj+4elHimHtwZUdgAN7UbSnxldNwwx IxHo61TUW1N+kZoIfR0dXf3PqZKvXIAjUgVpqbjUmz//nHmOd88RtiS3j 6Gd1livHe/JsPo/jwSzvDY52R/Xb++sBKW89gbYsCYYFqBpORTFJ4sDl2 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="389886472" X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="389886472" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 08:13:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="744607590" X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="744607590" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 08:13:10 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1r7eEL-0000000HYHk-4B1u; Mon, 27 Nov 2023 18:13:05 +0200 Date: Mon, 27 Nov 2023 18:13:05 +0200 From: Andy Shevchenko To: Marek Vasut Cc: linux-iio@vger.kernel.org, Matti Vaittinen , Alexander Stein , Andre Werner , Bjorn Helgaas , Conor Dooley , Fabio Estevam , Guenter Roeck , Jonathan Cameron , Krzysztof Kozlowski , Lars-Peter Clausen , Luca Ceresoli , Mark Brown , Naresh Solanki , Patrick Rudolph , Rob Herring , Stefan Windfeldt-Prytz , Vincent Tremblay , devicetree@vger.kernel.org Subject: Re: [PATCH v5 2/2] iio: light: isl76682: Add ISL76682 driver Message-ID: References: <20231125222738.97875-1-marex@denx.de> <20231125222738.97875-2-marex@denx.de> Precedence: bulk X-Mailing-List: linux-iio@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: <20231125222738.97875-2-marex@denx.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Sat, Nov 25, 2023 at 11:26:23PM +0100, Marek Vasut wrote: > The ISL76682 is very basic ALS which only supports ALS or IR mode > in four ranges, 1k/4k/16k/64k LUX. There is no IRQ support or any > other fancy functionality. ... > + for (i = 0; i < ARRAY_SIZE(isl76682_range_table); i++) { > + if (chan->type == IIO_LIGHT && val2 != isl76682_range_table[i].als) > + continue; > + if (chan->type == IIO_INTENSITY && val2 != isl76682_range_table[i].ir) > + continue; You forgot to drop indentation level for 'continue' lines. > + scoped_guard(mutex, &chip->lock) > + chip->range = isl76682_range_table[i].range; > + return 0; > + } -- With Best Regards, Andy Shevchenko