linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: Rob Herring <robherring2@gmail.com>
Cc: Wolfram Sang <w.sang@pengutronix.de>, Wolfgang Denk <wd@denx.de>,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org,
	Vitaly Bordug <vbordug@ru.mvista.com>,
	linux-watchdog@vger.kernel.org
Subject: Re: [PATCH] drivers, char: add U-Boot bootcount driver
Date: Mon, 30 Jan 2012 13:35:45 +0100	[thread overview]
Message-ID: <4F268EA1.3090907@denx.de> (raw)
In-Reply-To: <4EDEA3BF.6020507@gmail.com>

Hello Rob,

Sorry for the late reply ...

Rob Herring wrote:
> On 12/06/2011 04:06 PM, Wolfram Sang wrote:
>>>> bootcount itself is not a device. It is a feature of certain devices. And that
>>>> needs to be implemented; possibly generic enough that it can work for register
>>>> based, i2c based, and so forth, accesses.
>>> If "boot counter" is not a good name for such a device, then what name
>>> would you suggest?
>> None.
>>
>>> Or do you think a counter (which can be implemented in a number of
>>> different ways, depending on hardware specifics) is not a device?
>> Yes.
>>
>>> What would be such a device, then?
>> "maxim,ds1338"
>>
>> Please have a look at the devicetree.org-wiki-page I just mentioned:
>>
>> http://devicetree.org/Device_Tree_Usage
>>
> 
> Perhaps fs/pstore would be a good choice for the user space interface
> (defining a new file bootcount). This can support any arbitrary backing
> device although pretty much only ACPI is implemented.

I tried to use fs/pstore for the bootcount feature, and I can mount
and read the bootcount value from the file, I created. But I could not
write to that file ... I only see the callback from
include/linux/pstore.h

struct pstore_info {
[...]
        int             (*write)(enum pstore_type_id type,
                        enum kmsg_dump_reason reason, u64 *id,
                        unsigned int part, size_t size, struct pstore_info *psi);

called, if I reboot ... do I miss something? Or is it not possible
to write to the files created through fs/pstore?

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2012-01-30 12:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-04  9:45 [PATCH] drivers, char: add U-Boot bootcount driver Heiko Schocher
2011-12-04 10:34 ` Matthias Kaehlcke
2011-12-04 11:47 ` Wolfram Sang
2011-12-04 16:34   ` Wolfgang Denk
2011-12-05  7:43   ` Thierry Reding
2011-12-05 14:39   ` Heiko Schocher
2011-12-06 21:50     ` Wolfram Sang
2011-12-06 21:56       ` Wolfgang Denk
2011-12-06 22:06         ` Wolfram Sang
2011-12-06 23:22           ` Rob Herring
2012-01-30 12:35             ` Heiko Schocher [this message]
2011-12-04 16:42 ` Paul Bolle
2011-12-04 23:30 ` Ryan Mallon

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=4F268EA1.3090907@denx.de \
    --to=hs@denx.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=robherring2@gmail.com \
    --cc=vbordug@ru.mvista.com \
    --cc=w.sang@pengutronix.de \
    --cc=wd@denx.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).