diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-07-21 19:02:33 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-07-21 19:02:33 -0700 |
| commit | 9b031c86506cef9acae45e61339fcf9deaabb793 (patch) | |
| tree | 9095d638ba9384f86df8d61dcf1f129c082481e1 /include/linux/page_reporting.h | |
| parent | 53aab92dec447f93489e07924e310d605a389dea (diff) | |
| parent | 04d5ce620f794f1df69b5f1b9ad62910fea547f1 (diff) | |
Merge branch 'elan-i2c' into next
Bring in update to Elan touchpad driver to support newer touchpads with
higher resolution.
Diffstat (limited to 'include/linux/page_reporting.h')
| -rw-r--r-- | include/linux/page_reporting.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/page_reporting.h b/include/linux/page_reporting.h new file mode 100644 index 000000000000..3b99e0ec24f2 --- /dev/null +++ b/include/linux/page_reporting.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_PAGE_REPORTING_H +#define _LINUX_PAGE_REPORTING_H + +#include <linux/mmzone.h> +#include <linux/scatterlist.h> + +/* This value should always be a power of 2, see page_reporting_cycle() */ +#define PAGE_REPORTING_CAPACITY 32 + +struct page_reporting_dev_info { + /* function that alters pages to make them "reported" */ + int (*report)(struct page_reporting_dev_info *prdev, + struct scatterlist *sg, unsigned int nents); + + /* work struct for processing reports */ + struct delayed_work work; + + /* Current state of page reporting */ + atomic_t state; +}; + +/* Tear-down and bring-up for page reporting devices */ +void page_reporting_unregister(struct page_reporting_dev_info *prdev); +int page_reporting_register(struct page_reporting_dev_info *prdev); +#endif /*_LINUX_PAGE_REPORTING_H */ |
