Commit 9bbdb0f3 authored by David Francis's avatar David Francis Committed by Alex Deucher

drm/amd/display: Eliminate i2c hw function pointers

[Why]
The function pointers of the dce_i2c_hw struct were never
accessed from outside dce_i2c_hw.c and had only one version.
As function pointers take up space and make debugging difficult,
and they are not needed in this case, they should be removed.

[How]
Remove the dce_i2c_hw_funcs struct and make static all
functions that were previously a part of it.  Reorder
the functions in dce_i2c_hw.c.
Signed-off-by: default avatarDavid Francis <David.Francis@amd.com>
Reviewed-by: default avatarSun peng Li <Sunpeng.Li@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 284dec43
......@@ -256,40 +256,11 @@ struct dce_i2c_hw {
uint32_t buffer_size;
struct dc_context *ctx;
const struct dce_i2c_hw_funcs *funcs;
const struct dce_i2c_registers *regs;
const struct dce_i2c_shift *shifts;
const struct dce_i2c_mask *masks;
};
struct dce_i2c_hw_funcs {
bool (*setup_engine)(
struct dce_i2c_hw *dce_i2c_hw);
void (*set_speed)(
struct dce_i2c_hw *dce_i2c_hw,
uint32_t speed);
uint32_t (*get_speed)(
const struct dce_i2c_hw *dce_i2c_hw);
void (*release_engine)(
struct dce_i2c_hw *dce_i2c_hw);
bool (*process_transaction)(
struct dce_i2c_hw *dce_i2c_hw,
struct i2c_request_transaction_data *request);
void (*process_channel_reply)(
struct dce_i2c_hw *dce_i2c_hw,
struct i2c_reply_transaction_data *reply);
bool (*is_hw_busy)(
struct dce_i2c_hw *dce_i2c_hw);
enum i2c_channel_operation_result (*get_channel_status)(
struct dce_i2c_hw *dce_i2c_hw,
uint8_t *returned_bytes);
void (*execute_transaction)(
struct dce_i2c_hw *dce_i2c_hw);
void (*disable_i2c_hw_engine)(
struct dce_i2c_hw *dce_i2c_hw);
};
void dce_i2c_hw_construct(
struct dce_i2c_hw *dce_i2c_hw,
struct dc_context *ctx,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment