Lines Matching refs:sbc
114 static int __init ts5500_detect_config(struct ts5500_sbc *sbc) in ts5500_detect_config() argument
122 sbc->id = inb(TS5500_PRODUCT_CODE_ADDR); in ts5500_detect_config()
123 if (sbc->id == TS5500_PRODUCT_CODE) { in ts5500_detect_config()
124 sbc->name = "TS-5500"; in ts5500_detect_config()
125 } else if (sbc->id == TS5400_PRODUCT_CODE) { in ts5500_detect_config()
126 sbc->name = "TS-5400"; in ts5500_detect_config()
128 pr_err("ts5500: unknown product code 0x%x\n", sbc->id); in ts5500_detect_config()
134 sbc->sram = tmp & TS5500_SRAM; in ts5500_detect_config()
135 sbc->rs485 = tmp & TS5500_RS485; in ts5500_detect_config()
136 sbc->adc = tmp & TS5500_ADC; in ts5500_detect_config()
139 sbc->ereset = tmp & TS5500_ERESET; in ts5500_detect_config()
140 sbc->itr = tmp & TS5500_ITR; in ts5500_detect_config()
143 sbc->jumpers = tmp & ~TS5500_LED; in ts5500_detect_config()
153 struct ts5500_sbc *sbc = dev_get_drvdata(dev); in name_show() local
155 return sprintf(buf, "%s\n", sbc->name); in name_show()
162 struct ts5500_sbc *sbc = dev_get_drvdata(dev); in id_show() local
164 return sprintf(buf, "0x%.2x\n", sbc->id); in id_show()
171 struct ts5500_sbc *sbc = dev_get_drvdata(dev); in jumpers_show() local
173 return sprintf(buf, "0x%.2x\n", sbc->jumpers >> 1); in jumpers_show()
181 struct ts5500_sbc *sbc = dev_get_drvdata(dev); \
183 return sprintf(buf, "%d\n", sbc->_field); \
286 struct ts5500_sbc *sbc; in ts5500_init() local
302 sbc = devm_kzalloc(&pdev->dev, sizeof(struct ts5500_sbc), GFP_KERNEL); in ts5500_init()
303 if (!sbc) { in ts5500_init()
308 err = ts5500_detect_config(sbc); in ts5500_init()
312 platform_set_drvdata(pdev, sbc); in ts5500_init()
318 if (sbc->id == TS5500_PRODUCT_CODE) { in ts5500_init()
330 if (sbc->adc) { in ts5500_init()