Re: [PATCH v2 1/2] Create eeprom_dev hardware class for EEPROM devices

From: Laszlo Papp
Date: Tue Feb 11 2014 - 08:03:18 EST


On Sat, Jan 25, 2014 at 12:23 AM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
> On 01/23/2014 11:16 AM, Curt Brune wrote:
>> Create a new hardware class under /sys/class/eeprom_dev
>>
>> EEPROM drivers can register their devices with the eeprom_dev class
>> during instantiation.
>>
>> The registered devices show up as:
>>
>> /sys/class/eeprom_dev/eeprom0
>> /sys/class/eeprom_dev/eeprom1
>> ...
>> /sys/class/eeprom_dev/eeprom[N]
>>
>> Each member of the eeprom class exports a sysfs file called "label",
>> containing the label property from the corresponding device tree node.
>>
>> Example:
>>
>> /sys/class/eeprom_dev/eeprom0/label
>>
>> If the device tree node property "label" does not exist the value
>> "unknown" is used.
>>
>> Note: The class cannot be called 'eeprom' as that is the name of the
>> I/O file created by the driver. The class name appears as a
>> sub-directory within the main device directory. Hence the class name
>> 'eeprom_dev'.
>>
>> Userspace can use the label to identify what the EEPROM is for.
>
> Since my previous email [1] seems to have vanished into the void, I'll
> try again more succinctly:
>
> How will this work on non device tree / openfirmware systems?
>
> Is there a better way to expose topology information (i.e. that the
> eeprom belongs to another device that might not live on the i2c bus at all)?
>
> Can we expose type information? There's a big difference between SPD
> EEPROMs, EDID EEPROMs, and nic mac-address-containing EEPROMs, for example.

I personally do not see major issues for improving that, but it might
be just me.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/