From patchwork Tue Jun 13 09:35:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 13278181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BE76C88CB4 for ; Tue, 13 Jun 2023 09:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240769AbjFMJfj (ORCPT ); Tue, 13 Jun 2023 05:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241979AbjFMJfT (ORCPT ); Tue, 13 Jun 2023 05:35:19 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F205E52; Tue, 13 Jun 2023 02:35:18 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b227fdda27so44739101fa.1; Tue, 13 Jun 2023 02:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686648917; x=1689240917; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2iWhindHOsxnpq1wX2NfZLQ2L8M7YYJer1+2D3NT1I0=; b=qI24wwymKrn5XH2edmVN+C+LRRo6cF301xw6V0hkfV5BW5jNEY4eyT7+n9n5NRAsbC zEFndS0eB7pwG90caXDiL8nCHmvHzcQf6Ww6d+/5zgP7PQZQij9f2OFUhCybqxTitoxk PJTxMB0ri5uzzl550BFX/T4tEDaGNml4M2YW1WpWmRgKR/yPMWnssWqBAAZ5HypYfdI5 iRLvcbFLllQZSBKFzWxKrMlfNNSqFaSBQwpy9erh1Hy+2o0hZX0VHMjSuziIx/CqqC5X rdVTmil2ZVkwesOM48ISk38orXz6Em8BDdOzJhVjviXvnMBDPkvAY4jwemahiFBnN/eW gZmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686648917; x=1689240917; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2iWhindHOsxnpq1wX2NfZLQ2L8M7YYJer1+2D3NT1I0=; b=gnjwBOcjJLXkJY7Ic9lirswI3MkMwgiTUqb6s/4lTkxKa3rDwh77mEz3zrGlgBevef 4uPL8b3GAjIVHFB/f9Wck07Fug6SM+VUrR0+I4HLvOhchGFI4xLOcfhGGYNJnQuQBY/J eSbsc4RLcE42iWFZhkyVE0d5YjxCzGf1T51YJCB9jFenRQqeHrqsL+/085ELXeoTjv3v dyakvHDVbpObpL6Ji7Q5TBPXsRu+qdmcHc+H/XINOD9CXHMz/KvU9H3lgwvKrsizgODl E6D6DH3c7Z8XQOUaZKN2JPsCdjLXZSpnOrtTvCMhZoKUfodjI4BYVU5/0DQLR6B0eX9r VEjw== X-Gm-Message-State: AC+VfDzNnsSiz5aiO4bOKPgTN1lFPOXD7zrrdj6BgP/g2KNUBy1hVdUX Pw9Y3Bi5bd3zVIdKMlobWz4= X-Google-Smtp-Source: ACHHUZ5y84wlpKyjEID+HOXo8vs+sEKOLM5HA/5Eb2ufvQqxzT/ktpDk/GZyv6x+kpL1IrtE6zf8NA== X-Received: by 2002:a2e:2403:0:b0:2a7:7493:9966 with SMTP id k3-20020a2e2403000000b002a774939966mr2965359ljk.24.1686648916532; Tue, 13 Jun 2023 02:35:16 -0700 (PDT) Received: from dc78bmyyyyyyyyyyyyyyt-3.rev.dnainternet.fi (dc78bmyyyyyyyyyyyyyyt-3.rev.dnainternet.fi. [2001:14ba:16f8:1500::1]) by smtp.gmail.com with ESMTPSA id k15-20020a2e240f000000b002b1a872c826sm1837749ljk.61.2023.06.13.02.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 02:35:15 -0700 (PDT) Date: Tue, 13 Jun 2023 12:35:12 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] iio: light: bu27008: Fix intensity data type Message-ID: <240a7ca5fc1b76da20d81f930d00f31a54b1fdf8.1686648422.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org The intensity data from bu27008 is unsigned. The type of the scan data was incorrectly marked as signed resulting large intensity values to be interpreted as negative ones. Fix the scan data type. Signed-off-by: Matti Vaittinen --- Fixes tag not added because AFACS the bu27008 is not yet in any releases. --- drivers/iio/light/rohm-bu27008.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/rohm-bu27008.c b/drivers/iio/light/rohm-bu27008.c index 80eb14ea8193..b50bf8973d9a 100644 --- a/drivers/iio/light/rohm-bu27008.c +++ b/drivers/iio/light/rohm-bu27008.c @@ -190,7 +190,7 @@ static const struct iio_itime_sel_mul bu27008_itimes[] = { .address = BU27008_REG_##data##_LO, \ .scan_index = BU27008_##color, \ .scan_type = { \ - .sign = 's', \ + .sign = 'u', \ .realbits = 16, \ .storagebits = 16, \ .endianness = IIO_LE, \