Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: max77693 - add max77705 haptic support

Add support for haptic controller on MAX77705 Multifunction
device.

This driver supports external pwm and LRA (Linear Resonant Actuator) motor.
User can control the haptic device via force feedback framework.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250123-starqltechn_integration_upstream-v17-6-8b06685b6612@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Dzmitry Sankouski and committed by
Lee Jones
eb79f3a5 c8d50f02

+15 -4
+3 -3
drivers/input/misc/Kconfig
··· 240 240 will be called max77650-onkey. 241 241 242 242 config INPUT_MAX77693_HAPTIC 243 - tristate "MAXIM MAX77693/MAX77843 haptic controller support" 244 - depends on (MFD_MAX77693 || MFD_MAX77843) && PWM 243 + tristate "MAXIM MAX77693/MAX77705/MAX77843 haptic controller support" 244 + depends on (MFD_MAX77693 || MFD_MAX77705 || MFD_MAX77843) && PWM 245 245 select INPUT_FF_MEMLESS 246 246 help 247 247 This option enables support for the haptic controller on 248 - MAXIM MAX77693 and MAX77843 chips. 248 + MAXIM MAX77693, MAX77705 and MAX77843 chips. 249 249 250 250 To compile this driver as module, choose M here: the 251 251 module will be called max77693-haptic.
+12 -1
drivers/input/misc/max77693-haptic.c
··· 24 24 #include <linux/mfd/max77693.h> 25 25 #include <linux/mfd/max77693-common.h> 26 26 #include <linux/mfd/max77693-private.h> 27 + #include <linux/mfd/max77705-private.h> 27 28 #include <linux/mfd/max77843-private.h> 28 29 29 30 #define MAX_MAGNITUDE_SHIFT 16 ··· 116 115 (haptic->mode << MAX77693_CONFIG2_HTYP) | 117 116 MAX77693_HAPTIC_PWM_DIVISOR_128); 118 117 config_reg = MAX77693_HAPTIC_REG_CONFIG2; 118 + break; 119 + case TYPE_MAX77705: 120 + value = ((haptic->type << MAX77693_CONFIG2_MODE) | 121 + (enable << MAX77693_CONFIG2_MEN) | 122 + (haptic->mode << MAX77693_CONFIG2_HTYP) | 123 + MAX77693_HAPTIC_PWM_DIVISOR_128); 124 + config_reg = MAX77705_PMIC_REG_MCONFIG; 119 125 break; 120 126 case TYPE_MAX77843: 121 127 value = (haptic->type << MCONFIG_MODE_SHIFT) | ··· 321 313 case TYPE_MAX77693: 322 314 haptic->regmap_haptic = max77693->regmap_haptic; 323 315 break; 316 + case TYPE_MAX77705: 324 317 case TYPE_MAX77843: 325 318 haptic->regmap_haptic = max77693->regmap; 326 319 break; ··· 417 408 418 409 static const struct platform_device_id max77693_haptic_id[] = { 419 410 { "max77693-haptic", }, 411 + { "max77705-haptic", }, 420 412 { "max77843-haptic", }, 421 413 {}, 422 414 }; ··· 425 415 426 416 static const struct of_device_id of_max77693_haptic_dt_match[] = { 427 417 { .compatible = "maxim,max77693-haptic", }, 418 + { .compatible = "maxim,max77705-haptic", }, 428 419 { .compatible = "maxim,max77843-haptic", }, 429 420 { /* sentinel */ }, 430 421 }; ··· 444 433 445 434 MODULE_AUTHOR("Jaewon Kim <jaewon02.kim@samsung.com>"); 446 435 MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>"); 447 - MODULE_DESCRIPTION("MAXIM 77693/77843 Haptic driver"); 436 + MODULE_DESCRIPTION("MAXIM 77693/77705/77843 Haptic driver"); 448 437 MODULE_LICENSE("GPL");