Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbdISDLy (ORCPT ); Mon, 18 Sep 2017 23:11:54 -0400 Received: from mail-out-2.itc.rwth-aachen.de ([134.130.5.47]:34641 "EHLO mail-out-2.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001AbdISDLx (ORCPT ); Mon, 18 Sep 2017 23:11:53 -0400 X-IronPort-AV: E=Sophos;i="5.42,415,1500933600"; d="scan'208";a="14000924" From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: CC: , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Subject: [PATCH 0/4] iio: light: vl6180: Several fixes and enhancements Date: Tue, 19 Sep 2017 05:11:40 +0200 Message-ID: <20170919031144.4968-1-stefan.bruens@rwth-aachen.de> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [78.48.38.130] X-ClientProxiedBy: rwthex-s3-a.rwth-ad.de (2002:8682:1aa0::8682:1aa0) To rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 826 Lines: 21 Currently, the vl6180 driver reports bogus in_illuminance_scale values when the integration time or hardware gain are changed from its default value, i.e. it always reports a fixed value. To avoid readback of the register values in case integration time, gain or scale is queried, save the register values. Use the saved values to report the correct scale value. Stefan BrĂ¼ns (4): iio: light: vl6180: Move range check to integration time setter, cleanup iio: light: vl6180: Avoid readback of integration time register iio: light: vl6180: Cleanup als_gain lookup, avoid register readback iio: light: vl6180: Correct ALS scale for non-default gain/integration time drivers/iio/light/vl6180.c | 125 +++++++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 56 deletions(-) -- 2.14.1