Message ID | 240a7ca5fc1b76da20d81f930d00f31a54b1fdf8.1686648422.git.mazziesaccount@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp422673vqr; Tue, 13 Jun 2023 02:57:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5v9/KpVU2l6Nmj4fYycTw7uLSpMKUOIaxuxgflKPVZ6dC5RDMMmNpZjn3sfHIz6FuK5WvI X-Received: by 2002:a05:6a20:7343:b0:107:35ed:28b5 with SMTP id v3-20020a056a20734300b0010735ed28b5mr14837534pzc.2.1686650253209; Tue, 13 Jun 2023 02:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686650253; cv=none; d=google.com; s=arc-20160816; b=z1B1hi2DGcvonIWjpCpC+g7d2GSjVWIivJ2Hp9G2G68pEVEZZO4d3ucP5cwb5NS04a FYrZQkoWkNMQ+JlxAG9VFzcawu47xd7UkIIfLsY5AvhSLBy9My6di27EbDzuTXCyrf8B gBlgaSEHgzrVBFLdBRr0B+583OYpVjnhvUf6Av5O1f8takYno4LTdfLGrj8XNw5lN2mt KGwtPZU8zWZiIL8jA0QSy55wv9byZzgQSKVhnKLNYIJUoQtxlxIKzECswWle0Ip8uqXy F1k5dD9Sn3Ss4bsSZdD7/6B87gYJM91+t1txSzwZKFE2QERHC+uxESHwlfXfrclKbRU5 33Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2iWhindHOsxnpq1wX2NfZLQ2L8M7YYJer1+2D3NT1I0=; b=N3Mqrqz8fG2S1AKxeC4WIx+Th8lPiV7rC59B0AITRzxkjotY18tTwQ6J/P1hWkZQc7 +7T5mS7UaXNcMCDiWUVwb5J/qH+lJgChQ4skx5bEGMwRU22DyCI/S1C5iDWvJVIwcBqa xm/dWcxfPiCzWWA/gOtzLuracu19/qwgn9UfoPn/U8pPCRFoF5EjKhcOlbotCK6MrAMB 7o6KtmcnGeARdTurTL3Mg6VCcRa1gcpWyY+OJsVUbveVwqbvjJCgASY39oTa6N7AZYU4 PQd9ynpZSuRkTddyAdIrjGwlGDVD5AxtLJD3cP6KQCdVVMF3mw5jzRXj9N0nFa6vJFCY iD8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qI24wwym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u129-20020a637987000000b0053f89d7b39esi3764457pgc.346.2023.06.13.02.57.20; Tue, 13 Jun 2023 02:57:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qI24wwym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240615AbjFMJgB (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 13 Jun 2023 05:36:01 -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 <rfc822;linux-kernel@vger.kernel.org>); 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-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 <mazziesaccount@gmail.com> To: Matti Vaittinen <mazziesaccount@gmail.com>, Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Cc: Matti Vaittinen <mazziesaccount@gmail.com>, Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, 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: <cover.1686648422.git.mazziesaccount@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VHU0M3xPK1b1nyOO" Content-Disposition: inline In-Reply-To: <cover.1686648422.git.mazziesaccount@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768580975868151937?= X-GMAIL-MSGID: =?utf-8?q?1768580975868151937?= |
Series |
ROHM BUxxx light sensor fixes
|
|
Commit Message
Matti Vaittinen
June 13, 2023, 9:35 a.m. UTC
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 <mazziesaccount@gmail.com>
---
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(-)
Comments
On Tue, 13 Jun 2023 12:35:12 +0300 Matti Vaittinen <mazziesaccount@gmail.com> wrote: > 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 <mazziesaccount@gmail.com> Applied series to the fixes-togreg branch of iio.git (which now includes this as it's upstream in char-misc-next) Added fixes tags where needed given the ids are now stable Thanks, Jonathan > > --- > 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, \
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, \