lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150625171835.GA5009@roeck-us.net>
Date:	Thu, 25 Jun 2015 10:18:35 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Constantine Shulyupin <const@...elinux.com>
Cc:	jdelvare@...e.de, lm-sensors@...sensors.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fix nct7802_temp_is_visible

Hi Constantine,

On Thu, Jun 25, 2015 at 08:10:36PM +0300, Constantine Shulyupin wrote:
> Hi Guenter,
> 

Please don't top-post.

> Excerpt from datasheet:
> 7.2.32 Mode Selection Register
> RTD3_MD : 00=Closed , 01=Reserved , 10=Thermistor mode , 11=Voltage sense
> 
> As I understand the datasheel value 11b is valid too and the resister
> should be visible. It is legit to hide registers on 00=Closed and
> optionally on 01=Reserved (RTD3_MD only).
> 
mode=11b configures the sensor to voltage mode, and the voltage is then
reported with inX_input. Why do you think it should be reported as
temperature ? How do you propose to translate the reported voltage
to a temperature value ?

> I suppose condition RTD3_MD == 01b can be uncounted because is it reserved
> should not be used. temp3_* registers should be visible when RTD3_MD is 10b
> or 11b and hidden when RTD3_MD == 0 and optionally when RTD3_MD == 1
> 
> Therefore I propose to hide temp3_* when RTD3_MD != 0:
>  if (index >= 18 && index < 27 && !(reg & 0x30)  /* RD3 */
> 
> or when RTD3_MD == 0 or RTD3_MD == 1:
>  if (index >= 18 && index < 27 && (reg & 0x30) <= 0x10)  /* RD3 */
> 
> Do you agree?

No - see above. You don't explain why you want voltages reported as
temperatures, and you don't explain the proposed transition function
from voltages to temperatures, or the rationale for it.

What error are trying to fix, actually ? Do you have a temperature sensor
connectecd to the chip which reports a temperature as voltage and
needs a translation function from voltage to temperature ? Can you
provide a link to the datasheet for that sensor, and details on how it is
connected to the chip ?

Thanks,
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ