Home
last modified time | relevance | path

Searched refs:haptic (Results 1 – 16 of 16) sorted by relevance

/linux-4.1.27/drivers/input/misc/
Dmax77693-haptic.c67 static int max77693_haptic_set_duty_cycle(struct max77693_haptic *haptic) in max77693_haptic_set_duty_cycle() argument
69 int delta = (haptic->pwm_dev->period + haptic->pwm_duty) / 2; in max77693_haptic_set_duty_cycle()
72 error = pwm_config(haptic->pwm_dev, delta, haptic->pwm_dev->period); in max77693_haptic_set_duty_cycle()
74 dev_err(haptic->dev, "failed to configure pwm: %d\n", error); in max77693_haptic_set_duty_cycle()
81 static int max77693_haptic_configure(struct max77693_haptic *haptic, in max77693_haptic_configure() argument
87 value = ((haptic->type << MAX77693_CONFIG2_MODE) | in max77693_haptic_configure()
89 (haptic->mode << MAX77693_CONFIG2_HTYP) | in max77693_haptic_configure()
90 (haptic->pwm_divisor)); in max77693_haptic_configure()
92 error = regmap_write(haptic->regmap_haptic, in max77693_haptic_configure()
95 dev_err(haptic->dev, in max77693_haptic_configure()
[all …]
Dmax77843-haptic.c59 static int max77843_haptic_set_duty_cycle(struct max77843_haptic *haptic) in max77843_haptic_set_duty_cycle() argument
61 int delta = (haptic->pwm_dev->period + haptic->pwm_duty) / 2; in max77843_haptic_set_duty_cycle()
64 error = pwm_config(haptic->pwm_dev, delta, haptic->pwm_dev->period); in max77843_haptic_set_duty_cycle()
66 dev_err(haptic->dev, "failed to configure pwm: %d\n", error); in max77843_haptic_set_duty_cycle()
73 static int max77843_haptic_bias(struct max77843_haptic *haptic, bool on) in max77843_haptic_bias() argument
77 error = regmap_update_bits(haptic->regmap_haptic, in max77843_haptic_bias()
82 dev_err(haptic->dev, "failed to %s bias: %d\n", in max77843_haptic_bias()
90 static int max77843_haptic_config(struct max77843_haptic *haptic, bool enable) in max77843_haptic_config() argument
95 value = (haptic->type << MCONFIG_MODE_SHIFT) | in max77843_haptic_config()
97 (haptic->pwm_divisor << MCONFIG_PDIV_SHIFT); in max77843_haptic_config()
[all …]
Dregulator-haptic.c39 static int regulator_haptic_toggle(struct regulator_haptic *haptic, bool on) in regulator_haptic_toggle() argument
43 if (haptic->active != on) { in regulator_haptic_toggle()
45 error = on ? regulator_enable(haptic->regulator) : in regulator_haptic_toggle()
46 regulator_disable(haptic->regulator); in regulator_haptic_toggle()
48 dev_err(haptic->dev, in regulator_haptic_toggle()
54 haptic->active = on; in regulator_haptic_toggle()
60 static int regulator_haptic_set_voltage(struct regulator_haptic *haptic, in regulator_haptic_set_voltage() argument
67 volt_mag_multi = (u64)(haptic->max_volt - haptic->min_volt) * magnitude; in regulator_haptic_set_voltage()
70 error = regulator_set_voltage(haptic->regulator, in regulator_haptic_set_voltage()
71 intensity + haptic->min_volt, in regulator_haptic_set_voltage()
[all …]
DMakefile41 obj-$(CONFIG_INPUT_MAX77693_HAPTIC) += max77693-haptic.o
42 obj-$(CONFIG_INPUT_MAX77843_HAPTIC) += max77843-haptic.o
59 obj-$(CONFIG_INPUT_REGULATOR_HAPTIC) += regulator-haptic.o
DKconfig170 tristate "MAXIM MAX77693 haptic controller support"
174 This option enables support for the haptic controller on
178 module will be called max77693-haptic.
181 tristate "MAXIM MAX77843 haptic controller support"
185 This option enables support for the haptic controller on
190 module will be called max77843-haptic.
203 tristate "MAXIM MAX8997 haptic controller support"
207 This option enables device driver support for the haptic controller
212 module will be called max8997-haptic.
436 This option enables device driver support for the haptic controlled
[all …]
Dmax8997_haptic.c282 chip->client = iodev->haptic; in max8997_haptic_probe()
/linux-4.1.27/Documentation/devicetree/bindings/input/
Dregulator-haptic.txt4 - compatible : Should be "regulator-haptic"
5 - haptic-supply : Power supply to the haptic motor.
8 - max-microvolt : The maximum voltage value supplied to the haptic motor.
11 - min-microvolt : The minimum voltage value supplied to the haptic motor.
17 compatible = "regulator-haptic";
18 haptic-supply = <&motor_regulator>;
/linux-4.1.27/Documentation/devicetree/bindings/mfd/
Dmax77693.txt30 - haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide
36 - haptic-supply : power supply for the haptic motor
105 haptic {
106 compatible = "maxim,max77693-haptic";
107 haptic-supply = <&haptic_supply>;
109 pwm-names = "haptic";
/linux-4.1.27/drivers/mfd/
Dmax77693.c203 max77693->haptic = i2c_new_dummy(i2c->adapter, I2C_ADDR_HAPTIC); in max77693_i2c_probe()
204 if (!max77693->haptic) { in max77693_i2c_probe()
209 i2c_set_clientdata(max77693->haptic, max77693); in max77693_i2c_probe()
211 max77693->regmap_haptic = devm_regmap_init_i2c(max77693->haptic, in max77693_i2c_probe()
305 i2c_unregister_device(max77693->haptic); in max77693_i2c_probe()
323 i2c_unregister_device(max77693->haptic); in max77693_i2c_remove()
Dmax8997.c217 max8997->haptic = i2c_new_dummy(i2c->adapter, I2C_ADDR_HAPTIC); in max8997_i2c_probe()
218 if (!max8997->haptic) { in max8997_i2c_probe()
223 i2c_set_clientdata(max8997->haptic, max8997); in max8997_i2c_probe()
259 i2c_unregister_device(max8997->haptic); in max8997_i2c_probe()
271 i2c_unregister_device(max8997->haptic); in max8997_i2c_remove()
/linux-4.1.27/include/linux/mfd/
Dmax8997-private.h386 struct i2c_client *haptic; /* slave addr 0x90 */ member
Dmax77693-private.h536 struct i2c_client *haptic; /* 0x90 , Haptic */ member
/linux-4.1.27/arch/arm/boot/dts/
Dexynos3250-monk.dts113 compatible = "regulator-haptic";
114 haptic-supply = <&motor_reg>;
Dexynos3250-rinato.dts104 compatible = "regulator-haptic";
105 haptic-supply = <&motor_reg>;
Dexynos4412-trats2.dts567 compatible = "maxim,max77693-haptic";
568 haptic-supply = <&ldo26_reg>;
/linux-4.1.27/Documentation/input/
Devent-codes.txt289 visual/haptic areas for left, middle, right buttons intended to be used