From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbdIWW6f (ORCPT ); Sat, 23 Sep 2017 18:58:35 -0400 Received: from mail-out-1.itc.rwth-aachen.de ([134.130.5.46]:57310 "EHLO mail-out-1.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbdIWW6d (ORCPT ); Sat, 23 Sep 2017 18:58:33 -0400 X-IronPort-AV: E=Sophos;i="5.42,431,1500933600"; d="scan'208";a="14783523" From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: CC: , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Subject: [PATCH v2 0/4] iio: light: vl6180: Several fixes and enhancements Date: Sun, 24 Sep 2017 00:58:20 +0200 Message-ID: <20170923225824.8435-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: [77.181.79.149] X-ClientProxiedBy: rwthex-w1-b.rwth-ad.de (2002:8682:1a9d::8682:1a9d) 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 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. v2: removed redundant parenthesis, add missing spaces 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