diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2019-10-24 10:12:01 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-29 13:12:55 +0000 |
commit | b5c345ab443f2e6d97121bdd6ac7de78a828f433 (patch) | |
tree | f8e3d3cbb8332dbe4fc33af883e395a99bc96f4b /src/ec/google/chromeec/ec.h | |
parent | 44b275e2098b03b08bab332bef75c47dfb8634dc (diff) |
ec/google/chromeec: Clean up ec.[ch]
Change all uN integral types to uintN_t. Make the names of host
command params/responses consistent. Use static struct initialization
to ensure all fields are initialized.
BUG=none
BRANCH=none
TEST=compiles
Change-Id: Ibe1e29e88975c85eea215adedc5f5e483243e0d6
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36340
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Joel Kitching <kitching@google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r-- | src/ec/google/chromeec/ec.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 019f9c1eb0..25c77751cc 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -30,7 +30,7 @@ uint64_t google_chromeec_get_wake_mask(void); int google_chromeec_set_sci_mask(uint64_t mask); int google_chromeec_set_smi_mask(uint64_t mask); int google_chromeec_set_wake_mask(uint64_t mask); -u8 google_chromeec_get_event(void); +uint8_t google_chromeec_get_event(void); /* Check if EC supports feature EC_FEATURE_UNIFIED_WAKE_MASKS */ bool google_chromeec_is_uhepi_supported(void); @@ -56,12 +56,12 @@ uint8_t google_chromeec_calc_checksum(const uint8_t *data, int size); * This function is used to get the board version information from EC. */ int google_chromeec_get_board_version(uint32_t *version); -u32 google_chromeec_get_sku_id(void); -int google_chromeec_set_sku_id(u32 skuid); +uint32_t google_chromeec_get_sku_id(void); +int google_chromeec_set_sku_id(uint32_t skuid); uint64_t google_chromeec_get_events_b(void); int google_chromeec_clear_events_b(uint64_t mask); int google_chromeec_kbbacklight(int percent); -void google_chromeec_post(u8 postcode); +void google_chromeec_post(uint8_t postcode); int google_chromeec_vbnv_context(int is_read, uint8_t *data, int len); uint8_t google_chromeec_get_switches(void); bool google_chromeec_get_ap_watchdog_flag(void); @@ -95,8 +95,8 @@ int google_chromeec_cbi_get_oem_name(char *buf, size_t bufsize); #define MEC_EMI_RANGE_START EC_HOST_CMD_REGION0 #define MEC_EMI_RANGE_END (EC_LPC_ADDR_MEMMAP + EC_MEMMAP_SIZE) -int google_chromeec_set_usb_charge_mode(u8 port_id, enum usb_charge_mode mode); -int google_chromeec_set_usb_pd_role(u8 port, enum usb_pd_control_role role); +int google_chromeec_set_usb_charge_mode(uint8_t port_id, enum usb_charge_mode mode); +int google_chromeec_set_usb_pd_role(uint8_t port, enum usb_pd_control_role role); /* * Retrieve the charger type and max wattage. * @@ -105,7 +105,7 @@ int google_chromeec_set_usb_pd_role(u8 port, enum usb_pd_control_role role); * @return non-zero for error, otherwise 0. */ int google_chromeec_get_usb_pd_power_info(enum usb_chg_type *type, - u32 *max_watts); + uint32_t *max_watts); /* * Set max current and voltage of a dedicated charger. @@ -114,8 +114,8 @@ int google_chromeec_get_usb_pd_power_info(enum usb_chg_type *type, * @param voltage_lim Max voltage in mV * @return non-zero for error, otherwise 0. */ -int google_chromeec_override_dedicated_charger_limit(u16 current_lim, - u16 voltage_lim); +int google_chromeec_override_dedicated_charger_limit(uint16_t current_lim, + uint16_t voltage_lim); /* internal structure to send a command to the EC and wait for response. */ struct chromeec_command { |