Message ID | cover.1659909060.git.jahau@rocketmail.com |
---|---|
Headers | show |
Series | Add support for magnetometer Yamaha YAS537 | expand |
Hi Andy, On 08.08.22 13:10, Andy Shevchenko wrote: > On Mon, Aug 8, 2022 at 1:07 AM Jakob Hauser <jahau@rocketmail.com> wrote: >> >> Use less stack by modifying %*ph parameters. >> >> Additionally, in the function yas530_get_calibration_data(), the debug dump was > > Additionally --> While at it > > (The difference is that "additionally" means you need to split to two > changes, which makes a little sense in this case) OK >> extended to 16 elements as this is the size of the calibration data array of >> YAS530. ... Kind regards, Jakob
Hi Andy, On 08.08.22 13:36, Andy Shevchenko wrote: > On Mon, Aug 8, 2022 at 1:07 AM Jakob Hauser <jahau@rocketmail.com> wrote: >> >> Add temperature calculation to the "chip_info" structure to ease the handling >> of different YAS variants. > > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> ... Due to C11 standard 6.6.7 considering array calls not as constant expression (discussion on patch 9), the temperature values need to be moved directly into the chip_info table as well. I would move the comments in a reduced way into the kernel doc. It would look like this: /** * struct yas5xx_chip_info - device-specific data and function pointers ... * @t_ref: number of counts at reference temperature 20 °C * @min_temp_x10: starting point of temperature counting in 1/10:s * degrees Celsius ... * * The "t_ref" value for YAS532/533 is known from the Android driver. * For YAS530 it was approximately measured. * * The temperatures "min_temp_x10" are derived from the temperature * resolutions given in the data sheets. */ struct yas5xx_chip_info { ... u16 t_ref; s16 min_temp_x10; ... }; static const struct yas5xx_chip_info yas5xx_chip_info_tbl[] = { [yas530] = { ... .t_ref = 182, /* counts */ .min_temp_x10 = -620, /* 1/10:s degrees Celsius */ ... }, [yas532] = { ... .t_ref = 390, /* counts */ .min_temp_x10 = -500, /* 1/10:s degrees Celsius */ ... }, [yas533] = { ... .t_ref = 390, /* counts */ .min_temp_x10 = -500, /* 1/10:s degrees Celsius */ ... }, }; As this is quite some change on that patch, I'd skip your "Reviewed-by:" tag and you would need to review it again in v6. Kind regards, Jakob