• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/mfd/

Lines Matching refs:pcf

45 	struct pcf50633 *pcf;
54 static inline struct pcf50633_adc *__to_adc(struct pcf50633 *pcf)
56 return platform_get_drvdata(pcf->adc_pdev);
59 static void adc_setup(struct pcf50633 *pcf, int channel, int avg)
64 pcf50633_reg_write(pcf, PCF50633_REG_ADCC2, 0x00);
65 pcf50633_reg_write(pcf, PCF50633_REG_ADCC3, 0x01);
68 pcf50633_reg_write(pcf, PCF50633_REG_ADCC1, channel | avg |
72 static void trigger_next_adc_job_if_any(struct pcf50633 *pcf)
74 struct pcf50633_adc *adc = __to_adc(pcf);
82 adc_setup(pcf, adc->queue[head]->mux, adc->queue[head]->avg);
86 adc_enqueue_request(struct pcf50633 *pcf, struct pcf50633_adc_request *req)
88 struct pcf50633_adc *adc = __to_adc(pcf);
98 dev_err(pcf->dev, "ADC queue is full, dropping request\n");
104 trigger_next_adc_job_if_any(pcf);
112 static void pcf50633_adc_sync_read_callback(struct pcf50633 *pcf, void *param,
121 int pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg)
128 ret = pcf50633_adc_async_read(pcf, mux, avg,
139 int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
155 return adc_enqueue_request(pcf, req);
159 static int adc_result(struct pcf50633 *pcf)
164 adcs1 = pcf50633_reg_read(pcf, PCF50633_REG_ADCS1);
165 adcs3 = pcf50633_reg_read(pcf, PCF50633_REG_ADCS3);
168 dev_dbg(pcf->dev, "adc result = %d\n", result);
176 struct pcf50633 *pcf = adc->pcf;
185 dev_err(pcf->dev, "pcf50633-adc irq: ADC queue empty!\n");
193 res = adc_result(pcf);
194 trigger_next_adc_job_if_any(pcf);
198 req->callback(pcf, req->callback_param, res);
210 adc->pcf = dev_to_pcf50633(pdev->dev.parent);
213 pcf50633_register_irq(adc->pcf, PCF50633_IRQ_ADCRDY,
226 pcf50633_free_irq(adc->pcf, PCF50633_IRQ_ADCRDY);
232 dev_err(adc->pcf->dev,