Skip to content

Commit

Permalink
[Platform][Common Driver]: Sync PMBUS driver from PRs
Browse files Browse the repository at this point in the history
Why I did it:
    Testbed test reports related PSU test failed.

How I dit it:
    Sync PMBUS driver from:
    - sonic-net/sonic-buildimage#13815
    - edge-core#6
    - edge-core#23

How to verify it:
    show platform firmware
    show platform syseeprom
    show platform psustatus
    show platform temperature
    show platform fan
  • Loading branch information
tiger_fu committed May 3, 2024
1 parent 39a071c commit 3eca9aa
Show file tree
Hide file tree
Showing 11 changed files with 495 additions and 122 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2022 Accton Technology Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description:
* PSU driver related api declarations
*/

#ifndef ACCTON_PSU_API_H
#define ACCTON_PSU_API_H

#include "accton_psu_defs.h"

/** Description:
* Register psu status entry, set entry as NULL to unregister
*/
extern int register_psu_status_entry(PSU_STATUS_ENTRY *entry);

#endif /* ACCTON_PSU_API_H */
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2022 Accton Technology Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description:
* Platform PSU defines/structures header file
*/

#ifndef ACCTON_PSU_DEFS_H
#define ACCTON_PSU_DEFS_H

typedef struct PSU_STATUS_ENTRY
{
int (*get_presence)(void *client);
int (*get_powergood)(void *client);
} PSU_STATUS_ENTRY;

#endif /* ACCTON_PSU_DEFS_H */
Loading

0 comments on commit 3eca9aa

Please sign in to comment.