platform/chrome: cros_usbpd_notify: Rename cros_ec_pd_command()
Rename cros_ec_pd_command()_to cros_ec_command() since it can be used for sending any host command, and not just PD related ones. This patch does not introduce any functional changes. Signed-off-by: Prashant Malani <pmalani@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20210930022403.3358070-2-pmalani@chromium.org
This commit is contained in:
parent
eb057514cc
commit
67ea0239fb
|
@ -54,7 +54,7 @@ void cros_usbpd_unregister_notify(struct notifier_block *nb)
|
||||||
EXPORT_SYMBOL_GPL(cros_usbpd_unregister_notify);
|
EXPORT_SYMBOL_GPL(cros_usbpd_unregister_notify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cros_ec_pd_command - Send a command to the EC.
|
* cros_ec_command - Send a command to the EC.
|
||||||
*
|
*
|
||||||
* @ec_dev: EC device
|
* @ec_dev: EC device
|
||||||
* @command: EC command
|
* @command: EC command
|
||||||
|
@ -65,12 +65,12 @@ EXPORT_SYMBOL_GPL(cros_usbpd_unregister_notify);
|
||||||
*
|
*
|
||||||
* Return: >= 0 on success, negative error number on failure.
|
* Return: >= 0 on success, negative error number on failure.
|
||||||
*/
|
*/
|
||||||
static int cros_ec_pd_command(struct cros_ec_device *ec_dev,
|
static int cros_ec_command(struct cros_ec_device *ec_dev,
|
||||||
int command,
|
int command,
|
||||||
uint8_t *outdata,
|
uint8_t *outdata,
|
||||||
int outsize,
|
int outsize,
|
||||||
uint8_t *indata,
|
uint8_t *indata,
|
||||||
int insize)
|
int insize)
|
||||||
{
|
{
|
||||||
struct cros_ec_command *msg;
|
struct cros_ec_command *msg;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -115,10 +115,8 @@ static void cros_usbpd_get_event_and_notify(struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for PD host events on EC. */
|
/* Check for PD host events on EC. */
|
||||||
ret = cros_ec_pd_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS,
|
ret = cros_ec_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS,
|
||||||
NULL, 0,
|
NULL, 0, (uint8_t *)&host_event_status, sizeof(host_event_status));
|
||||||
(uint8_t *)&host_event_status,
|
|
||||||
sizeof(host_event_status));
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_warn(dev, "Can't get host event status (err: %d)\n", ret);
|
dev_warn(dev, "Can't get host event status (err: %d)\n", ret);
|
||||||
goto send_notify;
|
goto send_notify;
|
||||||
|
|
Loading…
Reference in New Issue