From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Curt Brune <curt@cumulusnetworks.com>
Cc: Wolfram Sang <wsa@the-dreams.de>, Laszlo Papp <lpapp@kde.org>,
Thomas De Schampheleire <patrickdepinguin@gmail.com>,
gregkh@linuxfoundation.org,
Shrijeet Mukherjee <shm@cumulusnetworks.com>,
linux-i2c@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] Create eeprom_dev hardware class for EEPROM devices
Date: Mon, 7 Apr 2014 11:09:08 +0200 [thread overview]
Message-ID: <20140407090908.GE3926@lukather> (raw)
In-Reply-To: <1390504562-20333-1-git-send-email-curt@cumulusnetworks.com>
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
Hi,
On Thu, Jan 23, 2014 at 11:16:01AM -0800, 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.
>
> The real device is available from the class device via the "device"
> link:
>
> /sys/class/eeprom_dev/eeprom0/device
Sorry for stepping up this late, but I've been working on an eeprom
framework recently to move all the duplication that exists in the
eeprom drivers (such as sysfs file creation, in kernel accessors) to
common code. And part of that work was to create a eeprom class.
The only feature that's missing from your code is the label, but I
guess it can easily be added, and makes sense.
I'm not quite fond of some of the API yet, particularly on the in
kernel side, but I guess I can post what I have so far as an RFC and
get the discussion started.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2014-04-07 9:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 19:16 [PATCH v2 1/2] Create eeprom_dev hardware class for EEPROM devices Curt Brune
2014-01-24 18:42 ` Laszlo Papp
[not found] ` <CAOMwXhMfd8uw8n2Oa_BKW8UGzrUttD1L3=ATUGyDJMFy3kPUjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-24 19:27 ` Curt Brune
[not found] ` <20140124192742.GU29955-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-01-24 20:19 ` Laszlo Papp
[not found] ` <1390504562-20333-1-git-send-email-curt-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-01-25 0:23 ` Andy Lutomirski
[not found] ` <52E303FF.2010808-3s7WtUTddSA@public.gmane.org>
2014-02-11 13:03 ` Laszlo Papp
2014-04-07 9:09 ` Maxime Ripard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140407090908.GE3926@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=curt@cumulusnetworks.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpapp@kde.org \
--cc=patrickdepinguin@gmail.com \
--cc=shm@cumulusnetworks.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).