/linux/drivers/input/misc/ |
H A D | regulator-haptic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Regulator haptic driver 13 #include <linux/platform_data/regulator-haptic.h> 36 static int regulator_haptic_toggle(struct regulator_haptic *haptic, bool on) in regulator_haptic_toggle() argument 40 if (haptic->active != on) { in regulator_haptic_toggle() 42 error = on ? regulator_enable(haptic->regulator) : in regulator_haptic_toggle() 43 regulator_disable(haptic->regulator); in regulator_haptic_toggle() 45 dev_err(haptic->dev, in regulator_haptic_toggle() 51 haptic->active = on; in regulator_haptic_toggle() 57 static int regulator_haptic_set_voltage(struct regulator_haptic *haptic, in regulator_haptic_set_voltage() argument [all …]
|
H A D | max77693-haptic.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * MAXIM MAX77693/MAX77843 Haptic device driver 24 #include <linux/mfd/max77693-common.h> 25 #include <linux/mfd/max77693-private.h> 26 #include <linux/mfd/max77843-private.h> 67 static int max77693_haptic_set_duty_cycle(struct max77693_haptic *haptic) in max77693_haptic_set_duty_cycle() argument 73 pwm_get_args(haptic->pwm_dev, &pargs); in max77693_haptic_set_duty_cycle() 74 delta = (pargs.period + haptic->pwm_duty) / 2; in max77693_haptic_set_duty_cycle() 75 error = pwm_config(haptic->pwm_dev, delta, pargs.period); in max77693_haptic_set_duty_cycle() 77 dev_err(haptic->dev, "failed to configure pwm: %d\n", error); in max77693_haptic_set_duty_cycle() [all …]
|
H A D | max8997_haptic.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * MAX8997-haptic controller driver 17 #include <linux/mfd/max8997-private.h> 21 /* Haptic configuration 2 register */ 26 /* Haptic driver configuration register */ 60 if (chip->mode == MAX8997_EXTERNAL_MODE) { in max8997_haptic_set_duty_cycle() 61 unsigned int duty = chip->pwm_period * chip->level / 100; in max8997_haptic_set_duty_cycle() 62 ret = pwm_config(chip->pwm, duty, chip->pwm_period); in max8997_haptic_set_duty_cycle() 66 duty_index = DIV_ROUND_UP(chip->level * 64, 100); in max8997_haptic_set_duty_cycle() 68 switch (chip->internal_mode_pattern) { in max8997_haptic_set_duty_cycle() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 23 To compile this driver as a module, choose M here: the module 33 To compile this driver as a module, choose M here: the module 47 Say Y here to use the PowerOn Key for ST-Ericsson's AB8500 48 Mix-Sig PMIC. 50 To compile this driver as a module, choose M here: the module 51 will be called ab8500-ponkey. 60 To compile this driver as a module, choose M here: the 70 To compile this driver as a module, choose M here: the 71 module will be called ad714x-i2c. [all …]
|
H A D | cs40l50-vibra.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * CS40L50 Advanced Haptic Driver with waveform memory, 4 * integrated DSP, and closed-loop algorithms 65 /* Describes haptic interface of loaded DSP firmware */ 78 /* Describes configuration and state of haptic operations */ 133 if (effect->id == id) in cs40l50_find_effect() 142 s16 bank_type = work_data->custom_data[0] & CS40L50_CUSTOM_DATA_MASK; in cs40l50_effect_bank_set() 145 dev_err(work_data->vib->dev, "Invalid bank (%d)\n", bank_type); in cs40l50_effect_bank_set() 146 return -EINVAL; in cs40l50_effect_bank_set() 149 if (work_data->custom_len > CS40L50_OWT_CUSTOM_DATA_SIZE) in cs40l50_effect_bank_set() [all …]
|
H A D | da7280.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * DA7280 Haptic device driver 288 /* The patterns should be updated when haptic is not working */ in da7280_haptic_mem_update() 289 error = regmap_read(haptics->regmap, DA7280_IRQ_STATUS1, &val); in da7280_haptic_mem_update() 293 dev_warn(haptics->dev, in da7280_haptic_mem_update() 294 "Warning! Please check HAPTIC status.\n"); in da7280_haptic_mem_update() 295 return -EBUSY; in da7280_haptic_mem_update() 300 error = regmap_read(haptics->regmap, DA7280_MEM_CTL2, &val); in da7280_haptic_mem_update() 304 dev_warn(haptics->dev, "Please unlock the bit first\n"); in da7280_haptic_mem_update() 305 return -EACCES; in da7280_haptic_mem_update() [all …]
|
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | maxim,max77843.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Krzysztof Kozlowski <krzk@kernel.org> 17 includes voltage current regulators, charger, fuel-gauge, haptic motor driver 33 motor-driver: 38 const: maxim,max77843-haptic 40 haptic-supply: 41 description: Power supply to the haptic motor 47 - compatible [all …]
|
/linux/Documentation/devicetree/bindings/input/ |
H A D | cirrus,cs40l50.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Cirrus Logic CS40L50 Advanced Haptic Driver 10 - James Ogletree <jogletre@opensource.cirrus.com> 13 CS40L50 is a haptic driver with waveform memory, 14 integrated DSP, and closed-loop algorithms. 19 - cirrus,cs40l50 27 reset-gpios: 30 vdd-a-supply: [all …]
|
H A D | ti,drv260x.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Texas Instruments - drv260x Haptics driver family 10 - Andrew Davis <afd@ti.com> 15 - ti,drv2604 16 - ti,drv2605 17 - ti,drv2605l 22 vbat-supply: 23 description: Power supply to the haptic motor [all …]
|
/linux/drivers/mfd/ |
H A D | max8997.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // max8997.c - mfd core driver for the Maxim 8966 and 8997 8 // This driver is based on max8998.c 21 #include <linux/mfd/max8997-private.h> 30 { .name = "max8997-pmic", }, 31 { .name = "max8997-rtc", }, 32 { .name = "max8997-battery", }, 33 { .name = "max8997-haptic", }, 34 { .name = "max8997-muic", }, 35 { .name = "max8997-led", .id = 1 }, [all …]
|
H A D | max77693.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // max77693.c - mfd core driver for the MAX 77693 10 // This driver is based on max8997.c 22 #include <linux/mfd/max77693-common.h> 23 #include <linux/mfd/max77693-private.h> 32 { .name = "max77693-pmic", }, 34 .name = "max77693-charger", 35 .of_compatible = "maxim,max77693-charger", 38 .name = "max77693-muic", 39 .of_compatible = "maxim,max77693-muic", [all …]
|
H A D | max77843.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // MFD core driver for the Maxim MAX77843 14 #include <linux/mfd/max77693-common.h> 15 #include <linux/mfd/max77843-private.h> 21 .name = "max77843-muic", 22 .of_compatible = "maxim,max77843-muic", 24 .name = "max77843-regulator", 25 .of_compatible = "maxim,max77843-regulator", 27 .name = "max77843-charger", 28 .of_compatible = "maxim,max77843-charger" [all …]
|
H A D | cs40l50-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * CS40L50 Advanced Haptic Driver with waveform memory, 4 * integrated DSP, and closed-loop algorithms 18 cs40l50 = devm_kzalloc(&i2c->dev, sizeof(*cs40l50), GFP_KERNEL); in cs40l50_i2c_probe() 20 return -ENOMEM; in cs40l50_i2c_probe() 24 cs40l50->dev = &i2c->dev; in cs40l50_i2c_probe() 25 cs40l50->irq = i2c->irq; in cs40l50_i2c_probe() 27 cs40l50->regmap = devm_regmap_init_i2c(i2c, &cs40l50_regmap); in cs40l50_i2c_probe() 28 if (IS_ERR(cs40l50->regmap)) in cs40l50_i2c_probe() 29 return dev_err_probe(cs40l50->dev, PTR_ERR(cs40l50->regmap), in cs40l50_i2c_probe() [all …]
|
H A D | cs40l50-spi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * CS40L50 Advanced Haptic Driver with waveform memory, 4 * integrated DSP, and closed-loop algorithms 18 cs40l50 = devm_kzalloc(&spi->dev, sizeof(*cs40l50), GFP_KERNEL); in cs40l50_spi_probe() 20 return -ENOMEM; in cs40l50_spi_probe() 24 cs40l50->dev = &spi->dev; in cs40l50_spi_probe() 25 cs40l50->irq = spi->irq; in cs40l50_spi_probe() 27 cs40l50->regmap = devm_regmap_init_spi(spi, &cs40l50_regmap); in cs40l50_spi_probe() 28 if (IS_ERR(cs40l50->regmap)) in cs40l50_spi_probe() 29 return dev_err_probe(cs40l50->dev, PTR_ERR(cs40l50->regmap), in cs40l50_spi_probe() [all …]
|
H A D | cs40l50-core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * CS40L50 Advanced Haptic Driver with waveform memory, 4 * integrated DSP, and closed-loop algorithms 19 { .name = "cs40l50-codec", }, 20 { .name = "cs40l50-vibra", }, 33 "vdd-io", 116 struct cs_dsp *dsp = &cs40l50->dsp; in cs40l50_wseq_init() 118 cs40l50->wseqs[CS40L50_STANDBY].ctl = cs_dsp_get_ctl(dsp, "STANDBY_SEQUENCE", in cs40l50_wseq_init() 121 if (!cs40l50->wseqs[CS40L50_STANDBY].ctl) { in cs40l50_wseq_init() 122 dev_err(cs40l50->dev, "Control not found for standby sequence\n"); in cs40l50_wseq_init() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 20 This is the core driver for CS5535/CS5536 MFD functions. This is 24 tristate "Analog Devices ADP5585 keypad decoder and I/O expander driver" 31 expander, PWM and keypad controller. This includes the I2C driver and 42 using the SPI interface. This driver provides common support for 57 tristate "Active-semi ACT8945A" 62 Support for the ACT8945A PMIC from Active-semi. This device 63 features three step-down DC/DC converters and four low-dropout 68 tristate "Allwinner sunxi platforms' GPADC MFD driver" 76 This driver will only map the hardware interrupt and registers, you [all …]
|
/linux/Documentation/hid/ |
H A D | hid-bpf.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 HID-BPF 8 custom tweaks, traditionally done with a kernel driver fix. Using the eBPF 17 When (and why) to use HID-BPF 20 There are several use cases when using HID-BPF is better 21 than standard kernel driver fix: 24 ----------------------- 30 With HID-BPF, we can apply this filtering in the kernel directly so userspace 38 HID-BPF allows the userspace program to load the program itself, ensuring we 42 --------------------------------- [all …]
|
/linux/include/linux/mfd/ |
H A D | max8997.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * max8997.h - Driver for the Maxim 8997/8966 5 * Copyright (C) 2009-2010 Samsung Electrnoics 8 * This driver is based on max8998.h 10 * MAX8997 has PMIC, MUIC, HAPTIC, RTC, FLASH, and Fuel Gauge devices. 12 * this mfd driver. Although the fuel gauge is included in the chip, it is 13 * excluded from the driver because a) it has a different I2C bus from 14 * others and b) it can be enabled simply by using MAX17042 driver. 121 * [0 - 3]: valid pattern number 124 * [0 - 15]: available cycles [all …]
|
H A D | max77693.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * max77693.h - Driver for the Maxim 77693 10 * This driver is based on max8997.h 12 * MAX77693 has PMIC, Charger, Flash LED, Haptic, MUIC devices. 14 * this mfd driver.
|
H A D | cs40l50.h | 1 /* SPDX-License-Identifier: GPL-2.0 3 * CS40L50 Advanced Haptic Driver with waveform memory, 4 * integrated DSP, and closed-loop algorithms 37 #define CS40L50_IRQ1_INT_1_OFFSET (CS40L50_IRQ1_INT_1 - CS40L50_IRQ1_BASE) 38 #define CS40L50_IRQ1_INT_2_OFFSET (CS40L50_IRQ1_INT_2 - CS40L50_IRQ1_BASE) 39 #define CS40L50_IRQ1_INT_8_OFFSET (CS40L50_IRQ1_INT_8 - CS40L50_IRQ1_BASE) 40 #define CS40L50_IRQ1_INT_9_OFFSET (CS40L50_IRQ1_INT_9 - CS40L50_IRQ1_BASE) 41 #define CS40L50_IRQ1_INT_10_OFFSET (CS40L50_IRQ1_INT_10 - CS40L50_IRQ1_BASE) 42 #define CS40L50_IRQ1_INT_18_OFFSET (CS40L50_IRQ1_INT_18 - CS40L50_IRQ1_BASE)
|
H A D | max77693-private.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * max77693-private.h - Voltage regulator driver for the Maxim 77693 104 #define FLASH_EN_SHIFT(x) (6 - (x) * 2) 105 #define TORCH_EN_SHIFT(x) (2 - (x) * 2) 194 /* Dead-battery or low-battery prequalification */ 304 /* MAX77693 MUIC - STATUS1~3 Register */ 351 /* MAX77693 MUIC - CONTROL1~3 register */ 390 /* Slave addr = 0x90: Haptic */ 413 /* max77693-pmic LSCNFG configuration register */ 417 /* max77693-haptic configuration register */ [all …]
|
H A D | max8997-private.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * max8997-private.h - Voltage regulator driver for the Maxim 8997 184 /* MAX8997-MUIC STATUS1 register */ 192 /* MAX8997-MUIC STATUS2 register */ 204 /* MAX8997-MUIC STATUS3 register */ 208 /* MAX8997-MUIC CONTROL1 register */ 307 FUEL_GAUGE, /* Ignored (MAX17042 driver handles) */ 373 struct i2c_client *haptic; /* slave addr 0x90 */ member
|
H A D | max77843-private.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * Common variables for the Maxim MAX77843 driver 21 /* Topsys, Haptic and LED registers */
|
/linux/sound/soc/codecs/ |
H A D | lm49453.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * lm49453.c - LM49453 ALSA Soc Audio driver 23 #include <sound/soc-dapm.h> 491 static const DECLARE_TLV_DB_SCALE(adc_dac_tlv, -7650, 150, 1); 493 static const DECLARE_TLV_DB_SCALE(port_tlv, -1800, 600, 0); 494 static const DECLARE_TLV_DB_SCALE(stn_tlv, -7200, 150, 0); 587 /* All end points HP,EP, LS, Lineout and Haptic */ 619 /* playback path driver enables */ 628 SND_SOC_DAPM_OUT_DRV("Haptic Left Switch", 630 SND_SOC_DAPM_OUT_DRV("Haptic Right Switch", [all …]
|
H A D | cs40l50-codec.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // CS40L50 Advanced Haptic Driver with waveform memory, 4 // integrated DSP, and closed-loop algorithms 74 return -EINVAL; in cs40l50_get_clk_config() 84 ret = cs40l50_get_clk_config(codec->bclk_ratio * codec->rate, &cfg); in cs40l50_swap_ext_clk() 92 return -EINVAL; in cs40l50_swap_ext_clk() 95 ret = regmap_update_bits(codec->regmap, CS40L50_REFCLK_INPUT, in cs40l50_swap_ext_clk() 102 ret = regmap_update_bits(codec->regmap, CS40L50_REFCLK_INPUT, in cs40l50_swap_ext_clk() 109 return regmap_update_bits(codec->regmap, CS40L50_REFCLK_INPUT, in cs40l50_swap_ext_clk() 119 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in cs40l50_clk_en() [all …]
|