Input: axp20x-pek - use driver_data of platform_device_id instead of extended attributes
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Tue, 15 Aug 2017 05:16:27 +0000 (22:16 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Aug 2017 20:29:05 +0000 (13:29 -0700)
commitfbc1b323d1f97c3880ed3377a127e2c0417d96ea
tree018e0252df72b75b4b89efb2d6a7a8128665a675
parent64954e344257b7660839151b3f30bd1bacb6eb38
Input: axp20x-pek - use driver_data of platform_device_id instead of extended attributes

To prepare an upcoming patch adding support for another PMIC that has
different startup and shutdown time, use driver_data of
platform_device_id instead of a fixed extended device attribute.

By doing so, we also remove a lot of nested structures that aren't
useful.

With this patch, a new PMIC can be easily supported by just filling
correctly its ax20x_info structure and adding a platform_device_id.

Moreover, since we get rid of extended attributes, rename
axp20x_store_ext_attr to axp20x_store_attr and axp20x_show_ext_attr to
axp20x_show_attr.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/axp20x-pek.c