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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54759F8A.20303@baylibre.com>
Date:	Wed, 26 Nov 2014 10:38:18 +0100
From:	Benoit Cousson <bcousson@...libre.com>
To:	Guenter Roeck <linux@...ck-us.net>,
	Bartosz Golaszewski <bgolaszewski@...libre.com>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Patrick Titiano <ptitiano@...libre.com>
Subject: Re: [PATCH 1/5] hwmon: ina2xx: bail-out from ina2xx_probe() in case
 of configuration errors

Hi Guenter,

On 26/11/2014 04:05, Guenter Roeck wrote:

[...]

> Looking into the available documents, I am quite sure that the resistor
> is changed by replacing the probe, in other words by pulling the board
> with the ina226 and replacing it with another one. Given that, configuring
> the shunt resistor value with a sysfs attribute is really the wrong way
> to do it; you should use probe specific devicetree overlays instead.

Unfortunately, that's not dynamic enough for all the use cases we need 
to support with the probes.
In fact, most customers will rather put the shunts on their board and 
thus use a shunt-less version of the probe to do the measurement. In 
that case, there is no way we can hard code, even in a DTS, the shunt value.

That's for that kind of usage that we do need to be able to set the 
shunt value at runtime. The probe in that case can be pluged dynamically 
on different board jumpers to do the measurement.

Later, thanks to the web UI, the user will be able to configure the 
shunt value based on the way they were plugged to its boards.

sysfs seems to be the easiest way to do that. I don't think DT overlay 
can handle that, since it is depend of the targeted system and not on 
the measurement system.

Thanks,
Benoit

-- 
BenoƮt Cousson
BayLibre
Embedded Linux Technology Lab
www.baylibre.com
--
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