lkml.org 
[lkml]   [2023]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 5/5] thermal/drivers/mediatek/lvts_thermal: Update calibration data documentation
    On Tue, Apr 25, 2023 at 03:30:52PM +0200, bchihi@baylibre.com wrote:
    > From: Balsam CHIHI <bchihi@baylibre.com>
    >
    > Update LVTS calibration data documentation for mt8192 and mt8195.
    >
    > Signed-off-by: Balsam CHIHI <bchihi@baylibre.com>
    > ---
    > drivers/thermal/mediatek/lvts_thermal.c | 59 ++++++++++++++++++-------
    > 1 file changed, 43 insertions(+), 16 deletions(-)
    >
    > diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
    > index 8df7b4c72a658..3df4989f9902b 100644
    > --- a/drivers/thermal/mediatek/lvts_thermal.c
    > +++ b/drivers/thermal/mediatek/lvts_thermal.c
    > @@ -531,30 +531,57 @@ static int lvts_sensor_init(struct device *dev, struct lvts_ctrl *lvts_ctrl,
    > * The efuse blob values follows the sensor enumeration per thermal
    > * controller. The decoding of the stream is as follow:
    > *
    > - * stream index map for MCU Domain :
    > + * MT8195 :
    > + * Stream index map for MCU Domain mt8195 :
    > *
    > - * <-----mcu-tc#0-----> <-----sensor#0-----> <-----sensor#1----->
    > - * 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 | 0x09
    > + * <-----sensor#0-----> <-----sensor#1----->
    > + * 0x04 | 0x05 | 0x06 | 0x07 | 0x08 | 0x09

    I don't think you need to remove the controller calibration data from this
    comment, even though you don't use it in the code. Could come in handy in the
    future.

    > *
    [..]
    > + * MT8192 :
    > + * Stream index map for MCU Domain mt8192 :
    > + *
    > + * <--------sensor#0---------> <--------sensor#1--------->
    > + * 0x04 | 0x05 | 0x06 | 0x07 | 0x08 | 0x09 | 0x0A | 0x0B

    Each sensor data is 3 bytes long, just like for MT8195. The fourth byte contains
    the controller calibration data, but it is spread across these fourth bytes. I'd
    just leave these bytes undocumented for now since they're not currently used.

    So,

    + * <-----sensor#0-----> <-----sensor#1----->
    + * 0x04 | 0x05 | 0x06 | 0x07 | 0x08 | 0x09 | 0x0A | 0x0B

    etc.

    With that fixed,

    Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

    Thanks,
    Nícolas

    \
     
     \ /
      Last update: 2023-05-04 03:02    [W:2.357 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site