Lines Matching full:ma
36 int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma) in pcf50633_mbc_usb_curlim_set() argument
44 if (ma >= 1000) { in pcf50633_mbc_usb_curlim_set()
46 ma = 1000; in pcf50633_mbc_usb_curlim_set()
47 } else if (ma >= 500) { in pcf50633_mbc_usb_curlim_set()
49 ma = 500; in pcf50633_mbc_usb_curlim_set()
50 } else if (ma >= 100) { in pcf50633_mbc_usb_curlim_set()
52 ma = 100; in pcf50633_mbc_usb_curlim_set()
55 ma = 0; in pcf50633_mbc_usb_curlim_set()
61 dev_err(pcf->dev, "error setting usb curlim to %d mA\n", ma); in pcf50633_mbc_usb_curlim_set()
63 dev_info(pcf->dev, "usb curlim to %d mA\n", ma); in pcf50633_mbc_usb_curlim_set()
70 * default is 500mA. By setting the charging current to be the same in pcf50633_mbc_usb_curlim_set()
77 mbcc5 = (ma << 8) / mbc->pcf->pdata->charger_reference_current_ma; in pcf50633_mbc_usb_curlim_set()
166 unsigned int ma; in show_usblim() local
169 ma = 1000; in show_usblim()
171 ma = 500; in show_usblim()
173 ma = 100; in show_usblim()
175 ma = 0; in show_usblim()
177 return sprintf(buf, "%u\n", ma); in show_usblim()
184 unsigned long ma; in set_usblim() local
187 ret = kstrtoul(buf, 10, &ma); in set_usblim()
191 pcf50633_mbc_usb_curlim_set(mbc->pcf, ma); in set_usblim()
203 unsigned int ma; in show_chglim() local
208 ma = (mbc->pcf->pdata->charger_reference_current_ma * mbcc5) >> 8; in show_chglim()
210 return sprintf(buf, "%u\n", ma); in show_chglim()
217 unsigned long ma; in set_chglim() local
224 ret = kstrtoul(buf, 10, &ma); in set_chglim()
228 mbcc5 = (ma << 8) / mbc->pcf->pdata->charger_reference_current_ma; in set_chglim()