mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mfd: cros_ec: stop calling ->cmd_xfer() directly
Instead of having users of the ChromeOS EC call the interface-specific cmd_xfer() callback directly, introduce a central cros_ec_cmd_xfer() to use instead. This will allow us to put all the locking and retry logic in one place instead of duplicating it across the different drivers. Signed-off-by: Andrew Bresticker <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Doug Anderson <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
659e142be0
commit
a6551a76ff
4 changed files with 27 additions and 8 deletions
|
|
@ -62,6 +62,13 @@ int cros_ec_check_result(struct cros_ec_device *ec_dev,
|
|||
}
|
||||
EXPORT_SYMBOL(cros_ec_check_result);
|
||||
|
||||
int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
|
||||
struct cros_ec_command *msg)
|
||||
{
|
||||
return ec_dev->cmd_xfer(ec_dev, msg);
|
||||
}
|
||||
EXPORT_SYMBOL(cros_ec_cmd_xfer);
|
||||
|
||||
static const struct mfd_cell cros_devs[] = {
|
||||
{
|
||||
.name = "cros-ec-keyb",
|
||||
|
|
|
|||
Loading…
Reference in a new issue