Lines Matching +full:i2cr +full:- +full:fsi +full:- +full:master

1 // SPDX-License-Identifier: GPL-2.0
7 #include <linux/fsi.h>
11 #include "fsi-master-i2cr.h"
12 #include "fsi-slave.h"
17 struct fsi_master_i2cr *i2cr; member
26 file->f_pos = offset; in i2cr_scom_llseek()
29 return -EINVAL; in i2cr_scom_llseek()
37 struct i2cr_scom *scom = filep->private_data; in i2cr_scom_read()
42 return -EINVAL; in i2cr_scom_read()
44 ret = fsi_master_i2cr_read(scom->i2cr, (u32)*offset, &data); in i2cr_scom_read()
58 struct i2cr_scom *scom = filep->private_data; in i2cr_scom_write()
63 return -EINVAL; in i2cr_scom_write()
69 ret = fsi_master_i2cr_write(scom->i2cr, (u32)*offset, data); in i2cr_scom_write()
91 if (!is_fsi_master_i2cr(fsi_dev->slave->master)) in i2cr_scom_probe()
92 return -ENODEV; in i2cr_scom_probe()
96 return -ENOMEM; in i2cr_scom_probe()
98 scom->i2cr = to_fsi_master_i2cr(fsi_dev->slave->master); in i2cr_scom_probe()
101 scom->dev.type = &fsi_cdev_type; in i2cr_scom_probe()
102 scom->dev.parent = dev; in i2cr_scom_probe()
103 device_initialize(&scom->dev); in i2cr_scom_probe()
105 ret = fsi_get_new_minor(fsi_dev, fsi_dev_scom, &scom->dev.devt, &didx); in i2cr_scom_probe()
109 dev_set_name(&scom->dev, "scom%d", didx); in i2cr_scom_probe()
110 cdev_init(&scom->cdev, &i2cr_scom_fops); in i2cr_scom_probe()
111 ret = cdev_device_add(&scom->cdev, &scom->dev); in i2cr_scom_probe()
113 fsi_free_minor(scom->dev.devt); in i2cr_scom_probe()
122 cdev_device_del(&scom->cdev, &scom->dev); in i2cr_scom_remove()
123 fsi_free_minor(scom->dev.devt); in i2cr_scom_remove()
129 { .compatible = "ibm,i2cr-scom" },