projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm: timer: uclass: Add flag to control sequence numbering
[oweals/u-boot.git]
/
drivers
/
misc
/
cros_ec.c
diff --git
a/drivers/misc/cros_ec.c
b/drivers/misc/cros_ec.c
index ba36795c6507f909b046b7e5c8fc5865935e9eaf..e3229efed0bb44529653b662765705949e852b13 100644
(file)
--- a/
drivers/misc/cros_ec.c
+++ b/
drivers/misc/cros_ec.c
@@
-358,9
+358,11
@@
static int ec_command(struct cros_ec_dev *dev, uint8_t cmd, int cmd_version,
return len;
}
return len;
}
-int cros_ec_scan_keyboard(struct
cros_ec_dev
*dev, struct mbkp_keyscan *scan)
+int cros_ec_scan_keyboard(struct
udevice
*dev, struct mbkp_keyscan *scan)
{
{
- if (ec_command(dev, EC_CMD_MKBP_STATE, 0, NULL, 0, scan,
+ struct cros_ec_dev *cdev = dev_get_uclass_priv(dev);
+
+ if (ec_command(cdev, EC_CMD_MKBP_STATE, 0, NULL, 0, scan,
sizeof(scan->data)) != sizeof(scan->data))
return -1;
sizeof(scan->data)) != sizeof(scan->data))
return -1;
@@
-549,13
+551,15
@@
int cros_ec_reboot(struct cros_ec_dev *dev, enum ec_reboot_cmd cmd,
return 0;
}
return 0;
}
-int cros_ec_interrupt_pending(struct
cros_ec_dev
*dev)
+int cros_ec_interrupt_pending(struct
udevice
*dev)
{
{
+ struct cros_ec_dev *cdev = dev_get_uclass_priv(dev);
+
/* no interrupt support : always poll */
/* no interrupt support : always poll */
- if (!dm_gpio_is_valid(&dev->ec_int))
+ if (!dm_gpio_is_valid(&
c
dev->ec_int))
return -ENOENT;
return -ENOENT;
- return dm_gpio_get_value(&dev->ec_int);
+ return dm_gpio_get_value(&
c
dev->ec_int);
}
int cros_ec_info(struct cros_ec_dev *dev, struct ec_response_mkbp_info *info)
}
int cros_ec_info(struct cros_ec_dev *dev, struct ec_response_mkbp_info *info)