Mon, Jun 24, 2019 at 12:32:03PM CEST, [email protected] wrote: >From: Vadim Pasternak <[email protected]> > >Extend macros MLXSW_REG_MTMP_TEMP_TO_MC() to allow support of negative >temperature readout, since chip and others thermal components are >capable of operating within the negative temperature. >With no such support negative temperature will be consider as very high >temperature and it will cause wrong readout and thermal shutdown. >For negative values 2`s complement is used. >Tested in chamber. >Example of chip ambient temperature readout with chamber temperature: >-10 Celsius: >temp1: -6.0C (highest = -5.0C) >-5 Celsius: >temp1: -1.0C (highest = -1.0C) > >v2 (Andrew Lunn): >* Replace '%u' with '%d' in mlxsw_hwmon_module_temp_show() > >Signed-off-by: Vadim Pasternak <[email protected]> >Signed-off-by: Ido Schimmel <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
