diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-03-10 02:07:07 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-10 02:07:07 -0800 |
commit | a08be13ed5b251dc4acc9d4b3a413a3a9bb11332 (patch) | |
tree | a0b38c35cfe3962954afd61f8a2cec9c028cf8c7 /include | |
parent | 0b59a6020bfb1739588bab5744aded0c8d467554 (diff) | |
parent | 0ed3b2e19dc9d3d7067cd3af67bc51b061ed8049 (diff) |
Merge "misc: qpnp-misc: add support for clients to read register from misc device"
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/qpnp-misc.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/linux/qpnp-misc.h b/include/linux/qpnp-misc.h index ab3302f6ea78..7d95bf24a425 100644 --- a/include/linux/qpnp-misc.h +++ b/include/linux/qpnp-misc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014, 2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -29,8 +29,26 @@ */ int qpnp_misc_irqs_available(struct device *consumer_dev); + +/** + * qpnp_misc_read_reg - read register from misc device + * + * @node: device node pointer + * @address: address offset in misc peripheral to be read + * @val: data read from register + * + * This function returns zero if reading the MISC register succeeds. + * + */ + +int qpnp_misc_read_reg(struct device_node *node, u16 addr, u8 *val); #else -static int qpnp_misc_irqs_available(struct device *consumer_dev) +static inline int qpnp_misc_irqs_available(struct device *consumer_dev) +{ + return 0; +} +static inline int qpnp_misc_read_reg(struct device_node *node, u16 addr, + u8 *val) { return 0; } |