public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Chris Healy <cphealy@gmail.com>,
	Lucas Stach <l.stach@pengutronix.de>,
	Lee Jones <lee.jones@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jeff White <Jeff.White@zii.aero>
Subject: Re: [PATCH v6 1/2] platform: Add driver for RAVE Supervisory Processor
Date: Thu, 31 Aug 2017 11:15:45 +0200	[thread overview]
Message-ID: <20170831091545.GC12920@amd> (raw)
In-Reply-To: <4eca3066-8194-6fae-fec5-498b94347a65@cogentembedded.com>

[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]

On Thu 2017-08-31 12:01:01, Nikita Yushchenko wrote:
> >> I think that trying to make this generic is purely synthetic. This
> >> information is board-specific per it's nature, it comes from what board
> >> is designed for, different boards have quite different sets of possible
> >> reset reasons. What is needed is - pass this board-specific information
> >> to board-specific user space.
> >>
> >> What's proper API for that, if not a sysfs attribute?
> > 
> > Please go through the thread.
> > 
> > Sysfs attribute is okay, but:
> > 
> > 1) it should probably be a string
> > 
> > 2) it should certainly be superset of all the reasons
> > 
> > 3) it should be in generic place, say /sys/power/reset_reason
> > 
> > 4) it should be documented what each state means
> 
> What I'm concerned here is that a requirement appears for kernel driver
> to keep and maintain knowledge of what all that codes mean. For me,

There's no way around that. Kernel interfaces need to be
documented. If you are passing codes between kernel and application,
_those codes need to be documented_.
 
> So question is - is there any proper API to communicate
> application-private information from hardware through kernel to
> userspace without any in-kernel interpretation?

No.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2017-08-31  9:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 16:31 [PATCH v6 0/2] ZII RAVE platform driver Andrey Smirnov
2017-08-28 16:31 ` [PATCH v6 1/2] platform: Add driver for RAVE Supervisory Processor Andrey Smirnov
2017-08-30 10:55   ` Pavel Machek
2017-08-30 19:00     ` Andrey Smirnov
2017-08-30 20:38       ` Pavel Machek
2017-08-31  8:10         ` Nikita Yushchenko
2017-08-31  8:18           ` Pavel Machek
2017-08-31  9:01             ` Nikita Yushchenko
2017-08-31  9:15               ` Pavel Machek [this message]
2017-08-31 16:45   ` Greg Kroah-Hartman
2017-08-28 16:31 ` [PATCH v6 2/2] dt-bindings: mfd: Add bindings for ZII RAVE devices Andrey Smirnov
2017-09-04  7:52   ` Lee Jones

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=20170831091545.GC12920@amd \
    --to=pavel@ucw.cz \
    --cc=Jeff.White@zii.aero \
    --cc=andrew.smirnov@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=l.stach@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    /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