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] [day] [month] [year] [list]
Message-ID: <38b2ab8a0809050744u5d2c5fcfnd4a0732de70ce241@mail.gmail.com>
Date:	Fri, 5 Sep 2008 16:44:47 +0200
From:	"Francis Moreau" <francis.moro@...il.com>
To:	"Jean Delvare" <khali@...ux-fr.org>
Cc:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
	i2c@...sensors.org
Subject: Re: qestion about I2C_CLASS_HWMON flag

On Fri, Sep 5, 2008 at 3:49 PM, Jean Delvare <khali@...ux-fr.org> wrote:
> On Fri, 5 Sep 2008 15:38:23 +0200, Francis Moreau wrote:
>> On Fri, Sep 5, 2008 at 3:11 PM, Jean Delvare <khali@...ux-fr.org> wrote:
>> > It's not about hacking, it can be done cleanly. Just have the adapter
>> > driver code check for information in the platform data, and if class
>> > information is provided, use that instead of the default value. Or if
>> > all users will provide the information, don't even have a default in
>> > the driver. Again, the class flags are a (needed) mechanism, the policy
>> > is left for driver authors and platform maintainers to establish.
>>
>> Ah OK I see now.
>>
>> On v2.6.23 i2c-gpio.c had no I2C_CLASS_HWMON flag set and
>> had no way to pass this info from platform board.
>>
>> But on v2.6.27 it is now set whatever the platforms.
>>
>> Wouldn't it have been better to allow the platform code to pass this type
>> information through the 'i2c_gpio_platform_data' structure for example ?
>
> If you have a need for that, sure. If you don't, that's making the code
> more complex for no good reason.
>
> I expect I2C_CLASS_HWMON to be removed from that driver soon. Now that
> almost all hwmon drivers have been converted to support instantiated
> I2C devices, and given that all users of i2c-gpio are embedded
> architectures with platform code, it should be no longer needed. But
> again I am leaving it to whoever is actually using this driver to
> decide what is best for them.
>

OK, thanks a lot for the clarifications
-- 
Francis
--
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