Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: typec: fsusb302: Drop empty set_current_limit implementation

The set_current_limit tcpm_dev callback is optional and the tcpm core
will already log the passed in values, so there is no need to have an
empty implementation of this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hans de Goede and committed by
Greg Kroah-Hartman
399111aa 25b22e35

-12
-12
drivers/usb/typec/fusb302/fusb302.c
··· 864 864 return ret; 865 865 } 866 866 867 - static int tcpm_set_current_limit(struct tcpc_dev *dev, u32 max_ma, u32 mv) 868 - { 869 - struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, 870 - tcpc_dev); 871 - 872 - fusb302_log(chip, "current limit: %d ma, %d mv (not implemented)", 873 - max_ma, mv); 874 - 875 - return 0; 876 - } 877 - 878 867 static int fusb302_pd_tx_flush(struct fusb302_chip *chip) 879 868 { 880 869 return fusb302_i2c_set_bits(chip, FUSB_REG_CONTROL0, ··· 1202 1213 fusb302_tcpc_dev->set_polarity = tcpm_set_polarity; 1203 1214 fusb302_tcpc_dev->set_vconn = tcpm_set_vconn; 1204 1215 fusb302_tcpc_dev->set_vbus = tcpm_set_vbus; 1205 - fusb302_tcpc_dev->set_current_limit = tcpm_set_current_limit; 1206 1216 fusb302_tcpc_dev->set_pd_rx = tcpm_set_pd_rx; 1207 1217 fusb302_tcpc_dev->set_roles = tcpm_set_roles; 1208 1218 fusb302_tcpc_dev->start_drp_toggling = tcpm_start_drp_toggling;