Lines Matching refs:fmc

32 static int fwe_run_tlv(struct fmc_device *fmc, const struct firmware *fw,  in fwe_run_tlv()  argument
45 dev_err(&fmc->dev, "invalid tlv at offset %ti\n", in fwe_run_tlv()
51 dev_info(&fmc->dev, "write %i bytes at 0x%04x\n", in fwe_run_tlv()
53 err = fmc->op->write_ee(fmc, thisaddr, p + 5, thislen); in fwe_run_tlv()
56 dev_err(&fmc->dev, "write failure @0x%04x\n", in fwe_run_tlv()
64 dev_info(&fmc->dev, "write_eeprom: success\n"); in fwe_run_tlv()
68 static int fwe_run_bin(struct fmc_device *fmc, const struct firmware *fw) in fwe_run_bin() argument
72 dev_info(&fmc->dev, "programming %zi bytes\n", fw->size); in fwe_run_bin()
73 ret = fmc->op->write_ee(fmc, 0, (void *)fw->data, fw->size); in fwe_run_bin()
75 dev_info(&fmc->dev, "write_eeprom: error %i\n", ret); in fwe_run_bin()
78 dev_info(&fmc->dev, "write_eeprom: success\n"); in fwe_run_bin()
82 static int fwe_run(struct fmc_device *fmc, const struct firmware *fw, char *s) in fwe_run() argument
88 return fwe_run_bin(fmc, fw); in fwe_run()
90 err = fwe_run_tlv(fmc, fw, 0); in fwe_run()
92 err = fwe_run_tlv(fmc, fw, 1); in fwe_run()
95 dev_err(&fmc->dev, "invalid file name \"%s\"\n", s); in fwe_run()
106 static int fwe_probe(struct fmc_device *fmc) in fwe_probe() argument
110 struct device *dev = &fmc->dev; in fwe_probe()
118 if (fmc->op->validate) in fwe_probe()
119 index = fmc->op->validate(fmc, &fwe_drv); in fwe_probe()
138 dev_err(&fmc->dev, "request firmware \"%s\": error %i\n", in fwe_probe()
142 fwe_run(fmc, fw, s); in fwe_probe()
147 static int fwe_remove(struct fmc_device *fmc) in fwe_remove() argument