From fb32b6d30cf55408f4bdb36b729c99452f6e8e11 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Wed, 29 Nov 2017 23:26:36 -0800 Subject: ppc: Create generic PPC driver framework. This commit introduces a driver framework for power path controllers. It provides some common PPC APIs as well as allowing a board to use multiple different PPCs drivers/parts. This should make it easier to add PPC drivers in the future. BUG=None BRANCH=None TEST=`make -j buildall` TEST=Flash zoombini; verify PPC works as expected. TEST=Flash meowth; verify PPC works as expected. Change-Id: Icfb99f384610590b431456cfd28d4aff18442cb2 Signed-off-by: Aseda Aboagye Reviewed-on: https://chromium-review.googlesource.com/807630 Commit-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Edward Hill Reviewed-by: Shawn N --- driver/ppc/sn5s330.h | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'driver/ppc/sn5s330.h') diff --git a/driver/ppc/sn5s330.h b/driver/ppc/sn5s330.h index f1bea3da46..059df14a30 100644 --- a/driver/ppc/sn5s330.h +++ b/driver/ppc/sn5s330.h @@ -116,26 +116,6 @@ enum sn5s330_pp_idx { */ #define SN5S330_ILIM_PP1_MASK (1 << 4) -/** - * Determine if a PP FET is enabled or not. - * - * @param chip_idx: The index into the sn5s330_chips[] table. - * @param pp: The power path index (PP1 or PP2). - * @param is_enabled: 1 to turn on the FET, 0 to turn off. - * @return EC_SUCCESS if i2c access worked, otherwise an error. - */ -int sn5s330_is_pp_fet_enabled(uint8_t chip_idx, enum sn5s330_pp_idx pp, - int *is_enabled); - -/** - * Turn on/off the PP1 or PP2 FET. - * - * @param chip_idx: The index into the sn5s330_chips[] table. - * @param pp: The power path index (PP1 or PP2). - * @param enable: 1 to turn on the FET, 0 to turn off. - * @return EC_SUCCESS on success, - * otherwise if failed to enable the FET. - */ -int sn5s330_pp_fet_enable(uint8_t chip_idx, enum sn5s330_pp_idx pp, int enable); +extern const struct ppc_drv sn5s330_drv; #endif /* defined(__CROS_EC_SN5S330_H) */ -- cgit v1.2.1