Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393AbdHaISY (ORCPT ); Thu, 31 Aug 2017 04:18:24 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:60878 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbdHaISV (ORCPT ); Thu, 31 Aug 2017 04:18:21 -0400 Date: Thu, 31 Aug 2017 10:18:20 +0200 From: Pavel Machek To: Nikita Yushchenko Cc: Andrey Smirnov , linux-kernel , Chris Healy , Lucas Stach , Lee Jones , Greg Kroah-Hartman , Jeff White Subject: Re: [PATCH v6 1/2] platform: Add driver for RAVE Supervisory Processor Message-ID: <20170831081820.GB9597@amd> References: <20170828163131.24815-1-andrew.smirnov@gmail.com> <20170828163131.24815-2-andrew.smirnov@gmail.com> <20170830105515.GA4926@amd> <20170830203817.GA15462@amd> <35163bfd-d34f-40af-2494-340b6fe92b03@cogentembedded.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline In-Reply-To: <35163bfd-d34f-40af-2494-340b6fe92b03@cogentembedded.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2296 Lines: 71 --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2017-08-31 11:10:35, Nikita Yushchenko wrote: >=20 >=20 > 30.08.2017 23:38, Pavel Machek wrote: > > Hi! > >=20 > >>>> + * 9 -> Illegal Trap > >>>> + * 10 -> Unknown > >>>> + * 11 -> Crew Panel Requested > >>> > >>> Anyway... If you move management chip to .. I don't know, i2c, the > >>> path would change. Also it would be different path on N900. Userland > >>> should not have to deal with this. > >>> > >>> And... this should really be string, as the list will need to grow on > >>> different hardware. > >> > >> I think we have a misunderstanding, with this part of the patch set I > >> am not trying to propose a generic ABI that would be useful for any > >> other driver but this one. Hence the lack of concern for different > >=20 > > Yes, but sorry, that's no-go. Kernel should hide differences between > > different machiens, and it should be rather easy in this case. >=20 > There is an interest to have reset reason exported on other ZII hardware > as well. >=20 > 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. >=20 > 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 Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --s/l3CgOIzMHHjg/5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlmnxkwACgkQMOfwapXb+vJCqwCfa6AzdeciUu7CZLVuSJX2OcZ5 MxAAnRobTWvZZOg2HGIT9IoYz4VPIHql =Eao+ -----END PGP SIGNATURE----- --s/l3CgOIzMHHjg/5--