Home
last modified time | relevance | path

Searched refs:da9052 (Results 1 – 22 of 22) sorted by relevance

/drivers/mfd/
Dda9052-irq.c179 static int da9052_map_irq(struct da9052 *da9052, int irq) in da9052_map_irq() argument
181 return regmap_irq_get_virq(da9052->irq_data, irq); in da9052_map_irq()
184 int da9052_enable_irq(struct da9052 *da9052, int irq) in da9052_enable_irq() argument
186 irq = da9052_map_irq(da9052, irq); in da9052_enable_irq()
196 int da9052_disable_irq(struct da9052 *da9052, int irq) in da9052_disable_irq() argument
198 irq = da9052_map_irq(da9052, irq); in da9052_disable_irq()
208 int da9052_disable_irq_nosync(struct da9052 *da9052, int irq) in da9052_disable_irq_nosync() argument
210 irq = da9052_map_irq(da9052, irq); in da9052_disable_irq_nosync()
220 int da9052_request_irq(struct da9052 *da9052, int irq, char *name, in da9052_request_irq() argument
223 irq = da9052_map_irq(da9052, irq); in da9052_request_irq()
[all …]
Dda9052-core.c377 int da9052_adc_manual_read(struct da9052 *da9052, unsigned char channel) in da9052_adc_manual_read() argument
387 mutex_lock(&da9052->auxadc_lock); in da9052_adc_manual_read()
392 ret = da9052_reg_write(da9052, DA9052_ADC_MAN_REG, mux_sel); in da9052_adc_manual_read()
397 if (!wait_for_completion_timeout(&da9052->done, in da9052_adc_manual_read()
399 dev_err(da9052->dev, in da9052_adc_manual_read()
405 ret = da9052_reg_read(da9052, DA9052_ADC_RES_H_REG); in da9052_adc_manual_read()
412 ret = da9052_reg_read(da9052, DA9052_ADC_RES_L_REG); in da9052_adc_manual_read()
422 mutex_unlock(&da9052->auxadc_lock); in da9052_adc_manual_read()
427 int da9052_adc_read_temp(struct da9052 *da9052) in da9052_adc_read_temp() argument
431 tbat = da9052_reg_read(da9052, DA9052_TBAT_RES_REG); in da9052_adc_read_temp()
[all …]
Dda9052-i2c.c63 static int da9052_i2c_fix(struct da9052 *da9052, unsigned char reg) in da9052_i2c_fix() argument
67 switch (da9052->chip_id) { in da9052_i2c_fix()
74 return regmap_read(da9052->regmap, in da9052_i2c_fix()
94 static int da9052_i2c_disable_multiwrite(struct da9052 *da9052) in da9052_i2c_disable_multiwrite() argument
98 ret = regmap_read(da9052->regmap, DA9052_CONTROL_B_REG, &reg_val); in da9052_i2c_disable_multiwrite()
104 ret = regmap_write(da9052->regmap, DA9052_CONTROL_B_REG, in da9052_i2c_disable_multiwrite()
136 struct da9052 *da9052; in da9052_i2c_probe() local
139 da9052 = devm_kzalloc(&client->dev, sizeof(struct da9052), GFP_KERNEL); in da9052_i2c_probe()
140 if (!da9052) in da9052_i2c_probe()
143 da9052->dev = &client->dev; in da9052_i2c_probe()
[all …]
Dda9052-spi.c29 struct da9052 *da9052; in da9052_spi_probe() local
31 da9052 = devm_kzalloc(&spi->dev, sizeof(struct da9052), GFP_KERNEL); in da9052_spi_probe()
32 if (!da9052) in da9052_spi_probe()
39 da9052->dev = &spi->dev; in da9052_spi_probe()
40 da9052->chip_irq = spi->irq; in da9052_spi_probe()
42 spi_set_drvdata(spi, da9052); in da9052_spi_probe()
51 da9052->regmap = devm_regmap_init_spi(spi, &config); in da9052_spi_probe()
52 if (IS_ERR(da9052->regmap)) { in da9052_spi_probe()
53 ret = PTR_ERR(da9052->regmap); in da9052_spi_probe()
59 return da9052_device_init(da9052, id->driver_data); in da9052_spi_probe()
[all …]
DMakefile114 obj-$(CONFIG_PMIC_DA9052) += da9052-irq.o
115 obj-$(CONFIG_PMIC_DA9052) += da9052-core.o
116 obj-$(CONFIG_MFD_DA9052_SPI) += da9052-spi.o
117 obj-$(CONFIG_MFD_DA9052_I2C) += da9052-i2c.o
/drivers/input/touchscreen/
Dda9052_tsi.c26 struct da9052 *da9052; member
36 da9052_reg_update(tsi->da9052, DA9052_TSI_CONT_A_REG, 1 << 0, on); in da9052_ts_adc_toggle()
46 da9052_disable_irq_nosync(tsi->da9052, DA9052_IRQ_PENDOWN); in da9052_ts_pendwn_irq()
47 da9052_enable_irq(tsi->da9052, DA9052_IRQ_TSIREADY); in da9052_ts_pendwn_irq()
64 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_X_MSB_REG); in da9052_ts_read()
70 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_Y_MSB_REG); in da9052_ts_read()
76 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_Z_MSB_REG); in da9052_ts_read()
82 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_LSB_REG); in da9052_ts_read()
113 int ret = da9052_reg_read(tsi->da9052, DA9052_TSI_LSB_REG); in da9052_ts_pen_work()
132 ret = da9052_reg_update(tsi->da9052, in da9052_ts_pen_work()
[all …]
/drivers/watchdog/
Dda9052_wdt.c33 struct da9052 *da9052; member
57 struct da9052 *da9052 = driver_data->da9052; in da9052_wdt_set_timeout() local
64 ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_set_timeout()
67 dev_err(da9052->dev, "Failed to disable watchdog bit, %d\n", in da9052_wdt_set_timeout()
86 ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_set_timeout()
90 dev_err(da9052->dev, in da9052_wdt_set_timeout()
115 struct da9052 *da9052 = driver_data->da9052; in da9052_wdt_ping() local
128 ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_ping()
137 ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_ping()
159 struct da9052 *da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_wdt_probe() local
[all …]
/drivers/leds/
Dleds-da9052.c34 struct da9052 *da9052; member
52 error = da9052_reg_write(led->da9052, led_reg[led->led_index], val); in da9052_set_led_brightness()
54 dev_err(led->da9052->dev, "Failed to set led brightness, %d\n", in da9052_set_led_brightness()
68 static int da9052_configure_leds(struct da9052 *da9052) in da9052_configure_leds() argument
74 error = da9052_reg_update(da9052, DA9052_GPIO_14_15_REG, in da9052_configure_leds()
79 dev_err(da9052->dev, "Failed to write GPIO 14-15 reg, %d\n", in da9052_configure_leds()
84 error = da9052_reg_update(da9052, DA9052_GPIO_14_15_REG, in da9052_configure_leds()
88 dev_err(da9052->dev, "Failed to write GPIO 14-15 reg, %d\n", in da9052_configure_leds()
97 struct da9052 *da9052; in da9052_led_probe() local
103 da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_led_probe()
[all …]
DMakefile47 obj-$(CONFIG_LEDS_DA9052) += leds-da9052.o
/drivers/gpio/
Dgpio-da9052.c50 struct da9052 *da9052; member
65 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
80 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
83 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
104 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
109 dev_err(gpio->da9052->dev, in da9052_gpio_set()
113 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
118 dev_err(gpio->da9052->dev, in da9052_gpio_set()
135 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_direction_input()
141 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_direction_input()
[all …]
DMakefile39 obj-$(CONFIG_GPIO_DA9052) += gpio-da9052.o
/drivers/hwmon/
Dda9052-hwmon.c28 struct da9052 *da9052; member
62 static inline int da9052_enable_vddout_channel(struct da9052 *da9052) in da9052_enable_vddout_channel() argument
64 return da9052_reg_update(da9052, DA9052_ADC_CONT_REG, in da9052_enable_vddout_channel()
69 static inline int da9052_disable_vddout_channel(struct da9052 *da9052) in da9052_disable_vddout_channel() argument
71 return da9052_reg_update(da9052, DA9052_ADC_CONT_REG, in da9052_disable_vddout_channel()
83 ret = da9052_enable_vddout_channel(hwmon->da9052); in da9052_read_vddout()
87 vdd = da9052_reg_read(hwmon->da9052, DA9052_VDD_RES_REG); in da9052_read_vddout()
93 ret = da9052_disable_vddout_channel(hwmon->da9052); in da9052_read_vddout()
101 da9052_disable_vddout_channel(hwmon->da9052); in da9052_read_vddout()
113 ret = da9052_reg_read(hwmon->da9052, DA9052_ICHG_AV_REG); in da9052_read_ich()
[all …]
DMakefile51 obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
DKconfig402 will be called da9052-hwmon.
/drivers/input/misc/
Dda9052_onkey.c23 struct da9052 *da9052; member
32 ret = da9052_reg_read(onkey->da9052, DA9052_STATUS_A_REG); in da9052_onkey_query()
34 dev_err(onkey->da9052->dev, in da9052_onkey_query()
77 struct da9052 *da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_onkey_probe() local
82 if (!da9052) { in da9052_onkey_probe()
96 onkey->da9052 = da9052; in da9052_onkey_probe()
106 error = da9052_request_irq(onkey->da9052, DA9052_IRQ_NONKEY, "ONKEY", in da9052_onkey_probe()
109 dev_err(onkey->da9052->dev, in da9052_onkey_probe()
125 da9052_free_irq(onkey->da9052, DA9052_IRQ_NONKEY, onkey); in da9052_onkey_probe()
138 da9052_free_irq(onkey->da9052, DA9052_IRQ_NONKEY, onkey); in da9052_onkey_remove()
/drivers/rtc/
Drtc-da9052.c25 dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
31 struct da9052 *da9052; member
38 ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, in da9052_rtc_enable_alarm()
44 ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, in da9052_rtc_enable_alarm()
68 ret = da9052_group_read(rtc->da9052, DA9052_ALARM_MI_REG, 5, &v[0][0]); in da9052_read_alarm()
75 ret = da9052_group_read(rtc->da9052, in da9052_read_alarm()
106 struct da9052 *da9052 = rtc->da9052; in da9052_set_alarm() local
124 ret = da9052_reg_update(da9052, DA9052_ALARM_MI_REG, in da9052_set_alarm()
135 ret = da9052_group_write(da9052, DA9052_ALARM_H_REG, 3, v); in da9052_set_alarm()
139 ret = da9052_reg_update(da9052, DA9052_ALARM_Y_REG, in da9052_set_alarm()
[all …]
DMakefile43 obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o
/drivers/regulator/
Dda9052-regulator.c77 struct da9052 *da9052; member
97 ret = da9052_reg_read(regulator->da9052, DA9052_BUCKA_REG + offset/2); in da9052_dcdc_get_current_limit()
110 if (regulator->da9052->chip_id == DA9052) in da9052_dcdc_get_current_limit()
127 if (regulator->da9052->chip_id == DA9052) in da9052_dcdc_set_current_limit()
147 return da9052_reg_update(regulator->da9052, in da9052_dcdc_set_current_limit()
152 return da9052_reg_update(regulator->da9052, in da9052_dcdc_set_current_limit()
166 if ((id == DA9052_ID_BUCK4) && (regulator->da9052->chip_id == DA9052) in da9052_list_voltage()
197 if ((id == DA9052_ID_BUCK4) && (regulator->da9052->chip_id == DA9052) in da9052_map_voltage()
221 ret = da9052_reg_update(regulator->da9052, rdev->desc->vsel_reg, in da9052_regulator_set_voltage_sel()
235 ret = da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, in da9052_regulator_set_voltage_sel()
[all …]
DMakefile27 obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
/drivers/power/supply/
Dda9052-battery.c171 struct da9052 *da9052; member
197 ret = da9052_reg_read(bat->da9052, DA9052_ICHG_END_REG); in da9052_read_chgend_current()
213 ret = da9052_reg_read(bat->da9052, DA9052_ICHG_AV_REG); in da9052_read_chg_current()
237 ret = da9052_group_read(bat->da9052, DA9052_STATUS_A_REG, 2, v); in da9052_bat_check_status()
293 volt = da9052_adc_manual_read(bat->da9052, DA9052_ADC_MAN_MUXSEL_VBAT); in da9052_bat_read_volt()
306 bat_temp = da9052_adc_read_temp(bat->da9052); in da9052_bat_check_presence()
374 adc_temp = da9052_adc_read_temp(bat->da9052); in da9052_bat_read_capacity()
445 virq = regmap_irq_get_virq(bat->da9052->irq_data, irq); in da9052_bat_irq()
474 ret = da9052_reg_read(bat->da9052, DA9052_CHGBUCK_REG); in da9052_USB_current_notifier()
478 if (bat->da9052->chip_id == DA9052) in da9052_USB_current_notifier()
[all …]
DMakefile37 obj-$(CONFIG_BATTERY_DA9052) += da9052-battery.o
/drivers/video/backlight/
Dda9052_bl.c44 struct da9052 *da9052; member
63 ret = da9052_reg_write(wleds->da9052, DA9052_BOOST_REG, boost_en); in da9052_adjust_wled_brightness()
67 ret = da9052_reg_write(wleds->da9052, DA9052_LED_CONT_REG, i_sink); in da9052_adjust_wled_brightness()
71 ret = da9052_reg_write(wleds->da9052, wled_bank[wleds->led_reg], 0x0); in da9052_adjust_wled_brightness()
78 ret = da9052_reg_write(wleds->da9052, wled_bank[wleds->led_reg], in da9052_adjust_wled_brightness()
120 wleds->da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_backlight_probe()
129 wleds->da9052->dev, wleds, in da9052_backlight_probe()