Skip to content

Commit

Permalink
Input: tm2-touchkey - add support for Coreriver TC360 variant
Browse files Browse the repository at this point in the history
The Coreriver TouchCore 360 is like the midas board touchkey, but it is
using a fixed regulator.

Signed-off-by: Nick Reitemeyer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
AffeAli authored and dtor committed Mar 6, 2020
1 parent 3c2c07b commit da32890
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/input/keyboard/tm2-touchkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ static struct touchkey_variant aries_touchkey_variant = {
.cmd_led_off = ARIES_TOUCHKEY_CMD_LED_OFF,
};

static const struct touchkey_variant tc360_touchkey_variant = {
.keycode_reg = 0x00,
.base_reg = 0x00,
.fixed_regulator = true,
.cmd_led_on = TM2_TOUCHKEY_CMD_LED_ON,
.cmd_led_off = TM2_TOUCHKEY_CMD_LED_OFF,
};

static int tm2_touchkey_led_brightness_set(struct led_classdev *led_dev,
enum led_brightness brightness)
{
Expand Down Expand Up @@ -327,6 +335,9 @@ static const struct of_device_id tm2_touchkey_of_match[] = {
}, {
.compatible = "cypress,aries-touchkey",
.data = &aries_touchkey_variant,
}, {
.compatible = "coreriver,tc360-touchkey",
.data = &tc360_touchkey_variant,
},
{ },
};
Expand Down

0 comments on commit da32890

Please sign in to comment.