Re: [PATCH v5 1/6] sysinfo: Add IDs for board id and revision

2023-10-18 Thread Detlev Casanova
On Monday, October 16, 2023 1:37:40 P.M. EDT Heinrich Schuchardt wrote:
> On 10/2/23 17:20, Detlev Casanova wrote:
> > These IDs will be used by the sysinfo command. The new IDs are:
> >   * SYSINFO_ID_BOARD_ID: The board ID as an integer
> >   * SYSINFO_ID_BOARD_REV_MAJOR: The board major revision as int
> >   * SYSINFO_ID_BOARD_REV_MINOR: The board minor revision as int
> 
> Integers will not work in the generic case. E.g. for the VisionFive 2
> board we have seen board revisions:
> 
> 1.2A, 1.2B, 1.3B
> 
> For the Wandboard:
> 
> B1, D1

>From this, I gather that the revision should just be a string value, as there 
is no generic way to represent all variations of the revision "numbers".

> > Reviewed-by: Marek Vasut 
> > Signed-off-by: Detlev Casanova 
> > ---
> > 
> >   include/sysinfo.h | 5 +
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/sysinfo.h b/include/sysinfo.h
> > index b140d742e93..13815600ae6 100644
> > --- a/include/sysinfo.h
> > +++ b/include/sysinfo.h
> > @@ -47,6 +47,11 @@ enum sysinfo_id {
> > 
> > /* For show_board_info() */
> > SYSINFO_ID_BOARD_MODEL,
> > 
> > +   /* For sysinfo command (all int) */
> 
> Please, provide a Sphinx style documentation for every value. Cf.
> https://www.kernel.org/doc/html/v5.3/doc-guide/kernel-doc.html#structure-uni
> on-and-enumeration-documentation
> 
> Best regards
> 
> Heinrich
> 
> > +   SYSINFO_ID_BOARD_ID,
> > +   SYSINFO_ID_BOARD_REV_MAJOR,
> > +   SYSINFO_ID_BOARD_REV_MINOR,
> > +
> > 
> > /* First value available for downstream/board used */
> > SYSINFO_ID_USER = 0x1000,
> >   
> >   };






Re: [PATCH v5 1/6] sysinfo: Add IDs for board id and revision

2023-10-16 Thread Marek Vasut

On 10/16/23 19:37, Heinrich Schuchardt wrote:

On 10/2/23 17:20, Detlev Casanova wrote:

These IDs will be used by the sysinfo command. The new IDs are:
  * SYSINFO_ID_BOARD_ID: The board ID as an integer
  * SYSINFO_ID_BOARD_REV_MAJOR: The board major revision as int
  * SYSINFO_ID_BOARD_REV_MINOR: The board minor revision as int


Integers will not work in the generic case. E.g. for the VisionFive 2
board we have seen board revisions:

1.2A, 1.2B, 1.3B

For the Wandboard:

B1, D1


Dang, I literally had this in my upstreaming queue today, so, sigh.
Dropped for now :-(

--
Best regards,
Marek Vasut



Re: [PATCH v5 1/6] sysinfo: Add IDs for board id and revision

2023-10-16 Thread Heinrich Schuchardt

On 10/2/23 17:20, Detlev Casanova wrote:

These IDs will be used by the sysinfo command. The new IDs are:
  * SYSINFO_ID_BOARD_ID: The board ID as an integer
  * SYSINFO_ID_BOARD_REV_MAJOR: The board major revision as int
  * SYSINFO_ID_BOARD_REV_MINOR: The board minor revision as int


Integers will not work in the generic case. E.g. for the VisionFive 2
board we have seen board revisions:

1.2A, 1.2B, 1.3B

For the Wandboard:

B1, D1



Reviewed-by: Marek Vasut 
Signed-off-by: Detlev Casanova 
---
  include/sysinfo.h | 5 +
  1 file changed, 5 insertions(+)

diff --git a/include/sysinfo.h b/include/sysinfo.h
index b140d742e93..13815600ae6 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -47,6 +47,11 @@ enum sysinfo_id {
/* For show_board_info() */
SYSINFO_ID_BOARD_MODEL,

+   /* For sysinfo command (all int) */


Please, provide a Sphinx style documentation for every value. Cf.
https://www.kernel.org/doc/html/v5.3/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation

Best regards

Heinrich


+   SYSINFO_ID_BOARD_ID,
+   SYSINFO_ID_BOARD_REV_MAJOR,
+   SYSINFO_ID_BOARD_REV_MINOR,
+
/* First value available for downstream/board used */
SYSINFO_ID_USER = 0x1000,
  };




Re: [PATCH v5 1/6] sysinfo: Add IDs for board id and revision

2023-10-02 Thread Simon Glass
On Mon, 2 Oct 2023 at 09:21, Detlev Casanova
 wrote:
>
> These IDs will be used by the sysinfo command. The new IDs are:
>  * SYSINFO_ID_BOARD_ID: The board ID as an integer
>  * SYSINFO_ID_BOARD_REV_MAJOR: The board major revision as int
>  * SYSINFO_ID_BOARD_REV_MINOR: The board minor revision as int
>
> Reviewed-by: Marek Vasut 
> Signed-off-by: Detlev Casanova 
> ---
>  include/sysinfo.h | 5 +
>  1 file changed, 5 insertions(+)
>

Reviewed-by: Simon Glass