/drivers/mfd/ |
D | pcf50633-irq.c | 24 int pcf50633_register_irq(struct pcf50633 *pcf, int irq, in pcf50633_register_irq() argument 30 if (WARN_ON(pcf->irq_handler[irq].handler)) in pcf50633_register_irq() 33 mutex_lock(&pcf->lock); in pcf50633_register_irq() 34 pcf->irq_handler[irq].handler = handler; in pcf50633_register_irq() 35 pcf->irq_handler[irq].data = data; in pcf50633_register_irq() 36 mutex_unlock(&pcf->lock); in pcf50633_register_irq() 42 int pcf50633_free_irq(struct pcf50633 *pcf, int irq) in pcf50633_free_irq() argument 47 mutex_lock(&pcf->lock); in pcf50633_free_irq() 48 pcf->irq_handler[irq].handler = NULL; in pcf50633_free_irq() 49 mutex_unlock(&pcf->lock); in pcf50633_free_irq() [all …]
|
D | pcf50633-core.c | 32 int pcf50633_read_block(struct pcf50633 *pcf, u8 reg, in pcf50633_read_block() argument 37 ret = regmap_raw_read(pcf->regmap, reg, data, nr_regs); in pcf50633_read_block() 46 int pcf50633_write_block(struct pcf50633 *pcf , u8 reg, in pcf50633_write_block() argument 49 return regmap_raw_write(pcf->regmap, reg, data, nr_regs); in pcf50633_write_block() 53 u8 pcf50633_reg_read(struct pcf50633 *pcf, u8 reg) in pcf50633_reg_read() argument 58 ret = regmap_read(pcf->regmap, reg, &val); in pcf50633_reg_read() 66 int pcf50633_reg_write(struct pcf50633 *pcf, u8 reg, u8 val) in pcf50633_reg_write() argument 68 return regmap_write(pcf->regmap, reg, val); in pcf50633_reg_write() 72 int pcf50633_reg_set_bit_mask(struct pcf50633 *pcf, u8 reg, u8 mask, u8 val) in pcf50633_reg_set_bit_mask() argument 74 return regmap_update_bits(pcf->regmap, reg, mask, val); in pcf50633_reg_set_bit_mask() [all …]
|
D | pcf50633-adc.c | 44 struct pcf50633 *pcf; member 53 static inline struct pcf50633_adc *__to_adc(struct pcf50633 *pcf) in __to_adc() argument 55 return platform_get_drvdata(pcf->adc_pdev); in __to_adc() 58 static void adc_setup(struct pcf50633 *pcf, int channel, int avg) in adc_setup() argument 63 pcf50633_reg_write(pcf, PCF50633_REG_ADCC2, 0x00); in adc_setup() 64 pcf50633_reg_write(pcf, PCF50633_REG_ADCC3, 0x01); in adc_setup() 67 pcf50633_reg_write(pcf, PCF50633_REG_ADCC1, channel | avg | in adc_setup() 71 static void trigger_next_adc_job_if_any(struct pcf50633 *pcf) in trigger_next_adc_job_if_any() argument 73 struct pcf50633_adc *adc = __to_adc(pcf); in trigger_next_adc_job_if_any() 81 adc_setup(pcf, adc->queue[head]->mux, adc->queue[head]->avg); in trigger_next_adc_job_if_any() [all …]
|
D | pcf50633-gpio.c | 38 int pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, u8 val) in pcf50633_gpio_set() argument 44 return pcf50633_reg_set_bit_mask(pcf, reg, 0x07, val); in pcf50633_gpio_set() 48 u8 pcf50633_gpio_get(struct pcf50633 *pcf, int gpio) in pcf50633_gpio_get() argument 53 val = pcf50633_reg_read(pcf, reg) & 0x07; in pcf50633_gpio_get() 59 int pcf50633_gpio_invert_set(struct pcf50633 *pcf, int gpio, int invert) in pcf50633_gpio_invert_set() argument 66 return pcf50633_reg_set_bit_mask(pcf, reg, 1 << 3, val); in pcf50633_gpio_invert_set() 70 int pcf50633_gpio_invert_get(struct pcf50633 *pcf, int gpio) in pcf50633_gpio_invert_get() argument 75 val = pcf50633_reg_read(pcf, reg); in pcf50633_gpio_invert_get() 81 int pcf50633_gpio_power_supply_set(struct pcf50633 *pcf, in pcf50633_gpio_power_supply_set() argument 92 return pcf50633_reg_set_bit_mask(pcf, reg, mask, val); in pcf50633_gpio_power_supply_set()
|
/drivers/power/supply/ |
D | pcf50633-charger.c | 31 struct pcf50633 *pcf; member 41 int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma) in pcf50633_mbc_usb_curlim_set() argument 43 struct pcf50633_mbc *mbc = platform_get_drvdata(pcf->mbc_pdev); in pcf50633_mbc_usb_curlim_set() 65 ret = pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC7, in pcf50633_mbc_usb_curlim_set() 68 dev_err(pcf->dev, "error setting usb curlim to %d mA\n", ma); in pcf50633_mbc_usb_curlim_set() 70 dev_info(pcf->dev, "usb curlim to %d mA\n", ma); in pcf50633_mbc_usb_curlim_set() 83 if (mbc->pcf->pdata->charger_reference_current_ma) { in pcf50633_mbc_usb_curlim_set() 84 mbcc5 = (ma << 8) / mbc->pcf->pdata->charger_reference_current_ma; in pcf50633_mbc_usb_curlim_set() 87 pcf50633_reg_write(mbc->pcf, PCF50633_REG_MBCC5, mbcc5); in pcf50633_mbc_usb_curlim_set() 90 mbcs2 = pcf50633_reg_read(mbc->pcf, PCF50633_REG_MBCS2); in pcf50633_mbc_usb_curlim_set() [all …]
|
/drivers/rtc/ |
D | rtc-pcf50633.c | 63 struct pcf50633 *pcf; member 67 static void pcf2rtc_time(struct rtc_time *rtc, struct pcf50633_time *pcf) in pcf2rtc_time() argument 69 rtc->tm_sec = bcd2bin(pcf->time[PCF50633_TI_SEC]); in pcf2rtc_time() 70 rtc->tm_min = bcd2bin(pcf->time[PCF50633_TI_MIN]); in pcf2rtc_time() 71 rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); in pcf2rtc_time() 72 rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); in pcf2rtc_time() 73 rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); in pcf2rtc_time() 74 rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]) - 1; in pcf2rtc_time() 75 rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; in pcf2rtc_time() 78 static void rtc2pcf_time(struct pcf50633_time *pcf, struct rtc_time *rtc) in rtc2pcf_time() argument [all …]
|
D | rtc-pcf8523.c | 284 struct pcf8523 *pcf; in pcf8523_probe() local 290 pcf = devm_kzalloc(&client->dev, sizeof(*pcf), GFP_KERNEL); in pcf8523_probe() 291 if (!pcf) in pcf8523_probe() 302 pcf->rtc = devm_rtc_device_register(&client->dev, DRIVER_NAME, in pcf8523_probe() 304 if (IS_ERR(pcf->rtc)) in pcf8523_probe() 305 return PTR_ERR(pcf->rtc); in pcf8523_probe() 307 i2c_set_clientdata(client, pcf); in pcf8523_probe()
|
/drivers/video/backlight/ |
D | pcf50633-backlight.c | 28 struct pcf50633 *pcf; member 45 int pcf50633_bl_set_brightness_limit(struct pcf50633 *pcf, unsigned int limit) in pcf50633_bl_set_brightness_limit() argument 47 struct pcf50633_bl *pcf_bl = platform_get_drvdata(pcf->bl_pdev); in pcf50633_bl_set_brightness_limit() 77 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDOUT, in pcf50633_bl_update_status() 80 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDENA, 1); in pcf50633_bl_update_status() 82 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDENA, 0); in pcf50633_bl_update_status() 128 pcf_bl->pcf = dev_to_pcf50633(pdev->dev.parent); in pcf50633_bl_probe() 139 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time); in pcf50633_bl_probe()
|
/drivers/input/misc/ |
D | pcf50633-input.c | 31 struct pcf50633 *pcf; member 44 onkey_released = pcf50633_reg_read(input->pcf, PCF50633_REG_OOCSTAT) in pcf50633_input_irq() 73 input->pcf = dev_to_pcf50633(pdev->dev.parent); in pcf50633_input_probe() 87 pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYR, in pcf50633_input_probe() 89 pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYF, in pcf50633_input_probe() 99 pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYR); in pcf50633_input_remove() 100 pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYF); in pcf50633_input_remove()
|
/drivers/regulator/ |
D | pcf50633-regulator.c | 82 struct pcf50633 *pcf; in pcf50633_regulator_probe() local 86 pcf = dev_to_pcf50633(pdev->dev.parent); in pcf50633_regulator_probe() 90 config.driver_data = pcf; in pcf50633_regulator_probe() 91 config.regmap = pcf->regmap; in pcf50633_regulator_probe() 100 if (pcf->pdata->regulator_registered) in pcf50633_regulator_probe() 101 pcf->pdata->regulator_registered(pcf, pdev->id); in pcf50633_regulator_probe()
|
/drivers/i2c/algos/ |
D | Makefile | 6 obj-$(CONFIG_I2C_ALGOPCF) += i2c-algo-pcf.o
|