[PATCH v2 2/2] smbios: fill wake-up type
Tom Rini
trini at konsulko.com
Fri Feb 9 19:58:24 CET 2024
On Fri, Feb 09, 2024 at 07:37:28PM +0100, Heinrich Schuchardt wrote:
> On 2/9/24 19:12, Tom Rini wrote:
> > On Fri, Feb 09, 2024 at 04:51:15PM +0100, Heinrich Schuchardt wrote:
> >
> > > We should not use the reserved value 0x00 for the wake up type but
> > > use 0x02 (Unknown).
> > >
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> > [snip]
> > > @@ -108,6 +108,16 @@ struct __packed smbios_type0 {
> > > char eos[SMBIOS_STRUCT_EOS_BYTES];
> > > };
> > > +#define SMBIOS_WAKEUP_TYPE_RESERVED 0x00
> > > +#define SMBIOS_WAKEUP_TYPE_OTHER 0x01
> > > +#define SMBIOS_WAKEUP_TYPE_UNKNOWN 0x02
> > > +#define SMBIOS_WAKEUP_TYPE_APM_TIME 0x03
> > > +#define SMBIOS_WAKEUP_TYPE_MODEM_RING 0x04
> > > +#define SMBIOS_WAKEUP_TYPE_LAN_REMOTE 0x05
> > > +#define SMBIOS_WAKEUP_TYPE_POWER_SWITCH 0x06
> > > +#define SMBIOS_WAKEUP_TYPE_PCI_PME 0x07
> > > +#define SMBIOS_WAKEUP_TYPE_AC_POWER_RESTORED 0x08
> >
> > Shouldn't we do this as an enum these days?
> >
>
> The field in the SMBIOS is of type u8 and cannot be an enum. Defining an
> enum would only make a difference if we had a function using it.
>
> Do you want me to resend the patch with an enum?
Since I think this is going to be the start of adding ore and similar
values (which to be clear, is good), yes please lets get in the habit of
generally using enums here. Thanks.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240209/6e8a2b7a/attachment.sig>
More information about the U-Boot
mailing list