Skip to content

Commit

Permalink
Add CVPM02 BBU support.
Browse files Browse the repository at this point in the history
  • Loading branch information
msaitoh committed Jun 29, 2022
1 parent 0e7aee9 commit d8b90f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sys/dev/ic/mfireg.h
@@ -1,4 +1,4 @@
/* $NetBSD: mfireg.h,v 1.21 2022/05/12 12:05:04 msaitoh Exp $ */
/* $NetBSD: mfireg.h,v 1.22 2022/06/29 13:03:20 msaitoh Exp $ */
/* $OpenBSD: mfireg.h,v 1.24 2006/06/19 19:05:45 marco Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
Expand Down Expand Up @@ -1267,6 +1267,7 @@ struct mfi_bbu_status {
#define MFI_BBU_TYPE_IBBU 1
#define MFI_BBU_TYPE_BBU 2
#define MFI_BBU_TYPE_IBBU09 5
#define MFI_BBU_TYPE_CVPM02 6
uint8_t reserved;
uint16_t voltage; /* mV */
int16_t current; /* mA */
Expand Down
5 changes: 3 additions & 2 deletions sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
/* $NetBSD: mfii.c,v 1.19 2022/06/27 15:55:11 msaitoh Exp $ */
/* $NetBSD: mfii.c,v 1.20 2022/06/29 13:03:20 msaitoh Exp $ */
/* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */

/*
Expand All @@ -19,7 +19,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.19 2022/06/27 15:55:11 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.20 2022/06/29 13:03:20 msaitoh Exp $");

#include "bio.h"

Expand Down Expand Up @@ -3742,6 +3742,7 @@ mfii_bbu(struct mfii_softc *sc, envsys_data_t *edata)
switch (bbu.battery_type) {
case MFI_BBU_TYPE_IBBU:
case MFI_BBU_TYPE_IBBU09:
case MFI_BBU_TYPE_CVPM02:
mask = MFI_BBU_STATE_BAD_IBBU;
soh_bad = 0;
break;
Expand Down

0 comments on commit d8b90f0

Please sign in to comment.