sonic-buildimage/platform/broadcom/sonic-platform-modules-inventec/d6254qs/modules/inv_mux.h
klhaung 6f496bda20 [device][platform] Update Inventec platform porting to support stretch (#2010)
* [device][platform] d6254qs d6556 platform porting
[device][platform] sensor and status led support for d7032q28b d7254q28b d7264q28b d6254qs d6556
[device][platform] qos support for d7032q28b d7254q28b
[device][platform] service configuration files for d7032q28b d7254q28b d7264q28b d6254qs d6556

* remove binary files and remove non-supported attributes in config.bcm

* remove gpio-ich here. file a PR in sonic-linux-kernel instead.

* remove unnecessary comments

* add GPL license
2018-09-14 00:54:08 -07:00

46 lines
1.2 KiB
C

/*
* 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.
*/
#ifndef INV_MUX_H
#define INV_MUX_H
/* MUX basic information */
#define MUX_GPIO_LABEL "SWPS_RST_MUX"
/* MUX reset GPIO define */
#define MUX_RST_GPIO_FORCE (30100)
#define MUX_RST_GPIO_FORCE_RANGELEY (30101)
#define MUX_RST_GPIO_FORCE_HEDERA (30102)
#define MUX_RST_GPIO_48_PAC9548 (48)
#define MUX_RST_GPIO_69_PAC9548 (69)
#define MUX_RST_GPIO_249_PCA9548 (249)
#define MUX_RST_GPIO_505_PCA9548 (505)
/* MUX relate value define */
#define MUX_RST_WAIT_MS (1)
#define MUX_RST_MEM_ADDR_RANGELEY (0) // TBD
#define MUX_RST_MEM_ADDR_HEDERA (0x548)
struct mux_obj_s {
unsigned gpio_num;
int (*_pull_high)(struct mux_obj_s *self);
int (*_pull_low)(struct mux_obj_s *self);
int (*_init)(struct mux_obj_s *self);
int (*reset)(struct mux_obj_s *self);
};
void clean_mux_gpio(void);
int reset_mux_gpio(void);
int init_mux_gpio(unsigned gpio);
#endif /* INV_MUX_H */