From: s.trumtrar@pengutronix.de (Steffen Trumtrar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/9] rtc: stmp3xxx: add sysfs entries for persistent regs
Date: Tue, 5 Mar 2013 09:02:52 +0100 [thread overview]
Message-ID: <20130305080252.GA7042@pengutronix.de> (raw)
In-Reply-To: <CACxGe6swW-UDH1cUw1D8P+gyhDC8nDZur-A_m_NBfeRUxcg9Jw@mail.gmail.com>
Hi Grant!
On Mon, Mar 04, 2013 at 11:14:54PM +0800, Grant Likely wrote:
> On Mon, Mar 4, 2013 at 10:05 PM, Steffen Trumtrar
> <s.trumtrar@pengutronix.de> wrote:
> > The persistent registers 1-5 are completely software defined. To have access
> > from userspace, export them via sysfs.
> >
> > Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>
> Hi Steffen,
>
> A few comments on this. First and foremost, any additions to the
> kernel sysfs interface must be accompanied with documentation in
> Documentation/ABI/. Second, adding attributes to an existing device
Okay. I forgot that and will add it in the next version.
> that has already been registered is almost guaranteed to be wrong. The
> attributes need to be added all at the same time so they are available
> immediately when the new device uevent is issued by the kernel.
>
> Instead, the correct thing to do is add an attribute_group to the
> child device before the device gets registered. See the 'attributes'
> section of Documentation/driver-model/device.txt to see how to do
> this.
>
> (I also see that the rtc core code is doing the wrong thing here also.
> rtc_sysfs_add_device(), rtc_sysfs_add_device() should also be replaced
> with an attribute group so that the sysfs files get added
> automatically; but that is outside the scope of this patch)
>
Hm, I modeled it after other rtcs and the rtc_sysfs. Seems that I have to
rework this.
Thanks,
Steffen
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2013-03-05 8:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 14:05 [PATCH 0/9] rtc: stmp3xxx: DT bindings and wakealarm Steffen Trumtrar
2013-03-04 14:05 ` [PATCH 1/9] MXS/i.MX28: add the possibility to define the used crystals via device tree Steffen Trumtrar
2013-03-07 6:17 ` Shawn Guo
2013-03-04 14:05 ` [PATCH 2/9] MXS/i.MX28: add the possibility to define the external RTC crystal Steffen Trumtrar
2013-03-07 6:33 ` Shawn Guo
2013-03-04 14:05 ` [PATCH 3/9] MXS/i.MX28: prepare different clocking of the built-in RTC Steffen Trumtrar
2013-03-07 6:40 ` Shawn Guo
2013-03-04 14:05 ` [PATCH 4/9] MXS/i.MX28: there is more than one way to clock the RTC Steffen Trumtrar
2013-03-07 6:48 ` Shawn Guo
2013-03-07 8:19 ` Steffen Trumtrar
2013-03-04 14:05 ` [PATCH 5/9] MXS/i.MX28: enable RTC to wakeup the system Steffen Trumtrar
2013-03-04 14:05 ` [PATCH 6/9] rtc: stmp3xxx: add sysfs entries for persistent regs Steffen Trumtrar
2013-03-04 15:14 ` Grant Likely
2013-03-05 8:02 ` Steffen Trumtrar [this message]
2013-03-06 13:27 ` Steffen Trumtrar
2013-03-04 14:05 ` [PATCH 7/9] rtc: stmp3xxx: Re-enable active alarm Steffen Trumtrar
2013-03-04 14:05 ` [PATCH 8/9] rtc: stmp3xxx: Check copy controller state Steffen Trumtrar
2013-03-04 14:05 ` [PATCH 9/9] rtc: stmp3xxx: Replace wait_time function Steffen Trumtrar
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=20130305080252.GA7042@pengutronix.de \
--to=s.trumtrar@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).