From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v2 4/4] iio: veml3235: fix scale to conform to ABI
Date: Mon, 30 Dec 2024 14:13:39 +0200 [thread overview]
Message-ID: <a83c2a6d-655a-45c1-87fd-a233fabbea82@gmail.com> (raw)
In-Reply-To: <D6OY5V93Q2YC.S61HE5A0GMO1@gmail.com>
On 30/12/2024 12:01, Javier Carrasco wrote:
> On Sun Dec 29, 2024 at 7:53 AM CET, Matti Vaittinen wrote:
>> On 24/12/2024 12:59, Javier Carrasco wrote:
>>> The current scale is not ABI-compliant as it is just the sensor gain
>>> instead of the value that acts as a multiplier to be applied to the raw
>>> value (there is no offset).
>>>
>>> Use the iio-gts helpers to obtain the proper scale values according to
>>> the gain and integration time to match the resolution tables from the
>>> datasheet. When at it, use 'scale' instead of 'gain' consistently for
>>> the get/set functions to avoid misunderstandings.
>>>
>>> Fixes: c5a23f80c164 ("iio: light: add support for veml3235")
>>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>>> ---
>>
>> This looks good to me, although I now think we made a mistake with the
>> naming of the iio_gts_find_gain_sel_in_times().
>>
>> The intended use is finding the gain and time (selector) for the new
>> scale (while preferring keeping the time unchanged if possible), right?
>>
>> So, in this regard it'd be better to use name which reflects the fact
>> that the function finds gain and time for given scale.
>>
>> I would now (after having to look the doc of this new function while
>> reviewing the code 2 weeks after reviewing this new function :rolleyes:)
>> name it something like:
>>
>> iio_gts_find_gain_time_sel_for_scale()
>>
>> Well, it's not really in the scope of the review anymore, but I'd love
>> to see a renaming patch while we have only one user... :)
>>
>> Anyways:
>>
>> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
>>
> Thank you for your suggestion, I will add it to v3 as this patch and the
> one that introduced the helper functions have not been applied yet, so
> we don't need an extra patch to rename the function.
Great, Thanks!
> I will add your
> tag too because I will only change what you suggested.
Sure!
Yours,
-- Matti
prev parent reply other threads:[~2024-12-30 12:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-24 10:58 [PATCH v2 0/4] iio: light: fix scale in veml3235 and add helpers to iio-gts Javier Carrasco
2024-12-24 10:59 ` [PATCH v2 1/4] iio: gts-helper: add helpers to ease searches of gain_sel and new_gain Javier Carrasco
2024-12-28 15:41 ` Jonathan Cameron
2024-12-30 9:58 ` Javier Carrasco
2024-12-24 10:59 ` [PATCH v2 2/4] iio: light: veml3235: fix code style Javier Carrasco
2024-12-28 15:42 ` Jonathan Cameron
2024-12-24 10:59 ` [PATCH v2 3/4] iio: light: veml3235: extend regmap to add cache Javier Carrasco
2024-12-28 15:43 ` Jonathan Cameron
2025-01-12 15:18 ` Andy Shevchenko
2025-01-12 16:07 ` Javier Carrasco
2025-01-12 16:11 ` Andy Shevchenko
2025-01-12 16:21 ` Javier Carrasco
2025-01-12 18:50 ` Andy Shevchenko
2025-01-14 13:23 ` Jonathan Cameron
2024-12-24 10:59 ` [PATCH v2 4/4] iio: veml3235: fix scale to conform to ABI Javier Carrasco
2024-12-28 15:47 ` Jonathan Cameron
2024-12-29 6:53 ` Matti Vaittinen
2024-12-30 10:01 ` Javier Carrasco
2024-12-30 12:13 ` Matti Vaittinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a83c2a6d-655a-45c1-87fd-a233fabbea82@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox