lkml.org 
[lkml]   [2023]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v6 2/2] iio: pressure: driver for Honeywell HSC/SSC series
    On Wed, Nov 29, 2023 at 07:04:12PM +0200, Petre Rodan wrote:
    > Adds driver for digital Honeywell TruStability HSC and SSC series
    > pressure and temperature sensors.
    > Communication is one way. The sensor only requires 4 bytes worth of
    > clock pulses on both i2c and spi in order to push the data out.
    > The i2c address is hardcoded and depends on the part number.
    > There is no additional GPIO control.

    ...

    > v6: modifications based on Andy's review
    > - use str_has_prefix(), match_string() instead of strncmp()

    And why not using the respective property API for that case where
    match_string() is used?

    I'm also a bit tired to repeat about:
    - capitalization and punctuation in the multi-line comments;
    - broken indentation is some cases.

    Otherwise it's a good stuff, I leave it now to Jonathan.

    ...

    > + tmp = div_s64(((s64)(hsc->pmax - hsc->pmin)) * MICRO,
    > + hsc->outmax - hsc->outmin);
    > + hsc->p_scale = div_s64_rem(tmp, NANO, &hsc->p_scale_dec);
    > + tmp = div_s64(((s64)hsc->pmin * (s64)(hsc->outmax - hsc->outmin)) *
    > + MICRO, hsc->pmax - hsc->pmin);

    Why not put MICRO on the previous line?

    --
    With Best Regards,
    Andy Shevchenko


    \
     
     \ /
      Last update: 2023-11-29 18:25    [W:4.467 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site